alphagov/gds-api-adapters — pull request #43 by JordanHatch (2013-02-11 18:07:16+00:00)
Title: Add adapter for Mapit

This adds a new adapter to query mapit for a given postcode.

This is designed to replace the double-act of using rack-geo and geo-gov as middleware when making geo lookups, instead providing a single method which can return a Location containing the latitude, longitude and areas.

There's also a few changes to ensure that we're using the RestClient response as a first point of call, not the Net::HTTP response, as the RestClient will correctly inflate any gzip'd content, such as the Mapit api responses.