[uf-discuss] Microformats for Write APIs

gareth rushgrove gareth at morethanseven.net
Mon Feb 18 15:51:52 PST 2008


Hi Guys

[this post reposted to discuss after a brief outing on dev -
http://microformats.org/discuss/mail/microformats-dev/2008-February/000447.html]

A post to this list [ok, I got the wrong list first time round] seemed
in order after a few discussions at SemanticCamp over the weekend. At
this stage this is basically a
pre-idea, floated to see if their is any general interest.

The idea of using Microformats as a replacement for a seperate API
layer has been mooted for a while*. But in general this has been a
discussion about Read APIs (ie. asking for data) as apposed to Write
APIs (ie. adding data).

I'm interested in the idea of using microformats to auto-discover
Write API functions. So a simple case might be:

1. Point a parser at a blog post page
2. Parser establishes that a form exists
3. Parser works out the method (GET, POST, PUT, DELETE, etc.)
4. Parser works out the form parameters, their input types and whether
or not they are required
5. Parser can produce API docs

So for instance taking Flickr as an example. Flickr allows comments on
Photos from the photo page. eg.
http://www.flickr.com/photos/garethr/2275608910/

Flickr also allows you to add comments via the API.
http://www.flickr.com/services/api/flickr.photos.comments.addComment.html

Standardisation might be interesting here as well. For instance back
to blog comments. Comments from within aggregators would likely be
simpler where comment form definitions can be established
programmatically.

Let me know what you think about the general idea.

Gareth

* http://allinthehead.com/retro/301/can-your-website-be-your-api

-- 
Gareth Rushgrove
garethrushgrove.com
morethanseven.net
getjobsin.com
isitbirthday.com


More information about the microformats-discuss mailing list