GTGOnline icon indicating copy to clipboard operation
GTGOnline copied to clipboard

API: some methods are using the wrong HTTP verb

Open Kernald opened this issue 11 years ago • 2 comments

Some methods are currently POST methods, but should be GET:

  • tags/all
  • tasks/serial
  • user/auth_gtg (by the way, auth_gtg is member of GTG API: the name should be auth only, as we know we're talking about GTG)

Should be DELETE:

  • tasks/delete

Should be PUT:

  • tasks/bulk_update

See here about HTTP verbs meanings: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

Kernald avatar Oct 03 '13 15:10 Kernald

@Kernald - I've modified Task Update and Delete methods to PUT and DELETE respectively. The rest methods will be updated when the auth_token is implemented to replace username and password. I've also updated all the URIs. Gathered them to one place in - api/ and modified some names. Please check the changes on the docs page. I'll close this issue when the remaining methods which should be GET are changed to it

parinporecha avatar Oct 03 '13 19:10 parinporecha

While you're changing the API path, you should maybe add a version number, something like that: /api/v1/tags/all. This way, if one day you need to rewrite the API in a non-compatible way, you can let the previous one for a while, waiting for devs to migrate to the new one.

Kernald avatar Oct 03 '13 22:10 Kernald