|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aetrion.flickr.photos.PhotosInterface
public class PhotosInterface
Interface for working with Flickr Photos.
Field Summary | |
---|---|
static java.lang.String |
METHOD_ADD_TAGS
|
static java.lang.String |
METHOD_DELETE
|
static java.lang.String |
METHOD_GET_ALL_CONTEXTS
|
static java.lang.String |
METHOD_GET_CONTACTS_PHOTOS
|
static java.lang.String |
METHOD_GET_CONTACTS_PUBLIC_PHOTOS
|
static java.lang.String |
METHOD_GET_CONTEXT
|
static java.lang.String |
METHOD_GET_COUNTS
|
static java.lang.String |
METHOD_GET_EXIF
|
static java.lang.String |
METHOD_GET_FAVORITES
|
static java.lang.String |
METHOD_GET_INFO
|
static java.lang.String |
METHOD_GET_INTERESTINGNESS
|
static java.lang.String |
METHOD_GET_NOT_IN_SET
|
static java.lang.String |
METHOD_GET_PERMS
|
static java.lang.String |
METHOD_GET_RECENT
|
static java.lang.String |
METHOD_GET_SIZES
|
static java.lang.String |
METHOD_GET_UNTAGGED
|
static java.lang.String |
METHOD_GET_WITH_GEO_DATA
|
static java.lang.String |
METHOD_GET_WITHOUT_GEO_DATA
|
static java.lang.String |
METHOD_RECENTLY_UPDATED
|
static java.lang.String |
METHOD_REMOVE_TAG
|
static java.lang.String |
METHOD_SEARCH
|
static java.lang.String |
METHOD_SET_CONTENTTYPE
|
static java.lang.String |
METHOD_SET_DATES
|
static java.lang.String |
METHOD_SET_META
|
static java.lang.String |
METHOD_SET_PERMS
|
static java.lang.String |
METHOD_SET_SAFETYLEVEL
|
static java.lang.String |
METHOD_SET_TAGS
|
Constructor Summary | |
---|---|
PhotosInterface(java.lang.String apiKey,
Transport transport)
|
Method Summary | |
---|---|
void |
addTags(java.lang.String photoId,
java.lang.String[] tags)
Add tags to a photo. |
void |
delete(java.lang.String photoId)
Delete a photo from flickr. |
java.util.List |
getAllContexts(java.lang.String photoId)
Returns all visble sets and pools the photo belongs to. |
PhotoList |
getContactsPhotos(int count,
boolean justFriends,
boolean singlePhoto,
boolean includeSelf)
Get photos from the user's contacts. |
PhotoList |
getContactsPublicPhotos(java.lang.String userId,
int count,
boolean justFriends,
boolean singlePhoto,
boolean includeSelf)
Get public photos from the user's contacts. |
PhotoList |
getContactsPublicPhotos(java.lang.String userId,
java.util.Set extras,
int count,
boolean justFriends,
boolean singlePhoto,
boolean includeSelf)
|
PhotoContext |
getContext(java.lang.String photoId)
Get the context for the specified photo. |
java.util.Collection |
getCounts(java.util.Date[] dates,
java.util.Date[] takenDates)
Gets a collection of photo counts for the given date ranges for the calling user. |
java.util.Collection |
getExif(java.lang.String photoId,
java.lang.String secret)
Get the Exif data for the photo. |
java.util.Collection |
getFavorites(java.lang.String photoId,
int perPage,
int page)
Returns the list of people who have favorited a given photo. |
GeoInterface |
getGeoInterface()
Get the geo interface. |
java.awt.image.BufferedImage |
getImage(Photo photo,
int size)
Request an image from the Flickr-servers. |
java.awt.image.BufferedImage |
getImage(java.lang.String urlStr)
Download of an image by URL. |
java.io.InputStream |
getImageAsStream(Photo photo,
int size)
Request an image from the Flickr-servers. |
Photo |
getInfo(java.lang.String photoId,
java.lang.String secret)
Get all info for the specified photo. |
PhotoList |
getNotInSet(int perPage,
int page)
Return a collection of Photo objects not in part of any sets. |
Permissions |
getPerms(java.lang.String photoId)
Get the permission information for the specified photo. |
Photo |
getPhoto(java.lang.String id)
Get the photo for the specified ID. |
Photo |
getPhoto(java.lang.String id,
java.lang.String secret)
Get the photo for the specified ID with the given secret. |
PhotoList |
getRecent(int perPage,
int page)
Get a collection of recent photos. |
java.util.Collection |
getSizes(java.lang.String photoId)
Get the available sizes of a Photo. |
PhotoList |
getUntagged(int perPage,
int page)
Get the collection of untagged photos. |
PhotoList |
getWithGeoData(java.util.Date minUploadDate,
java.util.Date maxUploadDate,
java.util.Date minTakenDate,
java.util.Date maxTakenDate,
int privacyFilter,
java.lang.String sort,
java.util.Set extras,
int perPage,
int page)
Returns a list of your geo-tagged photos. |
PhotoList |
getWithoutGeoData(java.util.Date minUploadDate,
java.util.Date maxUploadDate,
java.util.Date minTakenDate,
java.util.Date maxTakenDate,
int privacyFilter,
java.lang.String sort,
java.util.Set extras,
int perPage,
int page)
Returns a list of your photos which haven't been geo-tagged. |
PhotoList |
recentlyUpdated(java.util.Date minDate,
java.util.Set extras,
int perPage,
int page)
Return a list of your photos that have been recently created or which have been recently modified. |
void |
removeTag(java.lang.String tagId)
Remove a tag from a photo. |
PhotoList |
search(SearchParameters params,
int perPage,
int page)
Search for photos which match the given search parameters. |
PhotoList |
searchInterestingness(SearchParameters params,
int perPage,
int page)
Search for interesting photos using the Flickr Interestingness algorithm. |
void |
setContentType(java.lang.String photoId,
java.lang.String contentType)
Set the content type of a photo. |
void |
setDates(java.lang.String photoId,
java.util.Date datePosted,
java.util.Date dateTaken,
java.lang.String dateTakenGranularity)
Set the dates for the specified photo. |
void |
setMeta(java.lang.String photoId,
java.lang.String title,
java.lang.String description)
Set the meta data for the photo. |
void |
setPerms(java.lang.String photoId,
Permissions permissions)
Set the permissions for the photo. |
void |
setSafetyLevel(java.lang.String photoId,
java.lang.String safetyLevel,
java.lang.Boolean hidden)
Set the safety level (adultness) of a photo. |
void |
setTags(java.lang.String photoId,
java.lang.String[] tags)
Set the tags for a photo. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String METHOD_ADD_TAGS
public static final java.lang.String METHOD_DELETE
public static final java.lang.String METHOD_GET_ALL_CONTEXTS
public static final java.lang.String METHOD_GET_CONTACTS_PHOTOS
public static final java.lang.String METHOD_GET_CONTACTS_PUBLIC_PHOTOS
public static final java.lang.String METHOD_GET_CONTEXT
public static final java.lang.String METHOD_GET_COUNTS
public static final java.lang.String METHOD_GET_EXIF
public static final java.lang.String METHOD_GET_FAVORITES
public static final java.lang.String METHOD_GET_INFO
public static final java.lang.String METHOD_GET_NOT_IN_SET
public static final java.lang.String METHOD_GET_PERMS
public static final java.lang.String METHOD_GET_RECENT
public static final java.lang.String METHOD_GET_SIZES
public static final java.lang.String METHOD_GET_UNTAGGED
public static final java.lang.String METHOD_GET_WITH_GEO_DATA
public static final java.lang.String METHOD_GET_WITHOUT_GEO_DATA
public static final java.lang.String METHOD_RECENTLY_UPDATED
public static final java.lang.String METHOD_REMOVE_TAG
public static final java.lang.String METHOD_SEARCH
public static final java.lang.String METHOD_SET_CONTENTTYPE
public static final java.lang.String METHOD_SET_DATES
public static final java.lang.String METHOD_SET_META
public static final java.lang.String METHOD_SET_PERMS
public static final java.lang.String METHOD_SET_SAFETYLEVEL
public static final java.lang.String METHOD_SET_TAGS
public static final java.lang.String METHOD_GET_INTERESTINGNESS
Constructor Detail |
---|
public PhotosInterface(java.lang.String apiKey, Transport transport)
Method Detail |
---|
public GeoInterface getGeoInterface()
public void delete(java.lang.String photoId) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
-
org.xml.sax.SAXException
java.io.IOException
FlickrException
public java.util.List getAllContexts(java.lang.String photoId) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo to return information for.
PhotoPlace
objects
java.io.IOException
org.xml.sax.SAXException
FlickrException
public void addTags(java.lang.String photoId, java.lang.String[] tags) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDtags
- The tags
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList getContactsPhotos(int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
count
- The number of photos to returnjustFriends
- Set to true to only show friends photossinglePhoto
- Set to true to get a single photoincludeSelf
- Set to true to include self
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList getContactsPublicPhotos(java.lang.String userId, int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
userId
- The user IDcount
- The number of photos to returnjustFriends
- True to include friendssinglePhoto
- True to get a single photoincludeSelf
- True to include self
java.io.IOException
org.xml.sax.SAXException
FlickrException
Extras
public PhotoList getContactsPublicPhotos(java.lang.String userId, java.util.Set extras, int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoContext getContext(java.lang.String photoId) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo ID
java.io.IOException
org.xml.sax.SAXException
FlickrException
public java.util.Collection getCounts(java.util.Date[] dates, java.util.Date[] takenDates) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
dates
- An array of dates, denoting the periods to return counts for.
They should be specified smallest first.takenDates
- An array of dates, denoting the periods to return
counts for. They should be specified smallest first.
java.io.IOException
org.xml.sax.SAXException
FlickrException
public java.util.Collection getFavorites(java.lang.String photoId, int perPage, int page) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- perPage
- page
-
java.io.IOException
org.xml.sax.SAXException
FlickrException
public java.util.Collection getExif(java.lang.String photoId, java.lang.String secret) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDsecret
- The secret
java.io.IOException
org.xml.sax.SAXException
FlickrException
public Photo getInfo(java.lang.String photoId, java.lang.String secret) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo Idsecret
- The optional secret String
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList getNotInSet(int perPage, int page) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
perPage
- The per pagepage
- The page
java.io.IOException
org.xml.sax.SAXException
FlickrException
public Permissions getPerms(java.lang.String photoId) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo id
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList getRecent(int perPage, int page) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
perPage
- The number of photos per pagepage
- The page offset
java.io.IOException
org.xml.sax.SAXException
FlickrException
public java.util.Collection getSizes(java.lang.String photoId) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo ID
Size
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList getUntagged(int perPage, int page) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
perPage
- page
-
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList getWithGeoData(java.util.Date minUploadDate, java.util.Date maxUploadDate, java.util.Date minTakenDate, java.util.Date maxTakenDate, int privacyFilter, java.lang.String sort, java.util.Set extras, int perPage, int page) throws FlickrException, java.io.IOException, org.xml.sax.SAXException
minUploadDate
- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. Set to null to not specify a date.maxUploadDate
- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. Set to null to not specify a date.minTakenDate
- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. Set to null to not specify a date.maxTakenDate
- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. Set to null to not specify a date.privacyFilter
- Return photos only matching a certain privacy level. Valid values are:
sort
- The order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.extras
- A set of Strings controlling the extra information to fetch for each returned record. Currently supported fields are: license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo. Set to null or an empty set to not specify any extras.perPage
- Number of photos to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.page
- The page of results to return. If this argument is 0, it defaults to 1.
FlickrException
java.io.IOException
org.xml.sax.SAXException
Extras
public PhotoList getWithoutGeoData(java.util.Date minUploadDate, java.util.Date maxUploadDate, java.util.Date minTakenDate, java.util.Date maxTakenDate, int privacyFilter, java.lang.String sort, java.util.Set extras, int perPage, int page) throws FlickrException, java.io.IOException, org.xml.sax.SAXException
minUploadDate
- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. Set to null to not specify a date.maxUploadDate
- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. Set to null to not specify a date.minTakenDate
- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. Set to null to not specify a date.maxTakenDate
- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. Set to null to not specify a date.privacyFilter
- Return photos only matching a certain privacy level. Valid values are:
sort
- The order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.extras
- A set of Strings controlling the extra information to fetch for each returned record. Currently supported fields are: license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo. Set to null or an empty set to not specify any extras.perPage
- Number of photos to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.page
- The page of results to return. If this argument is 0, it defaults to 1.
FlickrException
java.io.IOException
org.xml.sax.SAXException
Extras
public PhotoList recentlyUpdated(java.util.Date minDate, java.util.Set extras, int perPage, int page) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
minDate
- Date indicating the date from which modifications should be compared. Must be given.extras
- A set of Strings controlling the extra information to fetch for each returned record. Currently supported fields are: license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo. Set to null or an empty set to not specify any extras.perPage
- Number of photos to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.page
- The page of results to return. If this argument is 0, it defaults to 1.
org.xml.sax.SAXException
java.io.IOException
FlickrException
Extras
public void removeTag(java.lang.String tagId) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
tagId
- The tag ID
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList search(SearchParameters params, int perPage, int page) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
params
- The search parametersperPage
- The number of photos to show per pagepage
- The page offset
java.io.IOException
org.xml.sax.SAXException
FlickrException
public PhotoList searchInterestingness(SearchParameters params, int perPage, int page) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
params
- Any search parametersperPage
- Number of items per pagepage
- The page to start on
java.io.IOException
org.xml.sax.SAXException
FlickrException
public void setContentType(java.lang.String photoId, java.lang.String contentType) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDcontentType
- The contentType to set
java.io.IOException
org.xml.sax.SAXException
FlickrException
Flickr.CONTENTTYPE_PHOTO
,
Flickr.CONTENTTYPE_SCREENSHOT
,
Flickr.CONTENTTYPE_OTHER
public void setDates(java.lang.String photoId, java.util.Date datePosted, java.util.Date dateTaken, java.lang.String dateTakenGranularity) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDdatePosted
- The date the photo was posted or nulldateTaken
- The date the photo was taken or nulldateTakenGranularity
- The granularity of the taken date or null
java.io.IOException
org.xml.sax.SAXException
FlickrException
public void setMeta(java.lang.String photoId, java.lang.String title, java.lang.String description) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDtitle
- The new titledescription
- The new description
java.io.IOException
org.xml.sax.SAXException
FlickrException
public void setPerms(java.lang.String photoId, Permissions permissions) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDpermissions
- The permissions object
java.io.IOException
org.xml.sax.SAXException
FlickrException
public void setSafetyLevel(java.lang.String photoId, java.lang.String safetyLevel, java.lang.Boolean hidden) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDsafetyLevel
- The safety level of the photo or nullhidden
- Hidden from public searches or not or null
java.io.IOException
org.xml.sax.SAXException
FlickrException
Flickr.SAFETYLEVEL_SAFE
,
Flickr.SAFETYLEVEL_MODERATE
,
Flickr.SAFETYLEVEL_RESTRICTED
public void setTags(java.lang.String photoId, java.lang.String[] tags) throws java.io.IOException, org.xml.sax.SAXException, FlickrException
photoId
- The photo IDtags
- The tag array
java.io.IOException
org.xml.sax.SAXException
FlickrException
public Photo getPhoto(java.lang.String id) throws java.io.IOException, FlickrException, org.xml.sax.SAXException
id
- The ID
java.io.IOException
FlickrException
org.xml.sax.SAXException
public Photo getPhoto(java.lang.String id, java.lang.String secret) throws java.io.IOException, FlickrException, org.xml.sax.SAXException
id
- The IDsecret
- The secret
java.io.IOException
FlickrException
org.xml.sax.SAXException
public java.io.InputStream getImageAsStream(Photo photo, int size) throws java.io.IOException, FlickrException
At Size
you can find constants for the available sizes.
photo
- A photo-objectsize
- The Size
java.io.IOException
FlickrException
public java.awt.image.BufferedImage getImage(Photo photo, int size) throws java.io.IOException, FlickrException
At Size
you can find constants for the available sizes.
photo
- A photo-objectsize
- The size
java.io.IOException
FlickrException
public java.awt.image.BufferedImage getImage(java.lang.String urlStr) throws java.io.IOException
urlStr
- The URL of a Photo
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |