The document discusses what constitutes good API documentation and provides examples. It argues that good documentation includes technical references, code snippets, tutorials, application samples, and Q&A resources. It also notes that top APIs offer many of these elements, and that while comprehensive documentation is ideal, it also needs to be concise and accessible.
3. Why do we need good documentation?
What qualities distinguish “good”
documentation?
How can we communicate with
developers?
How can we improve existing
documentation?
13. What is good documentation?
A comprehensive,
navigable
resource that
provides users the
information to build
a painless,
maintainable,
successful
integration to your
service.
14. What is good documentation?
A comprehensive,
navigable
resource that
provides users the
information to build
a painless,
maintainable,
successful
integration to your
service.
15. What is good documentation?
A comprehensive,
navigable
resource that
provides users the
information to build
a painless,
maintainable,
successful
integration to your
service.
16. What is good documentation?
A comprehensive,
navigable
resource that
provides users the
information to build
a painless,
maintainable,
successful
integration to your
service.
17. What is good documentation?
A comprehensive,
navigable
resource that
provides users the
information to build
a painless,
maintainable,
successful
integration to your
service.
18. What is good documentation?
A comprehensive,
navigable
resource that
provides users the
information to build
a painless,
maintainable,
successful
integration to your
service.
20. Technical Reference
• Describe everything in
your API
– Even things you don’t want
people to use
• Structure should follow
the structure of the API
– But can intentionally
diverge
• Primarily values:
comprehensive, navigable
• Example: Twitter
25. Code Snippets
• Allow users to learn by
example
• Demonstrate a single call
• Need to be able to
copy/paste content
– Must work!
• Primary values: painless,
readability, simplicity
• Example: Stripe, Twilio
36. Which Languages?
• At least three languages
• At least one raw call/response
sample
• Two additional samples implies
multi-language support
• Popularity
• Target audience
• The more the merrier
• as long as
they’re
maintainable
44. Application Samples
• More fully-fledged
“learning by example”
• Full integration within an
application context
• Larger samples
• More like a POC
• Primary values:
readability, navigability
• Example: Facebook
46. Q&A resources
• There will still be
unanswered questions
– Specific use cases
– Combinations of
resources
• Public answers
benefit the
community
• Primary values:
navigability,
simplicity
50. A comprehensive, navigable resource
that provides users the information
to build a painless, maintainable,
successful integration to your
service.
• Technical Reference
• Sample Code/code snippets
• Tutorials (written, video,
interactive)
• Application Samples
• Q&A resources
52. Top 10 APIs
Tracked
• Facebook
• Google Maps
• Twitter
• YouTube
• AccuWeather
• LinkedIn
• Amazon Product
Advertising
• Pinterest
• Flickr
• Google Talk
Used
• Google Maps
• Twitter
• YouTube
• Flickr
• Amazon Product
Advertising
• Facebook
• Twilio
• Last.fm
• eBay
• Twilio SMS
http://www.programmableweb.com/news/most-popular-apis-least-one-will-surprise-you/2014/01/23
http://www.programmableweb.com/category/all/apis?order=field_popularity *As of 2014-09-13
53. What documentation do they
offer?
Technical
Reference
Code
Snippets Tutorials
Interactive
Console SDK
Application
Samples Q&A
Facebook yes yes yes yes yes yes yes
Google Maps yes yes yes no yes no stack overflow
Twitter yes JSON only yes yes some no yes
YouTube yes yes yes yes yes no stack overflow
AccuWeather yes no* yes no no no no
LinkedIn yes yes yes yes 3rd party no yes
Amazon Product
Advertising yes 3rd party yes no 3rd party 3rd party yes
Pinterest yes no yes no yes no no
Flickr yes 3rd party yes yes 3rd party no yes
Google Talk** yes yes yes no yes no yes
Twilio yes yes yes no yes yes yes
Last.fm yes no yes no 3rd party no yes
eBay yes yes yes no*** yes yes yes
Twilio SMS**** yes yes yes no no no yes
* Does provide a JavaScript sample for one resource
** Replaced May 2013, no longer updated
*** Has request validator tool
**** Deprecated
54. Comprehensive vs. Concise?
• Comprehensive
– Full coverage for technical references
– Common use cases for tutorials/samples
• Length becomes an issue
– affects navigation
- dilutes understanding
- impacts maintenance