-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add pagination support for completed items and projects #9
Conversation
Hey @dltn However, I've got over 10.000 archived tasks, and it takes almost 1 minute for the tool to finish. I believe, some people will have even more tasks. Additionally, the tool doesn't have any loading feedback when using the download button (it does work when clicking the direct link, though). I've created #10 to track this issue, as it's not directly related to this PR. My proposal is to add a disclaimer, e.g. "Exporting large amounts of archived tasks may take some time". Some users might not care about archived tasks, so an additional improvement would be to add a checkbox like "Download all archived tasks (this will take more time to complete)" - default = "off" for better performance. Last but not least, did you find any information about the default quota? Todoist might not be happy about getting so many requests per download (50+ requests for me). |
Wow, that's a while! I'll address the feedback and test larger archives. The limit is 50 requests per minute, so about ~10K tasks/minute at 200 items per request. Behavior is likely undefined if we exceed that - so we'd better to add a timeout to be safe. |
(Haven't forgotten about this, just busy in the new year. Looping back soon.) |
There's no hurry :) |
Added optional checkbox (default off) control and disclaimers: I learned the way This PR encodes the archive option in the existing "format string" – which isn't ideal, but minimizes the changes needed to keep compatibility. I don't want to bloat this PR further, so I created #11 to track this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks a lot! 😊🚀
I've deployed the change to production |
Hey @darekkay, this tool is wonderful! Thanks for open sourcing this.
Currently, the export only contains 30 each of completed items and projects (the API default limit):
This PR adds pagination support so all previously completed items / projects are exported: