Client for the Toggl API built for async and await support
npm i toggl-client
const togglClient = require('toggl-client');
const client = togglClient({ apiToken: YOUR_API_TOKEN });
Main class to interact with the toggl API.
Calling togglClient({ apiToken: YOUR_API_TOKEN });
returns an instance of this class.
workspaces
Workspacesprojects
ProjectstimeEntries
TimeEntriesclients
Clientsgroups
Groupstags
TagsprojectUsers
ProjectUsers
Access clients. See https://github.com/toggl/toggl_api_docs/blob/master/chapters/clients.md
Gets a list of clients
Returns any an array of clients
Creates a new client
client
any
Returns any Created client
Gets a client by id
Returns any client or undefined if no client with specified id was found
Updates a client
Returns any updated client
Deletes a client by id
Lists projects associated with the given client
Access groups. See https://github.com/toggl/toggl_api_docs/blob/master/chapters/groups.md
Creates a group
group
any
Returns any group created
Updates a group
Returns any result of update operation
Deletes a group
Access project users. See https://github.com/toggl/toggl_api_docs/blob/master/chapters/project_users.md
Gets a project user by id
Updates an existing project user
Deletes an existing project user
Creates a new project user
project_user
any
Returns any project user created
Access projects. See https://github.com/toggl/toggl_api_docs/blob/master/chapters/projects.md
Creates a new project
project
any
Returns any Project created
Gets an existing project by id
Returns any Project if a project with the specified id exists, othererwise undefined
Updates an existing project
Returns any The updated project
Deletes an existing project
Gets users associated with the given project
Returns any Array of users associated with the project
Gets tasks associated with the given project
Returns any Array of tasks associated with the project
Access reports. See https://github.com/toggl/toggl_api_docs/blob/master/reports.md
Weekly report URL GET https://api.track.toggl.com/reports/api/v2/weekly
workspaceId
Detailed report URL: GET https://api.track.toggl.com/reports/api/v2/details
workspaceId
Summary report URL: GET https://api.track.toggl.com/reports/api/v2/summary
workspaceId
Access Tasgs. See https://github.com/toggl/toggl_api_docs/blob/master/chapters/tags.md
Creates a new tag
tag
any
Returns any Tag created
Updates an existing tag
Returns any Updated tag
Deletes an existing tag
Access time entries. See https://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md
Lists time entries
query
any
Returns any List of time entries
Creates a new time entry
time_entry
any
Returns any
Access workspaces. See https://github.com/toggl/toggl_api_docs/blob/master/chapters/workspaces.md
Lists all workspaces
Returns Array<Workspace> List of workspaces
Gets a workspace by id
Returns (Workspace | undefined) Workspace or undefined if the given workspace does not exist
Updates an existing workspace
Returns Workspace The updated workspace
Gets a list of users associated with the workspace
Returns any List of users associated with the workspace
Gets a list of clients associated with the workspace
Returns any List of clients associated with the workspace
Gets a list of groups associated with the workspace
Returns any List of groups associated with the workspace
Gets a list of projects associated with the workspace
Returns any List of projects associated with the workspace
Gets a list of tasks associated with the workspace
Returns any List of tasks associated with the workspace
Gets a list of tags associated with the workspace
Returns any List of tags associated with the workspace
Type: Object
id
number Id of the workspacename
number Name of the workspacepremium
boolean True if premium features are enabledadmin
boolean True if requesting user has admin access to the workspacedefault_hourly_rate
number Default hourly rate only shown for requesting admin usersdefault_currency
string Default currencyonly_admins_may_create_projects
booleanonly_admins_see_billable_rates
booleanonly_admins_see_team_dashboard
booleanrounding
number type of roundingrounding_minutes
number round up to nearest minuteat
date Indicates when the workspace was created or updated