winterwell.jtwitter
Class Place
java.lang.Object
winterwell.jtwitter.Place
- All Implemented Interfaces:
- java.io.Serializable
public class Place
- extends java.lang.Object
- implements java.io.Serializable
Support for Twitter's geo location features.
Status: experimental & subject to change!
- See Also:
- Serialized Form
|
Nested Class Summary |
static class |
Place.LatLong
A latitude-longitude coordinate. |
|
Constructor Summary |
Place(winterwell.json.JSONObject _place)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Place
public Place(winterwell.json.JSONObject _place)
throws winterwell.json.JSONException
- Throws:
winterwell.json.JSONException
getBoundingBox
public java.util.List<Place.LatLong> getBoundingBox()
- Returns:
- list of lat/long pairs. Can be null
getCountryCode
public java.lang.String getCountryCode()
getCountryName
public java.lang.String getCountryName()
getGeometry
public java.util.List<Place.LatLong> getGeometry()
- Returns:
- list of lat/long pairs. Usually null
getId
public java.lang.String getId()
- Note: this is not a number.
getInfoUrl
public java.lang.String getInfoUrl()
- Call this to get a JSON object with a lot of details.
TODO wrap this in TwitterPlace
getName
public java.lang.String getName()
getType
public java.lang.String getType()
- Returns:
- e.g. "city", "admin" Often "admin" (which covers anything), so
it's not clear how useful this is!
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object