Convenience wrapper for got to interact with the Toggl API
$ npm install --save toggl-got
import toggl from 'toggl-got';
toggl('me', { token: 'foo' }).then(res => {
console.log(res.body.data.fullname);
//=> 'Angus'
});
Same as got
(including the stream API and aliases), but with some additional options:
-
token
Toggl API token.
Can be set globally with the
TOGGL_TOKEN
environment variable. -
endpoint
Default:
https://www.toggl.com/api/v8/
Can be set globally with the
TOGGL_ENDPOINT
environment variable.
The MIT License (MIT)
Copyright (c) 2016 Angus Fretwell