Designing Great API Docs
blog.parse.com
blog.parse.com
Last year I started using Amazon's Flexible Payment Service (FPS) and their docs were so out of date that they linked me to a PHP library that was over three years old and already deprecated. I spent weeks getting my billing system working and then as soon as it went live I got an email from Amazon telling me that I was using a deprecated library that was being phased out in the next few months.
I also had the same experience with Twilio, although luckily with them the old library didn't work at all so I didn't waste time developing with it.
Updating basic things like links to helper libraries can save your customers countless hours of headaches and frustration.
For instance, code examples (snippets or sample projects) should be actually compiled and tested, automatically, every time the docs or the API itself changes. Think of it as CI for your documentation.
There's also a startup dedicated to (startup) API docs :) http://turnapi.com/
For example, this API method (comes from real docs) is far from RESTful and leaves me guessing; what's the path for POST-PUT-DELETE (note, when I looked in the docs, API paths for those methods were not named POST/PUT/DELETE like this one is named get...)?
https://myapp.com/api/v2/USERNAME/KEY/xml/company/get
I won't rant about API design as some HN'ers have posted excellent articles on proper RESTful API design already.Docs that are out of date (I loathe developers that don't keep API docs up-to-date), misspell in examples or have un-tested examples, or generally are confusing to navigate are ridiculously unfriendly.
It takes the API explorer model to the next level....and integrates with documentation.
You get up to date docs + API explorer + code stubs. Is this the future?
It seems to me that as open source software has risen, good documentation has declined. That is probably inevitable, but it doesn't make it good.
If you can wrap your mind around making your documentation every bit as elegant as your code, you'll win friends and score career points.
I see that GitHub says their API is Open Source, but is that the actually contributing to the API examples, or the actual code?