-
Notifications
You must be signed in to change notification settings - Fork 27
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
HTTPError when running get_completed_items() #123
Comments
Hi, you seem to be using Call to endpoint without project_id fieldCall to endpoint with project_id fieldThere's no direct fix to this, but there's a workaround for non-archived projects. If you know all of the project_ids you can call it with @lefcha do you guys have any plans to add back the call without the |
Yes, while the public API has a way to get all completed tasks, ie. https://developer.todoist.com/sync/v9/#get-all-completed-items Unfortunately we haven't yet implemented very much from the auxiliary functions of the Sync API in this SDK. Your best option for now would be to directly send a request to the There's also an API endpoint to get archived projects https://developer.todoist.com/sync/v9/#get-archived-projects This SDK is primarily about implementing the REST API, and we don't plan to implement all the auxiliary functions of the Sync API at the moment. |
Same problem here. |
@oscarclivio did you try to call the If you really want to get all of the completed items or you do not know the project_ids you're supposed to use, use the sync api - as lefcha answered me. If you're not sure how to do this, feel free to use this code on my working branch code |
Thanks @brunorosilva for helping. I do yes and I iterate over project ids. But your solution is faster and returns non-root completed tasks unlike |
@oscarclivio Glad I could help! Yeah, that happens because their implementation of Their approach is not wrong, it is in line with their argument for having two APIs. Rest providing simpler use cases and Sync for data heavy use cases. Below are some images and comparisons I made. Using /archive |
I came up with the following implementation:
This probably could be added to the api, with a few tweaks. |
Question description
I get a HTTPError when I attempt to run

get_completed_items()
off the api object. I get the following error:is this a bug, or am I doing something wrong?
The text was updated successfully, but these errors were encountered: