MaxMind.GeoIP2 by MaxMind.GeoIP2

<PackageReference Include="MaxMind.GeoIP2" Version="2.8.0" />

 AbstractCityResponse

Abstract class that city-level response.
public City City { get; }

Gets the city for the requested IP address.

public Location Location { get; }

Gets the location for the requested IP address.

An object representing the most specific subdivision returned. If the response did not contain any subdivisions, this method returns an empty Subdivision object.

public Postal Postal { get; }

Gets the postal object for the requested IP address.

public List<Subdivision> Subdivisions { get; }

An List<T> of Subdivision objects representing the country subdivisions for the requested IP address. The number and type of subdivisions varies by country, but a subdivision is typically a state, province, county, etc. Subdivisions are ordered from most general (largest) to most specific (smallest). If the response did not contain any subdivisions, this method returns an empty array.

Initializes a new instance of the AbstractCityResponse class.

protected AbstractCityResponse(City city = null, Continent continent = null, Country country = null, Location location = null, MaxMind maxMind = null, Postal postal = null, Country registeredCountry = null, RepresentedCountry representedCountry = null, IEnumerable<Subdivision> subdivisions = null, Traits traits = null)

Initializes a new instance of the AbstractCityResponse class.