public final class CityResponse extends AbstractResponse
This class provides a model for the data returned by the GeoIP2 Precision: City end point.
The only difference between the City and Insights model classes is which fields in each record may be populated.
Constructor and Description |
---|
CityResponse() |
Modifier and Type | Method and Description |
---|---|
City |
getCity() |
Continent |
getContinent() |
Country |
getCountry() |
Location |
getLocation() |
MaxMind |
getMaxMind() |
Subdivision |
getMostSpecificSubdivision() |
Postal |
getPostal() |
Country |
getRegisteredCountry() |
RepresentedCountry |
getRepresentedCountry() |
List<Subdivision> |
getSubdivisions() |
Traits |
getTraits() |
String |
toString() |
toJson
public City getCity()
public Location getLocation()
public Postal getPostal()
public List<Subdivision> getSubdivisions()
List
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.public Subdivision getMostSpecificSubdivision()
Subdivision
object.public String toString()
public Continent getContinent()
public Country getCountry()
public MaxMind getMaxMind()
public Country getRegisteredCountry()
public RepresentedCountry getRepresentedCountry()
public Traits getTraits()
Copyright © 2014 MaxMind, Inc.. All Rights Reserved.