Implement most of current api client.

Still needs filter and sort queries for getMessages.