Hey all,
We're looking to change the way Digg data is accessed and contributed via the API in a new version. Our goals are to have a RESTful[1] and easy to understand API that gives power to the developers to create cool new applications. In forth coming versions of the API, people will be able to not only read data, but also contribute data too. As we thought about how to organize these new methods, we found the currently more RESTful URL structure we have may propose some issues.
There are two ideas that we have tossing around and we would like to get feedback from the community, or gather other ideas. The ideas are as follows:
Keep the existing self descriptive url path structure for endpoints for contributing data (RESTful). This would mean, for digging, something like this:
/story/{id}/digg
which is very similar to getting diggs for a story:
/story/{id}/diggs
A change we are thinking about is more of a method based API with a single URL and arguments (REST-like).
/endpoint?method=digg.get&story_id=123
/endpoint?method=digg.new&story_id=123
This method is similar to Flickr's API[3] and Facebook's[4]. The first method, which we currently use, is similar to Twitter's[5].
What do you guys think?
-Jeff
[1] -
http://en.wikipedia.org/wiki/Representational_State_Transfer[2] -
http://en.wikipedia.org/wiki/KISS_principle