Post History
The purpose of API documentation is to explain how to use the API. Providing sample code of how to use key features is a good way to demonstrate the intended usage. A good example of this is the ...
Answer
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/33591 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
The purpose of API documentation is to explain how to use the API. Providing sample code of how to use key features is a good way to demonstrate the intended usage. A good example of this is the [ZMQ guide](http://zguide.zeromq.org/page:all). It has example code in a large number of languages to go with each of the of the concepts discussed. They combat the bloat by displaying links to the example code in every language the library is supported in. Only when a link is clicked on is the code displayed.