SDK to integrate your application with IpInfo.Api.
You must have a API implementing IpInfo.Api. You can change the API implementation to consume other service, but the API contract must be the same. So you can use this microservice for all your applications and the need to change the final service, you change in one place.
PM> Install-Package IpInfo.Api.Client
IIpInfoApiClient ipInfoClient = new IpInfoApiClient("http://localhost:505");
BaseResponse<GetIpInfoResponse> response = ipInfoClient.GetIpInfo("186.221.52.144");
if (response.StatusCode == HttpStatusCode.OK)
{
// response.Data.Country : 'BR'
// response.Data.City : 'Búzios'
// response.Data.State : 'Rio de Janeiro'
// response.Data.Latitude : -22.756633
// response.Data.Longitude : -41.8913727
}
Please, refer to CONTRIBUTING
Open a new Issue following our issue template ISSUE-TEMPLATE
See in nuget version history