Need a COMPLETE sample of using curl to post a task...
Parameters for sample:
Task: Call Jim Smith / ReAquisition
Notes: Call Jim @ 212-555-1212 at 3:00pm
Asked by PLM CSR on Nov 15, 2012 - 04:42
Please take a look at this website explaining how to do this in detail: https://httpkit.com/resources/HTTP-from-the-Command-Line/
Furthermore, please refer to our API documentation for more information: https://todoist.com/API/help
Hi David -- OK, I reviewed those, but PLEASE SIMPLY GIVE ME AN EXAMPLE that will work. I have a time sensitive project and since you all are completely familiar with your program, would it be too much to ask for a working example to jump start this for me? PLEASE! Did I say PLEASE? :-)
James on May 26, 2013 - 13:36
The API docs do not make clear if parameters need to be sent using POST or GET, or if the parameters should be sent as JSON or as part of a query string, or as name=value pairs.
This is why concrete API examples would be useful.
Right now there are only partial usage snippets and vague descriptions, but no full examples (with, say, bogus placeholder tokens or password fields).
For example "/API/login" says "should be HTTPS". It then lists required parameters. Is this a POST? I would guess so. Are they to be sent as json or as name/value pairs? Doesn't say, and there is not example.
Some experimentation suggests it needs to be sent as a JSON string in the request body. But I get a 400 error response. Without an example of what is supposed to be sent, and how, it is very hard to know what is going wrong.
There is an example for "/API/getItemsById" In that case the query is done using query string.
There's another example for "/API/addItem" It also uses a query string. Is this a GET request? That seems odd for updating records, but the example does not say if this is GET or POST or what.