markembling / MarkEmbling.PostcodesIO

.NET library for interacting with the excellent Postcodes.io service.
MIT License
23 stars 16 forks source link

Distance not included when using Nearest #21

Closed funkysi1701 closed 3 years ago

funkysi1701 commented 3 years ago

I have noticed that when calling https://api.postcodes.io/postcodes/:postcode/nearest the distance is returned, however it is not returned when using Nearest(postcode) or NearestAsync(postcode)

I have forked your code to fix this, happy to create a PR if this is helpful?

markembling commented 3 years ago

I imagine there are a few things which are missing now - I haven't had a chance to keep this as up to date as I'd have liked. If you're happy to create a PR, by all means please do 😄

funkysi1701 commented 3 years ago

Thanks I have create a PR for review. Not done much contributing to OS before so let me know if I have done it wrong

markembling commented 3 years ago

I've merged that in and pushed out a new version of the package to nuget.

The only addition I did beyond your PR was to update the tests for the nearest bits. The tests worked just fine as they were (since this was just an addition, what was there before still passed) but now they are included.

Thanks again for this.