An open API service indexing awesome lists of open source software.

https://github.com/markembling/markembling.postcodesio

.NET library for interacting with the excellent Postcodes.io service.
https://github.com/markembling/markembling.postcodesio

api dotnet dotnet-standard library postcodes postcodesio

Last synced: about 1 year ago
JSON representation

.NET library for interacting with the excellent Postcodes.io service.

Awesome Lists containing this project

README

          

MarkEmbling.PostcodesIO
=======================

.NET library for interacting with the excellent [Postcodes.io][1] service.

### Usage

var client = new PostcodesIOClient();
var result = client.Lookup("GU1 1AA");
// result contains properties such as Latitude, Longitude, Region, County and so on...

Check out the integration tests (`MarkEmbling.PostcodesIO.Tests`) for further examples.

Do not instantiate a new instance of PostocdesIOClient for each request. If you use a dependency-injection container, register the client as a singleton.

Supports .NET Framework 4.7.2 and above, and .NET Standard 2.0 onwards.

----------

This library is still a work-in-progress. More examples and documentation will come soon, along with the missing API methods.

In the meantime, the package is [available on NuGet][2]:

PM> Install-Package MarkEmbling.PostcodesIO

Be aware: the API may fluctuate until it hits v1.0. But I think it's already going down the right path, so we're probably fine for the most part. But as always, use at your own risk.

### Contributions

Feel free to make contributions via a pull request. Please keep the tests current (and add, if necessary).

[1]: http://postcodes.io/
[2]: https://www.nuget.org/packages/MarkEmbling.PostcodesIO/