This class provides a client API for all the GeoIP2 web service's end points. The end points are Country, City, City/ISP/Org, and Omni. Each end point returns a different set of data about an IP address, with Country returning the least data and Omni the most.
Each web service end point is represented by a different model class which contains data about the IP address.
If the web service does not return a particular piece of data for an IP address, the associated property is not populated.
The web service may not return any information for an entire record, in which case all of the properties for that model class will be empty.
Usage
The basic API for this class is the same for all of the web service end points. First you create a web service object with your MaxMind userID and licenseKey, then you call the method corresponding to a specific end point, passing it the IP address you want to look up.
If the request succeeds, the method call will return a model class for the end point you called. This model in turn contains multiple record classes, each of which represents part of the data returned by the web service.
If the request fails, the client class throws an exception.
Exceptions
For details on the possible errors returned by the web service itself, see the GeoIP2 web service documentation.
See Also: Inherited members from object.
|
Initializes a new instance of the MaxMind.GeoIP2.WebServiceClient class. | |
|
Initializes a new instance of the MaxMind.GeoIP2.WebServiceClient class. |
|
City
(string)Returns an MaxMind.GeoIP2.Responses.CityResponse for the specified ip address. |
|
|
CityIspOrg
(string)Returns an MaxMind.GeoIP2.Responses.CityIspOrgResponse for the specified ip address. |
|
|
Country
(string)Returns an MaxMind.GeoIP2.Responses.CountryResponse for the specified ip address. |
|
|
Omni
(string)Returns an MaxMind.GeoIP2.Responses.OmniResponse for the specified ip address. |
Initializes a new instance of the MaxMind.GeoIP2.WebServiceClient class.
Syntax
Parameters
- userID
- Your MaxMind user ID.
- licenseKey
- Your MaxMind license key.
- baseUrl
- The base url to use when accessing the service
- timeout
- Timeout in milliseconds for connection to web service. The default is 3000.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: MaxMind.GeoIP2
Assembly: MaxMind.GeoIP2 (in MaxMind.GeoIP2.dll)
Assembly Versions: 0.3.2.0
Initializes a new instance of the MaxMind.GeoIP2.WebServiceClient class.
Syntax
public WebServiceClient (int userID, string licenseKey, List<string> locales, string host, int timeout)Parameters
- userID
- The user unique identifier.
- licenseKey
- The license key.
- locales
- List of locale codes to use in name property from most preferred to least preferred.
- host
- The base url to use when accessing the service
- timeout
- Timeout in milliseconds for connection to web service. The default is 3000.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: MaxMind.GeoIP2
Assembly: MaxMind.GeoIP2 (in MaxMind.GeoIP2.dll)
Assembly Versions: 0.3.2.0
Returns an MaxMind.GeoIP2.Responses.CityResponse for the specified ip address.
Syntax
public MaxMind.GeoIP2.Responses.CityResponse City (string ipAddress)Parameters
- ipAddress
- The ip address.
Returns
An MaxMind.GeoIP2.Responses.CityResponseRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: MaxMind.GeoIP2
Assembly: MaxMind.GeoIP2 (in MaxMind.GeoIP2.dll)
Assembly Versions: 0.3.2.0
Returns an MaxMind.GeoIP2.Responses.CityIspOrgResponse for the specified ip address.
Syntax
public MaxMind.GeoIP2.Responses.CityIspOrgResponse CityIspOrg (string ipAddress)Parameters
- ipAddress
- The ip address.
Returns
An MaxMind.GeoIP2.Responses.CityIspOrgResponseRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: MaxMind.GeoIP2
Assembly: MaxMind.GeoIP2 (in MaxMind.GeoIP2.dll)
Assembly Versions: 0.3.2.0
Returns an MaxMind.GeoIP2.Responses.CountryResponse for the specified ip address.
Syntax
public MaxMind.GeoIP2.Responses.CountryResponse Country (string ipAddress)Parameters
- ipAddress
- The ip address.
Returns
An MaxMind.GeoIP2.Responses.CountryResponseRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: MaxMind.GeoIP2
Assembly: MaxMind.GeoIP2 (in MaxMind.GeoIP2.dll)
Assembly Versions: 0.3.2.0
Returns an MaxMind.GeoIP2.Responses.OmniResponse for the specified ip address.
Syntax
public MaxMind.GeoIP2.Responses.OmniResponse Omni (string ipAddress)Parameters
- ipAddress
- The ip address.
Returns
An MaxMind.GeoIP2.Responses.OmniResponseRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: MaxMind.GeoIP2
Assembly: MaxMind.GeoIP2 (in MaxMind.GeoIP2.dll)
Assembly Versions: 0.3.2.0