public class GeoInterface
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METHOD_BATCH_CORRECT_LOCATION |
static java.lang.String |
METHOD_CORRECT_LOCATION |
static java.lang.String |
METHOD_GET_LOCATION |
static java.lang.String |
METHOD_GET_PERMS |
static java.lang.String |
METHOD_PHOTOS_FOR_LOCATION |
static java.lang.String |
METHOD_REMOVE_LOCATION |
static java.lang.String |
METHOD_SET_CONTEXT |
static java.lang.String |
METHOD_SET_LOCATION |
static java.lang.String |
METHOD_SET_PERMS |
| Constructor and Description |
|---|
GeoInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transport) |
| Modifier and Type | Method and Description |
|---|---|
void |
batchCorrectLocation(GeoData location,
java.lang.String placeId,
java.lang.String woeId)
Correct the places hierarchy for all the photos for a user at a given latitude, longitude and accuracy.
|
void |
correctLocation(java.lang.String photoId,
java.lang.String placeId,
java.lang.String woeId) |
GeoData |
getLocation(java.lang.String photoId)
Get the geo data (latitude and longitude and the accuracy level) for a photo.
|
GeoPermissions |
getPerms(java.lang.String photoId)
Get permissions for who may view geo data for a photo.
|
PhotoList<Photo> |
photosForLocation(GeoData location,
java.util.Set<java.lang.String> extras,
int perPage,
int page)
Return a list of photos for a user at a specific latitude, longitude and accuracy.
|
void |
removeLocation(java.lang.String photoId)
Removes the geo data associated with a photo.
|
void |
setContext(java.lang.String photoId,
int context)
Indicate the state of a photo's geotagginess beyond latitude and longitude.
|
void |
setLocation(java.lang.String photoId,
GeoData location)
Sets the geo data (latitude and longitude and, optionally, the accuracy level) for a photo.
|
void |
setPerms(java.lang.String photoId,
GeoPermissions perms)
Set the permission for who may view the geo data associated with a photo.
|
public static final java.lang.String METHOD_GET_LOCATION
public static final java.lang.String METHOD_GET_PERMS
public static final java.lang.String METHOD_REMOVE_LOCATION
public static final java.lang.String METHOD_SET_LOCATION
public static final java.lang.String METHOD_SET_PERMS
public static final java.lang.String METHOD_BATCH_CORRECT_LOCATION
public static final java.lang.String METHOD_CORRECT_LOCATION
public static final java.lang.String METHOD_PHOTOS_FOR_LOCATION
public static final java.lang.String METHOD_SET_CONTEXT
public GeoInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transport)
public GeoData getLocation(java.lang.String photoId) throws FlickrException
photoId - reqired photo id, not nullFlickrException - if photo id is invalid, if photo has no geodata or if any other error has been reported in the response.public GeoPermissions getPerms(java.lang.String photoId) throws FlickrException
photoId - reqired photo id, not nullFlickrException - if photo id is invalid, if photo has no geodata or if any other error has been reported in the response.public void removeLocation(java.lang.String photoId)
throws FlickrException
FlickrExceptionpublic void setLocation(java.lang.String photoId,
GeoData location)
throws FlickrException
photoId - The id of the photo to cet permissions for.location - geo data with optional accuracy (1-16), accuracy 0 to use the default.FlickrExceptionpublic void setPerms(java.lang.String photoId,
GeoPermissions perms)
throws FlickrException
photoId - The id of the photo to set permissions for.perms - Permissions, who can see the geo data of this photoFlickrExceptionpublic void batchCorrectLocation(GeoData location, java.lang.String placeId, java.lang.String woeId) throws FlickrException
Batch corrections are processed in a delayed queue so it may take a few minutes before the changes are reflected in a user's photos.
location - The latitude/longitude and accuracy of the photos to be update.placeId - A Flickr Places ID. (While optional, you must pass either a valid Places ID or a WOE ID.)woeId - A Where On Earth (WOE) ID. (While optional, you must pass either a valid Places ID or a WOE ID.)FlickrExceptionpublic void correctLocation(java.lang.String photoId,
java.lang.String placeId,
java.lang.String woeId)
throws FlickrException
photoId - Photo id (required).placeId - A Flickr Places ID. (While optional, you must pass either a valid Places ID or a WOE ID.)woeId - A Where On Earth (WOE) ID. (While optional, you must pass either a valid Places ID or a WOE ID.)FlickrExceptionpublic PhotoList<Photo> photosForLocation(GeoData location, java.util.Set<java.lang.String> extras, int perPage, int page) throws FlickrException
location - extras - perPage - page - FlickrExceptionExtraspublic void setContext(java.lang.String photoId,
int context)
throws FlickrException
Note : photos passed to this method must already be geotagged (using the setLocation(String, GeoData) method).
photoId - Photo id (required).context - Context is a numeric value representing the photo's geotagginess beyond latitude and longitude. For example, you may wish to indicate that a
photo was taken "indoors" (1) or "outdoors" (2).FlickrException