com. kelvinluck. flickr. FlickrResponseListenerClass to define a listener for responses from the FlickrAPI. Subclass this class or override the methods you are interested in and use Flickr.addListener... The methods as they exist in this class just output debugging information and exist kind of like an interface to specify the callbacks from Flickr.callMethod and the variables available to them. This code is licensed under a Creative Commons License. http://creativecommons.org/licenses/by-nc-sa/2.0/ See Alsohttp://www.flickr.com/services/api/ Version0.1.0 AuthorKelvin Luck < kelvin at kelvinluck dot com > Summary
onContactsGetList
Called when there is a response from a call to flickr.contacts.getList. Override this method in your application if you want to do something with the response to this call. TODOThis should probably accept a Person object instead of an Array of contacts. This Person would be the calling user and would have an Array of contacts held within them. The problem is what to do when we don’t have a Person object for the calling user and we don’t know their nsid... Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.contacts.getList.html onContactsGetPublicList
Called when there is a response from a call to flickr.contacts.getPublicList. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.contacts.getPublicList.html onFavoritesAdd
Called when there is a response from a call to flickr.favorites.add. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.favorites.add.html onFavoritesGetList
Called when there is a response from a call to flickr.favorites.getList. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.favorites.getList.html onFavoritesGetPublicList
Called when there is a response from a call to flickr.favorites.getPublicList. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.favorites.getPublicList.html onFavoritesRemove
Called when there is a response from a call to flickr.favorites.remove. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.favorites.remove.html onPeopleFindByEmail
Called when there is a response from a call to flickr.people.findByEmail. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.people.findByEmail.html onPeopleFindByUsername
Called when there is a response from a call to flickr.people.findByUsername. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.people.findByUsername.html onPeopleGetInfo
Called when there is a response from a call to flickr.people.getInfo. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.people.getInfo.html onPeopleGetOnlineList
Called when there is a response from a call to flickr.people.getOnlineList. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.people.getOnlineList.html onPeopleGetPublicGroups
Called when there is a response from a call to flickr.people.getPublicGroups. Override this method in your application if you want to do something with the response to this call. Parameters
See Also<Person.getGroups> http://flickr.com- /services- /api- /flickr.people.getPublicGroups.html onPeopleGetPublicPhotos
Called when there is a response from a call to flickr.people.getPublicPhotos. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.people.getPublicPhotos.html onPhotosAddTags
Called when there is a response from a call to flickr.photos.addTags. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.addTags.html onPhotosGetContactsPhotos
Called when there is a response from a call to flickr.people.getContactsPhotos. Override this method in your application if you want to do something with the response to this call. Parameters
See AlsoFlickr.photosGetContactsPhotos http://flickr.com- /services- /api- /flickr.photos.getContactsPhotos.html onPhotosGetContactsPublicPhotos
Called when there is a response from a call to flickr.people.getContactsPhotos. Override this method in your application if you want to do something with the response to this call. Parameters
See AlsoFlickr.photosGetContactsPublicPhotos http://flickr.com- /services- /api- /flickr.photos.getContactsPublicPhotos.html onPhotosGetContext
Called when there is a response from a call to flickr.people.getContext. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://flickr.com- /services- /api- /flickr.photos.getContext.html onPhotosGetCounts
Called when there is a response from a call to flickr.people.getCounts. Override this method in your application if you want to do something with the response to this call. Parameters
NoteIf you called photoGetCounts using the dates argument then the returned values of fromdate and todate will be UNIX Timestamps. If you used the datesTaken argument then the returned values will be MySQL Timestamps. TODOShould we return Date objects to avoid the problems with the different sorts of dates? See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getCounts.html onPhotosGetExif
Called when there is a response from a call to flickr.people.getExif. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getExif.html onPhotosGetInfo
Called when there is a response from a call to flickr.people.getInfo. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getInfo.html onPhotosGetNotInSet
Called when there is a response from a call to flickr.people.getPhotosNotInSet. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getNotInSet.html onPhotosGetPerms
Called when there is a response from a call to flickr.people.getPerms. Override this method in your application if you want to do something with the response to this call. Parameters
TODONeed to actually do something with the permissions that were returned. At the moment they are ignored as I need to figure out how to store permissions which are a combination of Person and Photo - and so can’t just be stored on a Photo. Especially since we don’t have a Person object for the logged in calling user... See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getPerms.html onPhotosGetRecent
Called when there is a response from a call to flickr.people.getRecent. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getRecent.html onPhotosGetSizes
Called when there is a response from a call to flickr.people.getSizes. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getSizes.html onPhotosGetUntagged
Called when there is a response from a call to flickr.people.getUntagged. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.getUntagged.html onPhotosRemoveTag
Called when there is a response from a call to flickr.people.removeTag. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.removeTag.html onPhotosSearch
Called when there is a response from a call to flickr.people.search. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.search.html onPhotosSetDates
Called when there is a response from a call to flickr.people.setDates. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.setDates.html onPhotosSetMeta
Called when there is a response from a call to flickr.people.setMeta. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.setMeta.html onPhotosSetPerms
Called when there is a response from a call to flickr.people.setPerms. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.setPerms.html onPhotosSetTags
Called when there is a response from a call to flickr.people.setTags. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.photos.setTags.html onTagsGetListPhoto
Called when there is a response from a call to flickr.tags.tagsGetListPhoto. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.tags.getListPhoto.html onTagsGetListUser
Called when there is a response from a call to flickr.tags.getListUser. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.tags.getListUser.html onTagsGetListUserPopular
Called when there is a response from a call to flickr.tags.getListUserPopular. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.tags.getListUserPopular.html onTagsGetRelated
Called when there is a response from a call to flickr.tags.tagsGetRelated. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.tags.getRelated.html onTestEcho
Called when there is a response from a call to flickr.test.echo. Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.test.echo.html onTestLogin
Called when there is a response from a call to flickr.test.login Override this method in your application if you want to do something with the response to this call. Parameters
See Alsohttp://www.flickr.com- /services- /api- /flickr.test.login.html onError
Called when the Flickr API returns an error code.. Override this method in your application so that it deals with the error. Parameters
onAPIResponse
Internal function which deals with a response from a Flickr API call and forwards any relevant arguments to the relevant function. You shouldn’t need to override this function. Parameters
|
Called when there is a response from a call to flickr.contacts.getList.
function onContactsGetList( contacts: Array )
Called when there is a response from a call to flickr.contacts.getPublicList.
function onContactsGetPublicList( user: Person )
Called when there is a response from a call to flickr.favorites.add.
function onFavoritesAdd( photo: Photo, email: String )
Called when there is a response from a call to flickr.favorites.getList.
function onFavoritesGetList( user: Person, email: String )
Called when there is a response from a call to flickr.favorites.getPublicList.
function onFavoritesGetPublicList( user: Person )
Called when there is a response from a call to flickr.favorites.remove.
function onFavoritesRemove( photo: Photo, email: String )
Called when there is a response from a call to flickr.people.findByEmail.
function onPeopleFindByEmail( email: String, person: Person )
Called when there is a response from a call to flickr.people.findByUsername.
function onPeopleFindByUsername( username: String, person: Person )
Called when there is a response from a call to flickr.people.getInfo.
function onPeopleGetInfo( nsid: String, person: Person )
Called when there is a response from a call to flickr.people.getOnlineList.
function onPeopleGetOnlineList( onlineList: Array )
Called when there is a response from a call to flickr.people.getPublicGroups.
function onPeopleGetPublicGroups( person: Person )
Called when there is a response from a call to flickr.people.getPublicPhotos.
function onPeopleGetPublicPhotos( person: Person )
Called when there is a response from a call to flickr.photos.addTags.
function onPhotosAddTags( photo: Photo, tags: String, email: String )
Called when there is a response from a call to flickr.people.getContactsPhotos.
function onPhotosGetContactsPhotos( photos: Array )
Called when there is a response from a call to flickr.people.getContactsPhotos.
function onPhotosGetContactsPublicPhotos( person: Person, photos: Array )
Called when there is a response from a call to flickr.people.getContext.
function onPhotosGetContext( photo: Photo )
Called when there is a response from a call to flickr.people.getCounts.
function onPhotosGetCounts( counts: Array )
Called when there is a response from a call to flickr.people.getExif.
function onPhotosGetExif( photo: Photo )
Called when there is a response from a call to flickr.people.getInfo.
function onPhotosGetInfo( photo: Photo )
Called when there is a response from a call to flickr.people.getPhotosNotInSet.
function onPhotosGetNotInSet( photos: Array )
Called when there is a response from a call to flickr.people.getPerms.
function onPhotosGetPerms( photo: Array )
Called when there is a response from a call to flickr.people.getRecent.
function onPhotosGetRecent( photos: Array )
Called when there is a response from a call to flickr.people.getSizes.
function onPhotosGetSizes( photo: Photo )
Called when there is a response from a call to flickr.people.getUntagged.
function onPhotosGetUntagged( photos: Array )
Called when there is a response from a call to flickr.people.removeTag.
function onPhotosRemoveTag( tagId: Number, email: String )
Called when there is a response from a call to flickr.people.search.
function onPhotosSearch( photos: Array )
Called when there is a response from a call to flickr.people.setDates.
function onPhotosSetDates( photo: Photo )
Called when there is a response from a call to flickr.people.setMeta.
function onPhotosSetMeta( photo: Photo )
Called when there is a response from a call to flickr.people.setPerms.
function onPhotosSetPerms( photo: Photo )
Called when there is a response from a call to flickr.people.setTags.
function onPhotosSetTags( photo: Photo )
Called when there is a response from a call to flickr.tags.tagsGetListPhoto.
function onTagsGetListPhoto( photo: Photo )
Called when there is a response from a call to flickr.tags.getListUser.
function onTagsGetListUser( person: Person, tags: Array )
Called when there is a response from a call to flickr.tags.getListUserPopular.
function onTagsGetListUserPopular( tagUserId: String, tags: Array )
Called when there is a response from a call to flickr.tags.tagsGetRelated.
function onTagsGetRelated( tagSource: String, tags: Array )
Called when there is a response from a call to flickr.test.echo.
function onTestEcho( params: Object )
Called when there is a response from a call to flickr.test.login
function onTestLogin( userId: String, username: String )
Called when the Flickr API returns an error code..
function onError( errorCode: Number, errorDescription: String, method: String )
Internal function which deals with a response from a Flickr API call and forwards any relevant arguments to the relevant function.
function onAPIResponse( eventObject: Object )
Used to call a method on the flickr API.
public function callMethod( method: String, additionalArguments: Object, requiresAuthentication: Boolean ):Void
Calls flickr.contacts.getList to get a list of contacts for the calling user.
public function contactsGetList()
Gets a list of the public contacts that this user has (if addPublicContact has been called for this user.
function getPublicContacts():Object
Calls flickr.contacts.getPublicList to get a list of contacts a user.
public function contactsGetPublicList( nsid: String )
Calls flickr.favorites.add to add a photo to a user’s favorites list.
public function favoritesAdd( photoId: Number, email: String, password: String )
Gets a list of the favorite Photo’s that this user has.
function getFavorites():Object
Calls flickr.favorites.getList to get a list of the user’s favorite photos.
public function favoritesGetList( userId: String, perPage: Number, page: Number, email: String, password: String )
Calls flickr.favorites.getPublicList to get a list of favorite public photos for the given user.
public function favoritesGetPublicList( userId: String, perPage: Number, page: Number )
Calls flickr.favorites.remove to remove a photo from a user’s favorites list.
public function favoritesRemove( photoId: Number, email: String, password: String )
Calls flickr.people.findByEmail to get a user’s NSID, given their email address.
function peopleFindByEmail( email: String )
Calls flickr.people.findByUsername to get a user’s NSID, given their username.
function peopleFindByUsername( username: String )
Calls flickr.people.getInfo to get information about a user.
function peopleGetInfo( nsid: String )
Calls flickr.people.getOnlineList to get a list of all online users.
function peopleGetOnlineList()
Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of.
function peopleGetPublicGroups( nsid: String )
Calls flickr.people.getPublicPhotos to get a list of public photos for the given user.
function peopleGetPublicPhotos( nsid: String, perPage: Number, page: Number )
An Array containing references to all of this Person’s photos.
private var _photos: Array
Calls flickr.photos.addTags to add tags to a given photo.
function photosAddTags ( photoId: Number, tags: String, email: String, password: String )
Calls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ contacts.
function photosGetContactsPhotos ( count: Number, justFriends: Boolean, singlePhoto: Boolean, includeSelf: Boolean, email: String, password: String )
Calls flickr.photos.getContactsPublicPhotos to fetch a list of recent public photos from a users’ contacts.
function photosGetContactsPublicPhotos ( nsid: String, count: Number, justFriends: Boolean, singlePhoto: Boolean, includeSelf: Boolean )
Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream.
function photosGetContext ( photoId: Number )
Calls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user.
function photosGetCounts ( dates: String, takenDates: String, email: String, password: String )
Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given photo.
function photosGetExif ( photoId: Number, secret: String )
Calls flickr.photos.getInfo to get information about a photo..
function photosGetInfo ( photoId: Number, secret: Number )
Calls flickr.photos.getNotInSet to get a list of your photos that are not part of any sets.
function photosGetNotInSet ( perPage: Number, page: Number )
Calls flickr.photos.getPerms to get permissions for a photo.
function photosGetPerms ( photoId: Number )
Calls flickr.photos.getRecent to get the available sizes for a photo.
function photosGetSizes ( photoId: Number )
The PhotoSizes that are associated with this photo.
private var _sizes: Array
Calls flickr.photos.getUntagged to get a list of your photos with no tags.
function photosGetUntagged ( perPage: Number, page: Number )
Calls flickr.photos.removeTag to remove a tag from a photo.
function photosRemoveTag ( tagId: Number )
Calls flickr.photos.search to get a list of photos matching some criteria.
function photosSearch ( params )
Calls flickr.photos.setDates to set one or both of the dates for a photo..
function photosSetDates ( photoId: Number, datePosted: Date, dateTaken: Date, dateTakenGran: Number )
Calls flickr.photos.setMeta to set the meta information for a photo.
function photosSetMeta ( photoId: Number, title: String, description: String )
Calls flickr.photos.setTags to set the tags for a photo.
function photosSetTags ( photoId: Number, tags: String )
Returns an object containing all the tags’s that are associated with this Photo.
function getTags():Object
Calls flickr.tags.getListPhoto to get the tag list for a given photo.
public function tagsGetListPhoto( photoId: Number )
Calls flickr.tags.getListUser to get the tag list for a given user (or the currently logged in user).
public function tagsGetListUser( userId: String )
Calls flickr.tags.getListUserPopular to get the popular tags for a given user (or the currently logged in user).
public function tagsGetListUserPopular( userId: String, count: Number )
Calls flickr.tags.getRelated to get a list of tags ‘related’ to the given tag, based on clustered usage analysis.
public function tagsGetRelated( tag: String )
Calls flickr.test.echo - forwards any arguments on to the Flickr API
public function testEcho()
Calls flickr.test.login - A testing method which checks if the caller is logged in then returns their username.
public function testLogin( email: String, password: String )