So I put together a rudimentary REST API for OpenGuides. At the moment it only redirects you to the regular OG script with the appropriate parameters, but I'd like to make it The One True Way eventually.
Check it out:
http://london.openguides.org/api/Locale_Docklands http://london.openguides.org/api/rdf/Locale_Docklands
http://london.openguides.org/api/rdf/RecentChanges
http://london.openguides.org/api/userstats/Earle http://london.openguides.org/api/rdf/userstats/Earle http://london.openguides.org/api/rdf/userstats/Earle/nominor http://london.openguides.org/api/rdf/userstats/Earle/20 http://london.openguides.org/api/rdf/userstats/Earle/20/nominor
http://london.openguides.org/api/rdf/category/River http://london.openguides.org/api/rdf/category/River/20 http://london.openguides.org/api/rdf/category/River/nominor
http://london.openguides.org/api/rdf/locale/Southwark http://london.openguides.org/api/rdf/locale/Southwark/20 http://london.openguides.org/api/rdf/locale/Southwark/nominor
Bug reports welcome.
----- Original Message ----- From: "Earle Martin" openguides@downlode.org To: openguides-dev@openguides.org Sent: 14 May 2005 01:48 Subject: [OpenGuides-Dev] REST API
So I put together a rudimentary REST API for OpenGuides. At the moment it only redirects you to the regular OG script with the appropriate parameters, but I'd like to make it The One True Way eventually.
Check it out:
http://london.openguides.org/api/Locale_Docklands http://london.openguides.org/api/rdf/Locale_Docklands
http://london.openguides.org/api/rdf/RecentChanges
http://london.openguides.org/api/userstats/Earle http://london.openguides.org/api/rdf/userstats/Earle http://london.openguides.org/api/rdf/userstats/Earle/nominor http://london.openguides.org/api/rdf/userstats/Earle/20 http://london.openguides.org/api/rdf/userstats/Earle/20/nominor
http://london.openguides.org/api/rdf/category/River http://london.openguides.org/api/rdf/category/River/20 http://london.openguides.org/api/rdf/category/River/nominor
http://london.openguides.org/api/rdf/locale/Southwark http://london.openguides.org/api/rdf/locale/Southwark/20 http://london.openguides.org/api/rdf/locale/Southwark/nominor
Any chance of a peek at the code :)
Also, what do you see as the benefits of REST over plain vanilla CGI?
Ivor.
On Sat, May 14, 2005 at 11:56:10AM +0100, IvorW wrote:
Any chance of a peek at the code :)
Yep, it's nothing very special: http://london.openguides.org/api.txt
New: api/edit/Foo
Also, what do you see as the benefits of REST over plain vanilla CGI?
Actually, from what I've just been reading our existing CGI was pretty much REST already. I think I should have titled my post "cleaner URLs".
A side-effect of this - as pointed out by Jody on IRC - is that it creates a class of reserved words that can't be page names ('rdf', 'userstats', etc., and just numbers). I don't see this as a huge problem, though.
On Sat, May 14, 2005 at 08:23:38PM +0100, Earle Martin wrote:
New: api/edit/Foo
Forgot to mention, next I want to extend it so that you can POST data (i.e. to create pages) as well.
On Sat, May 14, 2005 at 08:23:38PM +0100, Earle Martin wrote:
On Sat, May 14, 2005 at 11:56:10AM +0100, IvorW wrote:
Any chance of a peek at the code :)
Yep, it's nothing very special
Sorry, I just discovered that I introduced a bug a few minutes ago and I've removed the source file temporarily. I'll drop a line here when I've fixed the problem.
On Sat, May 14, 2005 at 08:47:22PM +0100, Earle Martin wrote:
Sorry, I just discovered that I introduced a bug a few minutes ago and I've removed the source file temporarily. I'll drop a line here when I've fixed the problem.
Trivial fix, back again now.
Sorry for the flurry of replies to myself!
This one time, at band camp, Earle Martin wrote:
So I put together a rudimentary REST API for OpenGuides. At the moment it only redirects you to the regular OG script with the appropriate parameters, but I'd like to make it The One True Way eventually.
Any pointers on what REST is?
On Sun, May 15, 2005 at 02:05:21AM +0100, Rev Simon Rumble wrote:
Any pointers on what REST is?
zx
On Sat, May 14, 2005 at 06:25:32PM -0700, Jo Walsh wrote:
On Sun, May 15, 2005 at 02:05:21AM +0100, Rev Simon Rumble wrote:
Any pointers on what REST is?
I would say also http://en.wikipedia.org/wiki/Representational_State_Transfer
openguides-dev@lists.openguides.org