simple API client with tests to cover it