com. kelvinluck. flashr. core. Flashr

Flashr is an ActionScript 2 wrapper for the Flickr API.

It makes it easy to develop Flash applications to display and interact with photos on flickr.com.  You do not need to worry about the XML that flickr returns, you deal in sensible objects like Photos, Photosets and Persons.

This is the main class that you will use to make queries to flickr.com.  You will then use a FlashrResponse (or your own subclass of it) to deal with the responses.

Most methods available in the Flickr API (http://www.flickr.com/services/api/) have a corresponding class in Flashr.  The names are changed slightly - dots in the middle of names are removed and the name is camelCased (withWordBreaksIndicatedByACapitalLetter!).  So flickr.photos.search becomes photosSearch.  There is a search facility in the left hand nav to help you find the correct methods.

Below you will find documentation on all of these methods which should explain how you can use them and what to expect in return.  To get a head start using Flashr please check out the tutorials on the Flashr website (http://flashr.kelvinluck.com/tutorials/)

See Also

FlashrResponse, http://flashr.kelvinluck.com/, http://www.flickr.com/services/api/

Licence

This code and documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0.  http://creativecommons.org/licenses/by-nc-sa/2.0/

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Version

0.5.0

Author

Kelvin Luck < kelvin at kelvinluck dot com >

Project Website

http://flashr.kelvinluck.com/

Subversion Id

$Id: Flashr.as 80 2006-09-06 17:53:53Z kluck $

Summary
com. kelvinluck. flashr. core. FlashrFlashr is an ActionScript 2 wrapper for the Flickr API.
SUBVERSION_IDA reference to the this file as stored in subversion.
apiKeyYour Flickr API Key.
REST_ENDPOINTThe place for all API calls to connect to.
_AUTH_ENDPOINTThe base path you go to when you want to authenticate on flickr.com
STATUS_BUSYThe API is already waiting for the response to a method call so cannot make another call
STATUS_ERROR_CONNECTINGCould not connect to the server (e.g.
STATUS_INVALID_XMLThe XML returned by the server wasn’t in a <rsp /> tag.
STATUS_USER_NOT_LOGGED_INThe user wasn’t logged in and tried to access a method that requires authentication (returned from flickr.com)
STATUS_INVALID_API_KEYThe API key sent to flickr was invalid (returned from flickr.com)
STATUS_OKThere was no errors and valid XML was returned.
PERM_NOBODYA constant representing permissions for nobody.
PERM_FRIENDSA constant representing permissions for friends and family.
PERM_CONTACTSA constant representing permissions for contacts.
PERM_EVERYBODYA constant representing permissions for everybody.
PRIV_PUBLICA constant representing public photos.
PRIV_FRIENDSA constant representing private photos visible to friends.
PRIV_FAMILYA constant representing private photos visible to family.
PRIV_FRIENDS_FAMILYA constant representing private photos visible to friends & family.
PRIV_PRIVATEA constant representing completely private photos.
_secretPrivate variable to store this app’s shared secret for use with the authentication API.
authTokenStores the token generated by a successful authorisation.
authFrobStores the frob which is used for the initial part of the authentication process.
authIsLoggingInA flag which marks whether a user is currently logging in (used internally during the login process)
authPermsA variable describing the permissions the currently auth’d user has within this app.
authUserA Person object for the currently auth’d user (if there is one).
cacheQueriesSets whether the results of queries to flickr.com should be cached.
cacheObeyOrderWhether to ensure that cached results are returned in the same order as they are added to the queue (i.e.
cacheVariable holding the FlashrCache instance used to hold cached query results where cacheQueries is true.
queueThe FlashrRequestQueue.
queuePriorityThe priority to add requests to the queue at...
queryMaxFrequencyThe number of milliseconds to wait between subsequent queries to flickr.com (Flickr’s TOS request no more than one request per second)
historyThe FlashrResponseHistory if saveHistory is true
saveHistoryWhether or not a FlashrResponseHistory should be saved of all the calls to flickr.com and all the responses from it.
Flashr
cancelCurrentRequestIf there is a FlashrRequest which has been made to flickr.com and hasn’t returned yet then mark it cancelled.
authSetSecretUse to set the value of the shared secret before any calls to methods like authLogin or authCheckToken
authLoginPops open a login window so that the user can authenticate with the flickr.com website.
authGetFrobCalls flickr.auth.getFrob to get a frob to be used during authentication.
authGetTokenCalls flickr.auth.getToken to get the auth token for the given frob, if one has been attached.
authCheckTokenCalls flickr.auth.checkToken to get the credentials attached to an authentication token.
authLogoutSimple function which forgets the information that was making this user be logged in.
_authOpenLoginInternal function which generates the relevant link and pops open the login window on flickr.com.
_authSignCallInternal, private function which is used to generate the api_sig used to sign a call.
contactsGetListCalls flickr.contacts.getList to get a list of contacts for the calling user.
contactsGetPublicListCalls flickr.contacts.getPublicList to get a list of contacts a user.
favoritesAddCalls flickr.favorites.add to add a photo to a user’s favorites list.
favoritesGetListCalls flickr.favorites.getList to get a list of the user’s favorite photos.
favoritesGetPublicListCalls flickr.favorites.getPublicList to get a list of favorite public photos for the given user.
favoritesRemoveCalls flickr.favorites.remove to remove a photo from a user’s favorites list.
groupsPoolsAddAdd a photo to a group’s pool.
groupsPoolsGetContextGets next and previous photos for a photo in a group pool.
groupsPoolsGetGroupsGets a list of groups to which you can add photos.
groupsPoolsGetPhotosGets a list of pool photos for a given group, based on the permissions of the group and the user logged in (if any).
groupsPoolsRemoveRemove a photo from a group pool.
interestingnessGetListGet the list of interesting photos for the most recent day or a user-specified date
peopleFindByEmailCalls flickr.people.findByEmail to get a user’s NSID, given their email address.
peopleFindByUsernameCalls flickr.people.findByUsername to get a user’s NSID, given their username.
peopleGetInfoCalls flickr.people.getInfo to get information about a user.
peopleGetPublicGroupsCalls flickr.people.getPublicGroups to get the list of public groups a user is a member of.
peopleGetPublicPhotosCalls flickr.people.getPublicPhotos to get a list of public photos for the given user.
peopleGetUploadStatusCalls flickr.people.getUploadStatus to get information for the calling user related to photo uploads.
photosAddTagsCalls flickr.photos.addTags to add tags to a given photo.
photosDeleteCalls flickr.photos.addTags to delete a photo from flickr.
photosGetAllContextsReturns all visble sets and pools the photo belongs to.
photosGetContactsPhotosCalls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ (authUser) contacts.
photosGetContactsPublicPhotosCalls flickr.photos.getContactsPublicPhotos to fetch a list of recent public photos from a users’ contacts.
photosGetContextCalls flickr.photos.getContext to return next and previous photos for a photo in a photostream.
photosGetCountsCalls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user (authUser).
photosGetExifCalls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given Photo.
photosGetInfoCalls flickr.photos.getInfo to get information about a Photo.
photosGetNotInSetCalls flickr.photos.getNotInSet to get a list of the calling users’ (authUser) photos that are not part of any sets.
photosGetPermsCalls flickr.photos.getPerms to get permissions for a photo.
photosGetRecentCalls flickr.photos.getRecent to get a list of the latest public photos uploaded to flickr.
photosGetSizesCalls flickr.photos.getRecent to get the available sizes for a photo.
photosGetUntaggedCalls flickr.photos.getUntagged to get a list of the calling users’ authUser photos with no tags.
photosGetWithGeoDataCalls flickr.photos.getWithGeoData to get a list of the calling user’s authUser geo-tagged photos.
photosGetWithoutGeoDataCalls flickr.photos.getWithGeoData to get a list of the calling user’s authUser photos which haven’t been geo-tagged.
photosRecentlyUpdatedCalls flickr.photos.recentlyUpdated to get a list of the currently calling users’ authUser photos that have been recently created or which have been recently modified.
photosRemoveTagCalls flickr.photos.removeTag to remove a tag from a photo.
photosSearchCalls flickr.photos.search to get a list of photos matching some criteria.
photosSetDatesCalls flickr.photos.setDates to set one or both of the dates for a photo..
photosSetMetaCalls flickr.photos.setMeta to set the meta information for a photo.
photosSetPermsCalls flickr.photos.setPerms to set permissions for a photo..
photosSetTagsCalls flickr.photos.setTags to set the tags for a photo.
photosCommentsAddCommentCalls flickr.photos.comments.addComment to add a comment to a photo as the currently authenticated user (authUser).
photosCommentsDeleteCommentCalls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser).
photosCommentsEditCommentCalls flickr.photos.comments.editComment to edit the text of a comment as the currently authenticated user (authUser).
photosCommentsGetListCalls flickr.photos.comments.getList to get the comments for a photo.
photosGeoGetLocationCalls flickr.photos.geo.getLocation to get the GeoLocation for a Photo.
photosGeoGetPermsCalls flickr.photos.geo.getPerms to get permissions for who may view geo data for a Photo
photosGeoRemoveLocationCalls flickr.photos.geo.removeLocation to the geo data GeoLocation associated with a Photo.
photosGeoSetLocationCalls flickr.photos.geo.setLocation to set the GeoLocation (latitude and longitude and, optionally, the accuracy level) for a Photo.
photosGeoSetPermsCalls flickr.photos.geo.setPerms to set the permission for who may view the geo data associated with a Photo
photosLicensesGetInfoFetches a list of availabale photo licenses for Flickr
photosLicensesSetLicenseSets the license for a photo.
photosNotesAddAdd a Note to a Photo.
photosNotesDeleteDelete a Note from a Photo.
photosNotesEditEdit a Note on a Photo.
photosetsAddPhotoAdd a photo to the end of an existing photoset.
photosetsCreateCreate a new photoset for the calling user (authUser).
photosetsDeleteDelete a photoset.
photosetsEditMetaModify the meta-data for a Photoset.
photosetsEditPhotosModify the photos in a photoset.
photosetsGetContextReturns next and previous photos for a photo in a set.
photosetsGetInfoGets information about a photoset.
photosetsGetListGets the photosets belonging to the specified user.
photosetsGetPhotosGet the list of photos in a set.
photosetsOrderSetsSet the order of photosets for the calling user.
photosetsRemovePhotoRemove a photo from a photoset.
photosetsCommentsAddCommentAdd a comment to a photoset.
photosetsCommentsDeleteCommentDelete a photoset comment as the currently authenticated user.
photosetsCommentsEditCommentEdit the text of a comment as the currently authenticated user.
photosetsCommentsGetListReturns the comments for a photoset.
tagsGetListPhotoCalls flickr.tags.getListPhoto to get the tag list for a given photo.
tagsGetListUserCalls flickr.tags.getListUser to get the tag list for a given user (or the currently logged in user).
tagsGetListUserPopularCalls flickr.tags.getListUserPopular to get the popular tags for a given user (or the currently logged in user).
tagsGetRelatedCalls flickr.tags.getRelated to get a list of tags ‘related’ to the given tag, based on clustered usage analysis.
testEchoCalls flickr.test.echo - forwards any arguments on to the Flickr API
testLoginCalls flickr.test.login - A testing method which checks if the caller is logged in then returns their username.
testNullNull test
executeAtPriorityExecute a Flashr.* function at a different priority to the current queuePriority.
queueRequestQueues a request for execution on flickr.com
callMethodUsed internally to call a method on the flickr API.
getFlashrReturns a reference to the Flashr instance - if none exists yet then creates one and returns a reference to that.

SUBVERSION_ID

public static var SUBVERSION_ID: String

A reference to the this file as stored in subversion.  This will help to identify the exact copy of this file (and therefore Flashr) that you are using.

apiKey

private var _apiKey: String

Your Flickr API Key.  None of the method calls will work without this.

REST_ENDPOINT

static var REST_ENDPOINT: String

The place for all API calls to connect to.  The default value of connecting directly to the api.flickr.com server will only work if a relevant entry is added to their crossdomain.xml file otherwise set the value to the location of a proxy script on your server.

_AUTH_ENDPOINT

private var _AUTH_ENDPOINT: String

The base path you go to when you want to authenticate on flickr.com

STATUS_BUSY

public static var STATUS_BUSY: Number

The API is already waiting for the response to a method call so cannot make another call

STATUS_ERROR_CONNECTING

public static var STATUS_ERROR_CONNECTING: Number

Could not connect to the server (e.g. no internet connection, server down, security restrictions)

STATUS_INVALID_XML

public static var STATUS_INVALID_XML: Number

The XML returned by the server wasn’t in a <rsp /> tag.

STATUS_USER_NOT_LOGGED_IN

public static var STATUS_USER_NOT_LOGGED_IN: Number

The user wasn’t logged in and tried to access a method that requires authentication (returned from flickr.com)

STATUS_INVALID_API_KEY

public static var STATUS_INVALID_API_KEY: Number

The API key sent to flickr was invalid (returned from flickr.com)

STATUS_OK

public static var STATUS_OK: Number

There was no errors and valid XML was returned.

PERM_NOBODY

public static var PERM_NOBODY: Number

A constant representing permissions for nobody.

See Also

photosSetPerms

PERM_FRIENDS

public static var PERM_FRIENDS: Number

A constant representing permissions for friends and family.

See Also

photosSetPerms

PERM_CONTACTS

public static var PERM_CONTACTS: Number

A constant representing permissions for contacts.

See Also

photosSetPerms

PERM_EVERYBODY

public static var PERM_EVERYBODY: Number

A constant representing permissions for everybody.

See Also

photosSetPerms

PRIV_PUBLIC

public static var PRIV_PUBLIC: Number

A constant representing public photos.

See Also

photosSearch, photosGetNotInSet, photosetsGetPhotos

PRIV_FRIENDS

public static var PRIV_FRIENDS: Number

A constant representing private photos visible to friends.

See Also

photosSearch, photosGetNotInSet, photosetsGetPhotos

PRIV_FAMILY

public static var PRIV_FAMILY: Number

A constant representing private photos visible to family.

See Also

photosSearch, photosGetNotInSet, photosetsGetPhotos

PRIV_FRIENDS_FAMILY

public static var PRIV_FRIENDS_FAMILY: Number

A constant representing private photos visible to friends & family.

See Also

photosSearch, photosGetNotInSet, photosetsGetPhotos

PRIV_PRIVATE

public static var PRIV_PRIVATE: Number

A constant representing completely private photos.

See Also

photosSearch, photosGetNotInSet, photosetsGetPhotos

_secret

private var _secret: String

Private variable to store this app’s shared secret for use with the authentication API.  Set with authSetSecret.

See Also

authSetSecret, authLogin, http://www.flickr.com/services/api/auth.spec.html, http://www.flickr.com- /services- /api- /auth.howto.desktop.html, http://www.flickr.com- /services- /api- /registered_keys.gne

authToken

private var _authToken: String

Stores the token generated by a successful authorisation.

authFrob

private var _authFrob: String

Stores the frob which is used for the initial part of the authentication process.

authIsLoggingIn

private var _authIsLoggingIn: Boolean

A flag which marks whether a user is currently logging in (used internally during the login process)

authPerms

var authPerms: String

A variable describing the permissions the currently auth’d user has within this app.  It will be “none” until the user has been logged in and then will become “read”, “write” or “delete”.  You can check whether authPerms == “none” if you want to find out if the user is currently logged in before checking who they are with authUser

See Also

authLogin, authUser

authUser

var authUser: Person

A Person object for the currently auth’d user (if there is one).  Empty if there is no currently auth’d user.

See Also

authLogin, authPerms

cacheQueries

var cacheQueries: Boolean

Sets whether the results of queries to flickr.com should be cached.  The advantage of cached queries is (much) quicker responses for repeated calls.  The disadvantage is increased memory usage by your application.  There is a list of cachable queries and methods to control these in the FlashrCache class.

See Also

FlashrCache

cacheObeyOrder

var cacheObeyOrder: Boolean

Whether to ensure that cached results are returned in the same order as they are added to the queue (i.e. whether to totally skip the queue when you have a cached result).  It is normally better to skip the queue and so get an instant result for cached calls (hence the default value of false) but in some cases you want to ensure that the results are returned in the same order as you queue the queries...

cache

function get cache():FlashrCache

Variable holding the FlashrCache instance used to hold cached query results where cacheQueries is true.

queue

function get queue():FlashrRequestQueue

The FlashrRequestQueue.

queuePriority

var queuePriority: Number

The priority to add requests to the queue at...  The lower this number when you add a request to the queue the quicker that request will be actioned.  The default value of undefined corresponds to the lowest possible priority for request.

If you want to execute one particular request at a higher priority (maybe you need to call one photosGetInfo based on user interaction while still doing a bunch of searches in the background) you can use the executeAtPriority method.

See Also

executeAtPriority

queryMaxFrequency

var queryMaxFrequency: Number

The number of milliseconds to wait between subsequent queries to flickr.com (Flickr’s TOS request no more than one request per second)

history

function get history():FlashrResponseHistory

The FlashrResponseHistory if saveHistory is true

saveHistory

var saveHistory: Boolean

Whether or not a FlashrResponseHistory should be saved of all the calls to flickr.com and all the responses from it.  Defaults to false so that memory isn’t wasted unles you explicitly require this functionality.

Flashr

private function Flashr()
Constructoras this class implements the Singleton pattern do not call directly but rather access through Flashr.getFlashr.

See Also

Flashr.getFlashr

cancelCurrentRequest

function cancelCurrentRequest()

If there is a FlashrRequest which has been made to flickr.com and hasn’t returned yet then mark it cancelled.  This means that it’s response will be cached (if cacheQueries is true) but won’t be broadcast to all FlashrResponse objects.  Use this where user interaction has made the result of a query irrelevant and acting on the response would break your interface.

Returns

True if there was a FlashrRequest to cancel, false otherwise.

See Also

FlashrRequestQueue.clearQueue, FlashrRequest.cancelled

authSetSecret

public function authSetSecret(secret: String)

Use to set the value of the shared secret before any calls to methods like authLogin or authCheckToken

Parameters

secretYour applications shared secret.

See Also

authLogin, authCheckToken, http://www.flickr.com/services/api/auth.spec.html, http://www.flickr.com- /services- /api- /auth.howto.desktop.html, http://www.flickr.com- /services- /api- /registered_keys.gne

authLogin

public function authLogin(perms: String)

Pops open a login window so that the user can authenticate with the flickr.com website.  The user authenticates using the “Non-web based app” method as described in section 9.2 of the auth spec.

The end effect of calling this function is that a window is opened with the relevant login / authenticate stuff on flickr.com.  It is the responsibility of the user of this library to pop up a dialog box saying words to the effect of:

”This program requires your authentication before it can read/write/delete your photos on flickr.com.  Please complete the authorisation process in the window which has popped up and then press the CONTINUE button below”

The CONTINUE button needs to call authGetToken which does the final stage of logging the user in.

Parameters

permsA desired level of permission for actions which the application wants to perform on behalf of the user.  “read”, “write” or “delete”.

See Also

authGetToken, http://www.flickr.com/services/api/auth.spec.html, http://www.flickr.com- /services- /api- /auth.howto.desktop.html, http://www.flickr.com- /services- /api- /registered_keys.gne

authGetFrob

public function authGetFrob(authIsLoggingIn: Boolean):FlashrRequest

Calls flickr.auth.getFrob to get a frob to be used during authentication.  In most cases you would not call this method directly and would instead use authLogin.

Parameters

authIsLoggingInSet to true internally so that authLogin doesn’t need to bother a FlashrResponse.  If you call the function then leave this empty or put in the default (false).

Returns

The generated FlashrRequest

See Also

authLogin, FlashrResponse.onAuthGetFrob, http://flickr.com- /services- /api- /flickr.auth.getFrob.html

authGetToken

public function authGetToken():FlashrRequest

Calls flickr.auth.getToken to get the auth token for the given frob, if one has been attached.

Should be called after the user has pressed CONTINUE on the status window you opened when calling authLogin.

If a valid token is returned (e.g. if the frob was correct and valid) then the user is logged in for all further API calls from this session and FlashrResponse.onAuthCheckToken will be fired.  If there is a problem then FlashrResponse.onError is fired.

Returns

The generated FlashrRequest

See Also

authLogin, FlashrResponse.onAuthCheckToken, http://www.flickr.com- /services- /api- /flickr.auth.getToken.html

authCheckToken

public function authCheckToken(authToken: String):FlashrRequest

Calls flickr.auth.checkToken to get the credentials attached to an authentication token.  You can use this to log in if you have auth’d an app in a previous session and saved the token e.g. in a SharedObject.  If the token is still valid, the user will become logged in and FlashrResponse.onAuthCheckToken will be fired.  If the token is invalid then FlashrResponse.onError will be fired.

Parameters

authTokenThe authentication token to check.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onAuthCheckToken, http://www.flickr.com- /services- /api- /flickr.auth.checkToken.html

authLogout

public function authLogout()

Simple function which forgets the information that was making this user be logged in.  The app will remain authenticated against flickr.com until the user visits http://www.flickr.com/services/auth/list.gne but the app will have to reapply for frob and then a token to use this authentication...

_authOpenLogin

private function _authOpenLogin()

Internal function which generates the relevant link and pops open the login window on flickr.com.  Triggered when a frob (necessary to generate the link) is returned from flickr.auth.getFrob.

See Also

http://www.flickr.com- /services- /api- /flickr.auth.getFrob.html, http://www.flickr.com/services/api/auth.spec.html, http://www.flickr.com- /services- /api- /auth.howto.desktop.html, http://www.flickr.com- /services- /api- /registered_keys.gne

_authSignCall

function _authSignCall(urlArguments: Object):String

Internal, private function which is used to generate the api_sig used to sign a call.

Parameters

urlArgumentsAn Object containing name/value pairs which describe all of the arguments on the URL.

Returns

The generated signature

See Also

http://www.flickr.com/services/api/auth.spec.html, http://www.flickr.com- /services- /api- /auth.howto.desktop.html, http://www.flickr.com- /services- /api- /registered_keys.gne

contactsGetList

public function contactsGetList(filter: String):FlashrRequest

Calls flickr.contacts.getList to get a list of contacts for the calling user.

Parameters

filterAn optional filter of the results.  One of “friends”, “family”, “both” or “neither”

Returns

The generated FlashrRequest

See Also

FlashrResponse.onContactsGetList, http://flickr.com- /services- /api- /flickr.contacts.getList.html

contactsGetPublicList

public function contactsGetPublicList(userId: String):FlashrRequest

Calls flickr.contacts.getPublicList to get a list of contacts a user.

Parameters

userIdThe user id of the Person whose contacts you want to get.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onContactsGetPublicList, http://flickr.com- /services- /api- /flickr.contacts.getPublicList.html

favoritesAdd

public function favoritesAdd(photoId: String):FlashrRequest

Calls flickr.favorites.add to add a photo to a user’s favorites list.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo you want to add.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onFavoritesAdd, http://www.flickr.com- /services- /api- /flickr.favorites.add.html

favoritesGetList

public function favoritesGetList(userId: String,
extras: String,
perPage: Number,
page: Number):FlashrRequest

Calls flickr.favorites.getList to get a list of the user’s favorite photos.

Parameters

userIdThe id of the user to get favourites for [Optional: default=logged in user]
extrasA comma-delimited list of 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, tags
perPageThe number of results to get per page [Optional: default=100]
pageThe page of results to get [Optional: default=1]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onFavoritesGetList, http://www.flickr.com- /services- /api- /flickr.favorites.getList.html

favoritesGetPublicList

public function favoritesGetPublicList(userId: String,
extras: String,
perPage: Number,
page: Number):FlashrRequest

Calls flickr.favorites.getPublicList to get a list of favorite public photos for the given user.

Parameters

userIdThe id of the user to get favourites for
extrasA comma-delimited list of 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, tags
perPageThe number of results to get per page [Optional: default=100]
pageThe page of results to get [Optional: default=1]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onFavoritesGetPublicList, http://www.flickr.com- /services- /api- /flickr.favorites.getPublicList.html

favoritesRemove

public function favoritesRemove(photoId: String):FlashrRequest

Calls flickr.favorites.remove to remove a photo from a user’s favorites list.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo you want to remove.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onFavoritesRemove, http://www.flickr.com- /services- /api- /flickr.favorites.remove.html

groupsPoolsAdd

function groupsPoolsAdd(photoId: String,
groupId: String):FlashrRequest

Add a photo to a group’s pool.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to add to the group pool.  The photo must belong to the calling user.
groupIdThe NSID of the group who’s pool the photo is to be added to.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onGroupsPoolsAdd, http://www.flickr.com- /services- /api- /flickr.groups.pools.add.html

groupsPoolsGetContext

function groupsPoolsGetContext(photoId: String,
groupId: String):FlashrRequest

Gets next and previous photos for a photo in a group pool.

Parameters

photoIdThe id of the photo to fetch the context for.
groupIdThe nsid of the group who’s pool to fetch the photo’s context for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onGroupsPoolsAdd, http://www.flickr.com- /services- /api- /flickr.groups.pools.getContext.html

groupsPoolsGetGroups

function groupsPoolsGetGroups():FlashrRequest

Gets a list of groups to which you can add photos.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onGroupsPoolsGetGroups, http://www.flickr.com- /services- /api- /flickr.groups.pools.getGroups.html

groupsPoolsGetPhotos

function groupsPoolsGetPhotos(groupId: String,
tags: String,
extras: String,
perPage: Number,
page: Number,
userId: String):FlashrRequest

Gets a list of pool photos for a given group, based on the permissions of the group and the user logged in (if any).

Parameters

groupIdThe id of the group who’s pool you which to get the photo list for.
tagsA tag to filter the pool with.  At the moment only one tag at a time is supported.
extrasA comma-delimited list of 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, tags
perPageThe number of photos to return per page.  [Optional: default=100]
pageThe page of results to return.  [Optional: default=1]
userIdThe nsid of a user.  Specifiying this parameter will retrieve for you only those photos that the user has contributed to the group pool.  [Optional]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onGroupsPoolsGetPhotos, http://www.flickr.com- /services- /api- /flickr.groups.pools.getPhotos.html

groupsPoolsRemove

function groupsPoolsRemove(photoId: String,
groupId: String):FlashrRequest

Remove a photo from a group pool.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to remove from the group pool.  The photo must either be owned by the calling user of the calling user must be an administrator of the group
groupIdThe NSID of the group who’s pool the photo is to removed from.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onGroupsPoolsRemove, http://www.flickr.com- /services- /api- /flickr.groups.pools.remove.html

interestingnessGetList

function interestingnessGetList(date: Date,
extras: String,
perPage: Number,
page: Number):FlashrRequest

Get the list of interesting photos for the most recent day or a user-specified date

Parameters

dateA specific date, to return interesting photos for (or undefined for the most recent days photos)
extrasA comma-delimited list of 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, tags
perPageThe number of photos to return per page.  [Optional: default=100]
pageThe page of results to return.  [Optional: default=1]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onInterestingnessGetList, http://www.flickr.com- /services- /api- /flickr.interestingness.getList.html

peopleFindByEmail

function peopleFindByEmail(email: String):FlashrRequest

Calls flickr.people.findByEmail to get a user’s NSID, given their email address.

Parameters

emailThe email address of the person whose nsid you want

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPeopleFindByEmail, http://flickr.com- /services- /api- /flickr.people.findByEmail.html

peopleFindByUsername

function peopleFindByUsername(username: String):FlashrRequest

Calls flickr.people.findByUsername to get a user’s NSID, given their username.

Parameters

usernameThe username of the person whose nsid you want

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPeopleFindByUsername, Person, http://flickr.com- /services- /api- /flickr.people.findByUsername.html

peopleGetInfo

function peopleGetInfo(nsid: String):FlashrRequest

Calls flickr.people.getInfo to get information about a user.

Parameters

nsidThe nsid of the user you want information about.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPeopleGetInfo, Person, http://flickr.com- /services- /api- /flickr.people.getInfo.html

peopleGetPublicGroups

function peopleGetPublicGroups(userId: String):FlashrRequest

Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of.

Parameters

userIdThe nsid of the user whose groups you want to know about.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPeopleGetPublicGroups, http://www.flickr.com- /services- /api- /flickr.people.getPublicGroups.html

peopleGetPublicPhotos

function peopleGetPublicPhotos(nsid: String,
extras: String,
perPage: Number,
page: Number):FlashrRequest

Calls flickr.people.getPublicPhotos to get a list of public photos for the given user.

Parameters

nsidThe nsid of the user whose photos you want to know about.
extrasA comma-delimited list of 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, tags
perPageThe number of photos to return per page.  [Optional: default=100]
pageThe page of results to return.  [Optional: default=1]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPeopleGetPublicPhotos, http://flickr.com- /services- /api- /flickr.people.getPublicPhotos.html

peopleGetUploadStatus

function peopleGetUploadStatus():FlashrRequest

Calls flickr.people.getUploadStatus to get information for the calling user related to photo uploads.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPeopleGetUploadStatus, http://flickr.com- /services- /api- /flickr.people.getUploadStatus.html

photosAddTags