Modern Toggl API wrapper and Timer.
This package wraps the Toggl API with a promised based approach. This makes the usage of async/await straight forward.
It also has timer functionality build in to easily start, stop and update the a time entry.
Requirements
This package requires node 8 or higher, because of async/await usage.
Installation
npm install tog
Usage
Initialisation
// Using your API tokenconst toggl = apiToken: 'YOUR_API_TOKEN' // Using your credentialsconst toggl = username: 'YOUR_USERNAME' password: 'YOUR_PASSWORD'
Getting data
const data: clients = await toggl
Using a timer
// Starting a timerconst timer = await toggl // Updating the time entryawait timer // When you're doneawait timer // Get details of the timerconsole