Conversation
Allow update_task in sync and async clients to accept order and send it in the request payload. Also extend task update tests to validate that order is passed through.
Please, try the command again or contact the team maintaining the bot. |
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the order parameter to the update_task methods in both synchronous and asynchronous Todoist API clients, addressing issue #209. This change brings update_task into parity with add_task, which already supports the order parameter for controlling task positioning within projects or sections.
Changes:
- Added
order: int | None = Noneparameter toupdate_taskmethods in both sync and async clients - Updated method docstrings to document the new parameter
- Extended test coverage to validate that
orderis properly sent in update requests
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| todoist_api_python/api.py | Added order parameter to sync update_task method signature, docstring, and request payload |
| todoist_api_python/api_async.py | Added order parameter to async update_task method signature, docstring, and request payload |
| tests/test_api_tasks.py | Added order field to test data to validate parameter is sent in API requests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chiara-doist
left a comment
There was a problem hiding this comment.
@goncalossilva unless I'm missing something, I don't see the Update Task API supporting the order parameter.
day_order and collapsed also don't seem to be supported params 👀
Am I missing something?
|
@chiara-doist You're not! I didn't realize these parameters are missing from our API. Working to fix that. :) |
Summary
orderas an optional parameter toupdate_taskin sync and async clientsorderin update payloads when providedorderis sentCloses #209