saintedlama / toggl-client

Client for the Toggl API built for async and await support
ISC License
16 stars 5 forks source link

Update workspaces module for remaining v9 API changes #39

Closed beauraines closed 1 year ago

beauraines commented 1 year ago

In PR #28, only the high priority methods for Obsidian integration with toggl and toggl-node-cli were updated. The remaining methods need to be updated to use the v9 endpoints and new requirements in the specified module.

Observations from prior work.

  1. The information is the response is no longer nested in a data property. The use of the mapData() function is probably not needed.
  2. In some cases, the API calls now require certain parameters in the request. The methods in this function ensure that the calling client passed the newly required attributes.
  3. In some cases, where an id was passed before, the entire time entry needs to be passed.

Toggl API Documentation

Acceptance Criteria

  1. All existing client methods work with the new v9 API.
  2. Smoke tests created for all list-type endpoints and should pass locally. Call this out specifically in your PR in case the tests do not run automatically.
  3. Doc blocks added to all exported methods
  4. README reference section updated for that method

Issue created via script