simonwillcock / jstoggl Goto Github PK
View Code? Open in Web Editor NEWAn API wrapper to simplify interactions with the Toggl API
License: GNU General Public License v2.0
An API wrapper to simplify interactions with the Toggl API
License: GNU General Public License v2.0
At the moment the API wrapper is structured such that the function parameters are used to create the data that is sent to the Toggl API. Unfortunately, this isn't very maintainable as there must be a parameter for every configurable option.
Instead, I suggest that all parameters are passed as a single object to the functions. Then using jQuery's $.extend, we can just add any passed data to the defaults.
start: function(args){
var defaults = {
'wid': config.defaultWorkspace,
'created_with': config.clientName
};
var data = {
'time_entry': $.extend({}, defaults, args)
};
var promise = _request(_buildUrl('time_entries/start'), 'POST', JSON.stringify(data));
return promise;
},
https://github.com/toggl/toggl_api_docs/blob/master/chapters/users.md#get-current-user-data
There is an optional parameter to include all related user data for the current user me
endpoint - with_related_data
. It isn't currently possible to pass this parameter using this library.
Based on the official docs, endpoint domain should be api.track.toggl.com
, but this library is still using www.toggl.com
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.