alphagov/performanceplatform-client — pull request #29 by robyoung (2014-09-17 09:59:59+00:00)
Title: Refactor client and add new admin API endpoints

This pull request does quite a lot. It's intention was simply to add the new routes into the `AdminAPI`. However I discovered that thing were getting quite messy and there was a lot of duplication between the two clients.

## What has been done
1. Pull out a `BaseClient` that is responsible for the HTTP layer (Headers, authorisation, compression, backoff)
1. Refactor both clients to extend from `BaseClient`
1. Add new admin API endpoints

## Things to note
1. Compression is now applied to all writes above the threshold rather than just the backdrop client.
1. The only aspect of the exposed API that has changed is that [`DataSet.get`](https://github.com/alphagov/performanceplatform-client/blob/add-updates-to-admin-client/performanceplatform/client/data_set.py#L55) no longer returns the raw `requests` response. I can't see where this method is being used, or even think why it would ever be used.

## What I'm not happy with
...but not enough to change right now
1. It would be nice the concrete clients used `BaseClient` rather than extending from it.