A bunch of good info here already, although it seems some commenters have missed that this is about writing an API client library. Generating from an API spec isn't a bad idea, but can often provide a fairly low level interface that may not always be what's needed.
Here are things I'd look for in a good client library:
- Feels at-home in the language, makes use of language idioms.
- Few dependencies, wide version requirements on language and dependencies, needs to fit into a wide range of use-cases.
- Ability to pass in networking/transport options/session/etc. Needs to work behind proxies, with custom networking requirements, custom headers for proxies, or even allow mocking out HTTP for testing.
- Thorough test suite on range of versions.
- Clear costs of calling functions. Time complexity of functions is unlikely to be the limiting factor, but knowing how many HTTP requests a given function makes could significantly change the usage of the library.
- Authentication in as many ways as possible. Many use-cases have wildly different auth requirements. Google's Python packages are quite good at this.
Here are things I'd look for in a good client library:
- Feels at-home in the language, makes use of language idioms.
- Few dependencies, wide version requirements on language and dependencies, needs to fit into a wide range of use-cases.
- Ability to pass in networking/transport options/session/etc. Needs to work behind proxies, with custom networking requirements, custom headers for proxies, or even allow mocking out HTTP for testing.
- Thorough test suite on range of versions.
- Clear costs of calling functions. Time complexity of functions is unlikely to be the limiting factor, but knowing how many HTTP requests a given function makes could significantly change the usage of the library.
- Authentication in as many ways as possible. Many use-cases have wildly different auth requirements. Google's Python packages are quite good at this.