Real-world Patterns 3: Dynamism and Examples

Key points in this video

Dynamic documentation

  • Content can change dynamically.
  • For instance, if the user is signed in to the service, placeholder values like API tokens are replaced with their actual details, so they can copy working samples or test with working data.
  • Tip: Make sure to communicate clearly to the user that these are their actual tokens.

Code examples

  • Examples of making the API call with different languages or tools
  • Usually embedded in the reference docs alongside each endpoint, but can also be found in other places
  • Often present at the right end of a two- or three-panel view
  • Can be very helpful for devs with less API experience
  • Usually make use of the API’s library for that language if available
  • Tip: Ensure examples are syntactically correct, and, if possible, idiomatic to the language.
  • Tip: Don’t forget syntax highlighting. Colour helps users parse text tokens easier.




Complete and Continue  
Discussion

0 comments