Class Entries

The Entries API provides access for getting and manipulating time entries. It can be accessed through Time.Entries, for example:

const timeEntry = await Time.Entries.startTracking()

Hierarchy

  • Entries

Methods

  • Starts a new time entry at the current time. Can optionally be provided with a title, project and tags.

    Returns

    The newly created time entry

    Parameters

    • Optional title: string

      Title of this time entry

    • Optional projectId: string

      ID of the project this time entry is categorized under

    • Optional tagIds: string[]

      List of IDs of the tags applied to this time entry

    Returns Promise<ITimeEntry>

  • Stops a currently running time entry at the current time.

    Returns

    The updated time entry

    Parameters

    Returns Promise<ITimeEntry>

  • Updates an existing time entry.

    Returns

    The updated time entry

    Parameters

    • id: string

      The ID of the time entry that should be updated.

    • changes: ITimeEntryChanges

      Any changes that should be applied to the time entry.

    Returns Promise<ITimeEntry>

  • Deletes an existing time entry.

    Parameters

    • id: string

      The ID of the time entry that should be deleted.

    Returns Promise<void>

  • Fetches the time entries for a given date.

    Returns

    The entries for the given date

    Parameters

    • date: number

      The date to get entries for

    Returns Promise<ITimeEntry[]>

  • Fetches the time entries for a given project.

    Returns

    The entries for the given project

    Parameters

    • projectId: string

      The ID of the project to get entries for

    Returns Promise<ITimeEntry[]>