[API] project_update explanation
I am need a explanation about project_update function from Todoist Sync API v2! How it works?
Where do I put the id of the project to update?
Please refer to this documentation: https://todoist.com/API/help/sync#json_object_commands and let me know if it helps.
I already did it. But is not clear where do I put the id of the project to update.
"name": "New name",
I think that this "id" is about the timestamp with a $. Right?
I have asked your question to the developer.
Unfortunately, we haven't heard back about this from the developers yet, but as soon as we do, we'll get back to you. Sorry for the delay.
You need to do a sync command like this:
Let us know if this works!
Sorry for the wait time.
Thanks for reply.
I am trying to understand the code:
Inside 'args', there is a 'id' field, right?
What, exactly, should contain the field? project's id without '$' ?
Long time has passed and I can't update a project using API.
So let me try again:
"type": "project_update", #type of requisition, update
"timestamp": 1326467500573, #timestamp of when the requisition was made (to avoid duplicated requests
"id": "$1326467493134", #some temporary id, that will be replaced at the response of this request through the filed "TempIdMapping"
"name": "Test new", #updated name
"item_order": 5, #updated order
"color": 2 # updated color
The main question is: Where does this request know which is the project that the server should update? Does the request should provide a parameter, called "id", to indicate this?
"id": "$1326467493134" is a temporary id, you can easily use a normal id as well (such as "id": 2323).
Why do you need temporary ids? You need this in order to build an offline client. While offline when you create a project you won't have its real ID - - hence you will use a temporary one. The API has great support for managing temporary ids.
Hope this answered your question.