I'm writing some new API client libraries in a variety of languages (PHP, Java, Ruby, C#, JS, Python) for an API.<p>Is there a list of best practices or a good resource for doing this? Both in general, and language specific?<p>Here are somethings I'd expect to see in such a resource:
- How to handle instantiation of the library (static functions with static API credentials vs new instances of the library with instance variables for API credentials)
- How to pass binary files
- Using required arguments for required parameters of an API operation vs a hash or dictionary
- How to name function calls
- How to structure code/classes in relation to the API's design
- What good client libraries should return or throw as an exception
... and so on