Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [BREAKING] migrate from REST API to Sync API #263

Merged
merged 4 commits into from
Jan 17, 2025

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 👍🏻

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