Welcome Guest, Not a member yet? Register   Sign In
Working on a REST API, critique requested
#21

[eluser]Yorick Peterse[/eluser]
[quote author="Phil Sturgeon" date="1244060481"]Got mine fully working with support for JSON, XML, CSV, HTML tables, PHP export and serialization.

It also supports PUT, GET, POST and DELETE perfectly with custom methods for each.

Check out the final code in this article.

Another bonus is you can support multiple puts, deletes, posts, etc within a single controller. That means you can have one rest.php or api.php file for your ENTIRE site, or using modules/sub-directories you can have one for each section.

Quote:/blogs/api/article/id/21
/blog/api/articles/limit/10
/blog/api/comments/limit/5/format/html
/gallery/api/comments/limit/5/format/json
[/quote]

Eventually I'll support those too, but for now I'll stick to XML and JSON Smile




Theme © iAndrew 2016 - Forum software by © MyBB