Class

TimeTrackings

TimeTrackings(client, userId)

Class corresponding to Aworks TimeTrackings Endpoints
Constructor

# new TimeTrackings(client, userId)

Endpoint constructor
Parameters:
Name Type Description
client Client
userId String The id of the user.
See:
  • [TimeTrackings in Awork API Docs](https://openapi.awork.com/#/TimeTrackings)

View Source endpoints/TimeTrackings.js, line 9

Classes

TimeTrackings

Methods

# async start(timeTrackingStartModel) → {Promise.<TimeEntry>}

If there is already a running time tracking it will be stopped automatically in order to start the new one.
Parameters:
Name Type Description
timeTrackingStartModel TimeTrackingStartModel The model to start a time tracking.

View Source endpoints/TimeTrackings.js, line 47

Promise.<TimeEntry>

# async stop() → {Promise.<TimeEntry>}

There is no request body necessary for this operation. For this operation to work there must be a running time tracking for the user.

View Source endpoints/TimeTrackings.js, line 57

Promise.<TimeEntry>