Skip to content

Conversation

pedroalves0
Copy link
Member

🗺 Overview

In line with ongoing internal efforts, this PR refactors the SDK to serve as an intermediary between consumers and the Todoist Sync API, replacing the Todoist REST API.

Changes in this Refactor:

The SDK API remains largely unchanged, with the following exceptions:

  • Some new properties have been added to entities.

  • Certain existing properties have been marked as required.

  • The following methods are now paginated:

    - getTasks
    - getProjects
    - getProjectCollaborators
    - getSections
    - getLabels
    - getSharedLabels
    - getComments
    

This refactor ensures compatibility with the latest version of the Todoist Sync API while maintaining the familiar client API interface for consumers.

Caveats:

  • Passing the ids argument to the getTasks method only works with v1 IDs.
  • Updating a comment via updateComment only works with v1 IDs.
  • delete* methods throw an error due to CORS restrictions (the respective Sync API endpoints Access-Control-Allow-Methods response header only allows GET, POST).
  • Creating a section with addSection only works if the project ID is a v1 ID.
  • Updating a section via updateSection only works with v1 IDs.

Release:

This PR will be merged into the v4 branch, from which several pre-release versions will be created until a stable v4 release.

@pedroalves0 pedroalves0 self-assigned this Jan 15, 2025
@pedroalves0
Copy link
Member Author

@scottlovegrove , as the DRD of this library (?), I've assigned you directly as the reviewer, but let me know if I should roll the dice and assign someone else.

@scottlovegrove
Copy link
Contributor

I'll take a look now, thanks 👍🏻

@pedroalves0 pedroalves0 merged commit cd32d02 into v4 Jan 17, 2025
1 check passed
@pedroalves0 pedroalves0 deleted the pedroa/migrate-to-sync-api branch January 17, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants