BookSearchApiClient is a simple class that makes a call to a http API to retrieve a list of books and return them.
You need to refactor the BookSearchApiClient class, and demonstrate in example-client.js how it would be used. Refactor to what you consider to be production ready code. You can change it in anyway you would like and can use javascript or typescript.
Things you will be asked about:
- How could you easily add other book seller APIs in the the future
- How would you manage differences in response payloads between different APIs without needing to make future changes to whatever code you have in example-client.js
- How would you implement different query types for example: by publisher, by year published etc
- How your code would be tested