What are some of the characteristics that would make a great news platform API?
|
5
|
For any API, simplicity and documentation (lots of usage examples!) are probably the top considerations. But it's interesting to think about what's special to news. A few thoughts:
|
||
|
|
|
3
|
Make it RESTful! Web frameworkwise, were you to use Django, the leading tool is Piston. As my Ruby on Rails ignorance is vast, all I have to offer is this. (After further Googling, If you prefer Ruby (without the "on Rails"), there's a whole separate Ruby framework you might want to look at, Sinatra.) |
|||
|
|
3
|
To me, the first characteristic of a great news platform API is great content. If you find yourself saying, "I wish that we had an API for X", then it might reason that others have the same need (or would see it if the API was built). But going with what you know is a good start: articles, photos, comments, newsroom data. If you haven't worked with APIs much, build something that you will use yourself. That will make you much more aware of how design decisions can impact the spread and usefulness of an API. I learned this many times over doing our Congress API. |
||
|
|
|
0
|
Assuming the API you're referring to is a read API (ie, it will be used to consume data from your app rather than input data into it), having an RSS/Atom feed is already a decent start. If you're using a mature CMS, RSS is most likely already built in. If you're rolling your own, you probably want to add it as early as you can. It's not too hard, and most languages have libraries to make it simpler. Ideally you'd want to make sure that the feed contains the entire story (ie, not only a summary version) and provide feeds for any data you'd expect the API users to consume (comments, search results, etc). Also, one of the often overlooked benefits of RSS is auto discovery - which, among other things, allows browsers to display the RSS icon by the address bar, for example in this page - using it correctly lets developers easily map content URLs to their relevant API ones. |
|||
|
|
0
|
The Guardian has been a big proponent of news APIs, and seems to have found several ways to make their news content and data sets useful. I'd be careful about giving the cow away, so to speak, in terms of allowing downloads of your data, but that's something that's probably unavoidable. I think some good uses would be:
|
||
|
|