News for hackers. Stuff that matters.
Re:APIs – a beginners’ guide by seivan on Friday January 25, 2013 @05:18PM (#5118029)
For restful HTTP...

I like to keep my API strict resources, and nest them if necessary. Also avoid using more than 4-5 verbs per resource. https://github.com/seivan/DocumentationExample

POST, PUT, GET (member), GET (collection) and DELETE on a resource and nothing more. If a resource needs different kinds of colletions (say a filter) I'd use query parameters.

This makes working with API's as a consumer so much easier, especially as a iOS developer. :-)

Very Rails like, I know. I tend only to use the resources and/or resource method keywords. No custom matches and etc. Not for the API anyways. Just my two cents.

There are no comments on this comment yet.