markembling / MarkEmbling.PostcodesIO

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

.NET 4.5 and async #1

Closed AlistairClark7 closed 7 years ago

AlistairClark7 commented 8 years ago

Hi,

I forked your library and upgraded to .NET 4.5, as well as adding async methods for all the various REST endpoints. Would you like me to create separate versions so the current .NET 4.0 can still be targeted, or would you be happy if I created a pull request and the latest version dropped support for older .NET versions?

Thanks!

AlistairClark7 commented 8 years ago

I'e also started adding the missing API methods too.

markembling commented 8 years ago

This all sounds fantastic. I think dropping .NET 4.0 and below in favour of 4.5 and above is probably fine. Chances are there will always be someone who needs .NET 4.0 support, but more and more libraries are dropping support and I see no reason to not do the same.

I'd be happy to receive a pull request and to roll these changes into the next release on Nuget.

AlistairClark7 commented 8 years ago

Great! I'll finish up adding the rest of the methods and then create a PR. Also, some of the integration tests are failing, as I guess the data has changed. I am not sure what to do about them.

markembling commented 8 years ago

Hmm that's odd. I'll have a look at those when I get a chance - I can't remember off the top of my head, but I'm fairly sure I used data that ought to be fairly stable. Maybe they need revisiting. :-)

AlistairClark7 commented 8 years ago

I think it's just quite minor tweaks. For example in LookupLatLon_simple_query_returns_populated_response the error is

Expected: "GU1 1AA"
But was:  "GU1 9ZZ"

But the expected postcode GU1 1AA is actually returned, it just seems that the order of the postcodes in the response is random. So I guess I can just check to make sure that GU1 1AA is returned somewhere in the list.

markembling commented 8 years ago

I think you might be right there, it sounds correct to me. The mistake was probably mine in that I made assumptions regarding order...