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

function photosAddTags (photoId: String,
tags: String):FlashrRequest

Calls flickr.photos.addTags to add tags to a given photo.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to add tags to.
tagsThe tags to add to the photo.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosAddTags, http://flickr.com- /services- /api- /flickr.photos.addTags.html

photosDelete

function photosDelete (photoId: String):FlashrRequest

Calls flickr.photos.addTags to delete a photo from flickr.

Authentication

This method requires authentication with ‘delete’ permission.

Parameters

photoIdThe id of the photo to delete.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosDelete, http://flickr.com- /services- /api- /flickr.photos.delete.html

photosGetAllContexts

function photosGetAllContexts(photoId: String):FlashrRequest

Returns all visble sets and pools the photo belongs to.

Parameters

photoIdThe photo to return information for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetAllContexts, http://www.flickr.com- /services- /api- /flickr.photos.getAllContexts.html

photosGetContactsPhotos

function photosGetContactsPhotos (count: Number,
justFriends: Number,
singlePhoto: Number,
includeSelf: Number,
extras: String):FlashrRequest

Calls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ (authUser) contacts.

Authentication

This method requires authentication with ‘read’ permission.

Parameters

countNumber of photos to return.  Defaults to 10, maximum 50.  This is only used if single_photo is not passed.
justFriendsset as 1 to only show photos from friends and family (excluding regular contacts).  [Optional: default=0].
singlePhotoOnly fetch one photo (the latest) per contact, instead of all photos in chronological order [Optional: default=0].
includeSelfSet to 1 to include photos from the calling user.  [Optional: default=0].
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

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetContactsPhotos, http://flickr.com- /services- /api- /flickr.photos.getContactsPhotos.html

photosGetContactsPublicPhotos

function photosGetContactsPublicPhotos (nsid: String,
count: Number,
justFriends: Number,
singlePhoto: Number,
includeSelf: Number,
extras: String):FlashrRequest

Calls flickr.photos.getContactsPublicPhotos to fetch a list of recent public photos from a users’ contacts.

Parameters

nsidThe NSID of the user to fetch photos for.
countNumber of photos to return.  Defaults to 10, maximum 50.  This is only used if single_photo is not passed.  [Optional: default=10].
justFriendsset as 1 to only show photos from friends and family (excluding regular contacts).  [Optional: default=0].
singlePhotoOnly fetch one photo (the latest) per contact, instead of all photos in chronological order [Optional: default=0].
includeSelfSet to 1 to include photos from the calling user.  [Optional: default=0].
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

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetContactsPublicPhotos, http://www.flickr.com- /services- /api- /flickr.photos.getContactsPublicPhotos.html

photosGetContext

function photosGetContext (photoId: String):FlashrRequest

Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream.

Parameters

photoIdThe id of the photo to fetch the context for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetContext, http://www.flickr.com- /services- /api- /flickr.photos.getContext.html

photosGetCounts

function photosGetCounts (dates: String,
takenDates: String):FlashrRequest

Calls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user (authUser).

Authentication

This method requires authentication with ‘read’ permission.

Parameters

datesA comma delimited list of unix timestamps denoting the periods to return counts for.  They should be specified smallest first.  [Optional: if not present then takenDates used instead.
takenDatesA comma delimited list of mysql datetimes denoting the periods to return counts for.  They should be specified smallest first.  [Optional: if not present then dates used instead.

Note

  • The dates parameter is passed as UNIX Timestamps while the takenDates parameter is passed as MySQL Timestamps (e.g.  2005-03-21).
  • If you want to pass takenDates then pass “” (empty string) or undefined as the value of dates.

TODO

Should we change this method to accept Arrays of Date Objects rather than comma delimited Strings?  Then we could sort it making order unimportant and could abstract away the fact that Flickr stores dates uploaded and dates taken in different formats.  Maybe it would be better if the method’s arguments were dates (an Array of Date Objects) and type (Flashr.DATES_UPLOADED or Flashr.DATES_TAKEN)?

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetCounts, http://www.flickr.com- /services- /api- /flickr.photos.getCounts.html

photosGetExif

function photosGetExif (photoId: String,
secret: String):FlashrRequest

Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given Photo.

Parameters

photoIdThe id of the photo to fetch the context for.
secretThe secret for the photo.  If the correct secret is passed then permissions checking is skipped.  This enables the ‘sharing’ of individual photos by passing around the id and secret.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetExif, Photo.exifData, http://www.flickr.com- /services- /api- /flickr.photos.getExif.html

photosGetInfo

function photosGetInfo (photoId: String,
secret: String):FlashrRequest

Calls flickr.photos.getInfo to get information about a Photo.

Parameters

photoIdThe id of the photo to fetch the context for.
secretThe secret for the photo.  If the correct secret is passed then permissions checking is skipped.  This enables the ‘sharing’ of individual photos by passing around the id and secret.

See Also

FlashrResponse.onPhotosGetInfo, Photo, http://www.flickr.com- /services- /api- /flickr.photos.getInfo.html

photosGetNotInSet

function photosGetNotInSet (extras: String,
perPage: Number,
page: Number,
privacyFilter: Number):FlashrRequest

Calls flickr.photos.getNotInSet to get a list of the calling users’ (authUser) photos that are not part of any sets.

Authentication

This method requires authentication with ‘read’ permission.

Parameters

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]
privacyFilterReturn photos only matching a certain privacy level.  Valid values are held in the PRIV_* constants.  [Optional: Defaults to all photos]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetNotInSet, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY, PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photos.getNotInSet.html

photosGetPerms

function photosGetPerms (photoId: String):FlashrRequest

Calls flickr.photos.getPerms to get permissions for a photo.

Authentication

This method requires authentication with ‘read’ permission.

Parameters

photoIdThe id of the photo whose permissions you want

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetNotInSet, http://www.flickr.com- /services- /api- /flickr.photos.getPerms.html

photosGetRecent

function photosGetRecent (extras: String,
perPage: Number,
page: Number):FlashrRequest

Calls flickr.photos.getRecent to get a list of the latest public photos uploaded to flickr.

Parameters

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.onPhotosGetRecent, http://www.flickr.com- /services- /api- /flickr.photos.getRecent.html

photosGetSizes

function photosGetSizes (photoId: String):FlashrRequest

Calls flickr.photos.getRecent to get the available sizes for a photo.

Parameters

photoIdThe id of the photo to fetch size information for.

See Also

FlashrResponse.onPhotosGetSizes, http://www.flickr.com- /services- /api- /flickr.photos.getSizes.html

photosGetUntagged

function photosGetUntagged (extras: String,
perPage: Number,
page: Number):FlashrRequest

Calls flickr.photos.getUntagged to get a list of the calling users’ authUser photos with no tags.

Authentication

This method requires authentication with ‘read’ permission.

Parameters

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.onPhotosGetUntagged, http://www.flickr.com- /services- /api- /flickr.photos.getUntagged.html

photosGetWithGeoData

function photosGetWithGeoData (params):FlashrRequest

Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser geo-tagged photos.

Authentication

This method requires authentication with ‘read’ permission.

You pass an object with one or many of the following attributes...

Attributes

min_upload_dateMinimum upload date.  Photos with an upload date greater than or equal to this value will be returned.  The date should be in the form of a UNIX timestamp.
max_upload_dateMaximum upload date.  Photos with an upload date less than or equal to this value will be returned.  The date should be in the form of a UNIX timestamp.
min_taken_dateMinimum taken date.  Photos with an taken date greater than or equal to this value will be returned.  The date should be in the form of a MySQL datetime.
max_taken_dateMaximum taken date.  Photos with an taken date less than or equal to this value will be returned.  The date should be in the form of a MySQL datetime.
privacy_filterReturn photos only matching a certain privacy level.  Valid values are held in the PRIV_* constants.
sortThe 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, interestingness-asc and relevance
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
per_pageNumber of photos to return per page.  If this argument is ommited, it defaults to 100.  The maximum allowed value is 500.
pageThe page of results to return.  If this argument is ommited, it defaults to 1.

TODO

Should probably change it to accept dates as Date Objects...  Then you wouldn’t have to worry about what type of date flickr expects for the different arguments.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetWithGeoData, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY, PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photos.getWithGeoData.html

photosGetWithoutGeoData

function photosGetWithoutGeoData (params):FlashrRequest

Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser photos which haven’t been geo-tagged.

Authentication

This method requires authentication with ‘read’ permission.

You pass an object with one or many of the following attributes...

Attributes

min_upload_dateMinimum upload date.  Photos with an upload date greater than or equal to this value will be returned.  The date should be in the form of a UNIX timestamp.
max_upload_dateMaximum upload date.  Photos with an upload date less than or equal to this value will be returned.  The date should be in the form of a UNIX timestamp.
min_taken_dateMinimum taken date.  Photos with an taken date greater than or equal to this value will be returned.  The date should be in the form of a MySQL datetime.
max_taken_dateMaximum taken date.  Photos with an taken date less than or equal to this value will be returned.  The date should be in the form of a MySQL datetime.
privacy_filterReturn photos only matching a certain privacy level.  Valid values are held in the PRIV_* constants.
sortThe 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, interestingness-asc and relevance
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
per_pageNumber of photos to return per page.  If this argument is ommited, it defaults to 100.  The maximum allowed value is 500.
pageThe page of results to return.  If this argument is ommited, it defaults to 1.

TODO

Should probably change it to accept dates as Date Objects...  Then you wouldn’t have to worry about what type of date flickr expects for the different arguments.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGetWithoutGeoData, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photos.getWithoutGeoData.html

photosRecentlyUpdated

function photosRecentlyUpdated(minDate: Date,
extras: String,
perPage: Number,
page: Number):FlashrRequest

Calls 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.

Recently modified may mean that the photo’s metadata (title, description, tags) may have been changed or a comment has been added (or just modified somehow :-)

Authentication

This method requires authentication with ‘read’ permission.

Parameters

minDateThe Date from which modifications should be compared.
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.onPhotosRecentlyUpdated, http://www.flickr.com- /services- /api- /flickr.photos.recentlyUpdated.html

photosRemoveTag

function photosRemoveTag (tagId: Number):FlashrRequest

Calls flickr.photos.removeTag to remove a tag from a photo.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

tagIdThe tag to remove from the photo.  This parameter should contain a tag id, as returned by photosGetInfo.

See Also

FlashrResponse.onPhotosRemoveTag, http://www.flickr.com- /services- /api- /flickr.photos.removeTag.html

photosSearch

function photosSearch (params):FlashrRequest

Calls flickr.photos.search to get a list of photos matching some criteria.

You pass an object with one or many of the following attributes...

Attributes

user_idThe NSID of the user who’s photo to search.  If this parameter isn’t passed then everybody’s public photos will be searched.
tagsA comma-delimited list of tags.  Photos with one or more of the tags listed will be returned.
tag_modeEither ‘any’ for an OR combination of tags, or ‘all’ for an AND combination.  Defaults to ‘any’ if not specified.
textA free text search.  Photos who’s title, description or tags contain the text will be returned.
min_upload_dateMinimum upload date.  Photos with an upload date greater than or equal to this value will be returned.  The date should be in the form of a UNIX timestamp.
max_upload_dateMaximum upload date.  Photos with an upload date less than or equal to this value will be returned.  The date should be in the form of a UNIX timestamp.
min_taken_dateMinimum taken date.  Photos with an taken date greater than or equal to this value will be returned.  The date should be in the form of a MySQL datetime.
max_taken_dateMaximum taken date.  Photos with an taken date less than or equal to this value will be returned.  The date should be in the form of a MySQL datetime.
licenseA comma seperated list of license ids for photos.
sortThe 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, interestingness-asc and relevance
privacy_filterReturn photos only matching a certain privacy level.  This only applies when making an authenticated call to view photos you own.  Valid values are held in the PRIV_* constants.
bboxA comma-delimited list of 4 values defining the Bounding Box of the area that will be searched.  The 4 values represent the bottom-left corner of the box and the top-right corner, minimum_longitude, minimum_latitude, maximum_longitude, maximum_latitude.  Longitude has a range of -180 to 180 , latitude of -90 to 90.  [Defaults to -180, -90, 180, 90 if not specified]
accuracyRecorded accuracy level of the location information.  World level is GeoLocation.ACCURACY_WORLD, Country is ~ GeoLocation.ACCURACY_COUNTRY, Region ~ GeoLocation.ACCURACY_REGION, City ~ GeoLocation.ACCURACY_CITY, Street ~ GeoLocation.ACCURACY_STREET.  Current range is 1-16.  [Defaults to maximum value if not specified]
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
per_pageNumber of photos to return per page.  If this argument is ommited, it defaults to 100.  The maximum allowed value is 500.
pageThe page of results to return.  If this argument is ommited, it defaults to 1.

TODO

Should probably change it to accept dates as Date Objects...  Then you wouldn’t have to worry about what type of date flickr expects for the different arguments.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosSearch, http://www.flickr.com- /services- /api- /flickr.photos.search.html

photosSetDates

function photosSetDates (photoId: String,
datePosted: Date,
dateTaken: Date,
dateTakenGran: Number):FlashrRequest

Calls flickr.photos.setDates to set one or both of the dates for a photo..

All parameters are optional but you must provide either dateTaken or datePosted (or both if you like).

Dates are passed as Flash Date Objects so you don’t need to worry about the fact that flickr uses two different formats to represent it’s dates...

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to edit dates for.
datePostedThe Date the photo was uploaded to flickr.
dateTakenThe Date the photo was taken.
dateTakenGranThe granularity of the date the photo was taken.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosSetDates, http://flickr.com- /services- /api- /flickr.photos.setDates.html, http://flickr.com/services/api/misc.dates.html

photosSetMeta

function photosSetMeta (photoId: String,
title: String,
description: String):FlashrRequest

Calls flickr.photos.setMeta to set the meta information for a photo.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to edit dates for.
titleThe title for the photo.
descriptionThe description for the photo.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosSetMeta, http://flickr.com- /services- /api- /flickr.photos.setMeta.html

photosSetPerms

function photosSetPerms (photoId: String,
isPublic: Number,
isFriend: Number,
isFamily: Number,
permComment: Number,
permAddMeta: Number):FlashrRequest

Calls flickr.photos.setPerms to set permissions for a photo..

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to set permissions for.
isPublic1 to set the photo to public, 0 to set it to private.
isFriend1 to make the photo visible to friends when private, 0 to not.
isFamily1 to make the photo visible to family when private, 0 to not.
permCommentwho can add comments to the photo and it’s notes.  See Flashr.PERM_* for options.
permAddMetawho can add notes and tags to the photo.  See Flashr.PERM_* for options.

Returns

The generated FlashrRequest

See Also

Flashr.PERM_NOBODY, Flashr.PERM_FRIENDS, Flashr.PERM_CONTACTS, Flashr.PERM_EVERYBODY, FlashrResponse.onPhotosSetMeta, http://flickr.com- /services- /api- /flickr.photos.setMeta.html

photosSetTags

function photosSetTags (photoId: String,
tags: String):FlashrRequest

Calls flickr.photos.setTags to set the tags for a photo.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to edit dates for.
tagsAll tags for the photo (as a single space-delimited string).

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosSetTags, Photo._setTagsAsStrings (There are some problems listed there), http://flickr.com- /services- /api- /flickr.photos.setTags.html

photosCommentsAddComment

function photosCommentsAddComment(photoId: String,
comment: String):FlashrRequest

Calls flickr.photos.comments.addComment to add a comment to a photo as the currently authenticated user (authUser).

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the photo to add the comment to.
commentThe text of the comment

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosCommentsAddComment, Photo.getComments, http://flickr.com- /services- /api- /flickr.photos.comments.addComment.html

photosCommentsDeleteComment

function photosCommentsDeleteComment(commentId: String):FlashrRequest

Calls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser).

Authentication

This method requires authentication with ‘write’ permission.

Parameters

commentIdThe id of the comment you want to delete

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosCommentsDeleteComment, photosCommentsGetList, http://flickr.com- /services- /api- /flickr.photos.comments.deleteComment.html

photosCommentsEditComment

function photosCommentsEditComment(commentId: String,
commentText: String):FlashrRequest

Calls flickr.photos.comments.editComment to edit the text of a comment as the currently authenticated user (authUser).

Authentication

This method requires authentication with ‘write’ permission.

Parameters

commentIdThe id of the comment you want to edit.
commentTextThe new text for the comment.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosCommentsEditComment, photosCommentsGetList, http://flickr.com- /services- /api- /flickr.photos.comments.editComment.html

photosCommentsGetList

function photosCommentsGetList (photoId: String):FlashrRequest

Calls flickr.photos.comments.getList to get the comments for a photo.

Parameters

photoIdThe id of the photo to get comments for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosCommentsGetList, Photo.getComments, http://flickr.com- /services- /api- /flickr.photos.comments.getList.html

photosGeoGetLocation

function photosGeoGetLocation(photoId: String):FlashrRequest

Calls flickr.photos.geo.getLocation to get the GeoLocation for a Photo.

Note that if you want this information for more than one photo it is quicker and easier to provide the word “geo” to the “extras” parameter of the method call which is getting the list of photos you need the information for.

Parameters

photoIdThe id of the Photo to get GeoLocation for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGeoGetLocation, Photo.location, http://www.flickr.com- /services- /api- /flickr.photos.geo.getLocation.html

photosGeoGetPerms

function photosGeoGetPerms(photoId: String):FlashrRequest

Calls flickr.photos.geo.getPerms to get permissions for who may view geo data for a Photo

Note that if this same information is returned in a call to photosGetInfo along with lots of other information so if there is other info that you want then you may want to call that instead.

Authentication

This method requires authentication with ‘read’ permission.

Parameters

photoIdThe id of the Photo to get permissions to view geo data for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGeoGetPerms, Photo.geoPerms, http://www.flickr.com- /services- /api- /flickr.photos.geo.getPerms.html

photosGeoRemoveLocation

function photosGeoRemoveLocation(photoId: String):FlashrRequest

Calls flickr.photos.geo.removeLocation to the geo data GeoLocation associated with a Photo.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the Photo to get GeoLocation for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGeoRemoveLocation, Photo.location, http://www.flickr.com- /services- /api- /flickr.photos.geo.removeLocation.html

photosGeoSetLocation

function photosGeoSetLocation(photoId: String,
location: GeoLocation):FlashrRequest

Calls flickr.photos.geo.setLocation to set the GeoLocation (latitude and longitude and, optionally, the accuracy level) for a Photo.

Before users may assign location data to a photo they must define who, by default, may view that information.  Users can edit this preference at http://www.flickr.com/account/geo/privacy/.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the Photo to set Photo.location for
locationThe GeoLocation for this Photo

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGeoSetLocation, Photo.location, http://www.flickr.com- /services- /api- /flickr.photos.geo.setLocation.html

photosGeoSetPerms

function photosGeoSetPerms(photoId: String,
geoPerms: GeoPerms):FlashrRequest

Calls flickr.photos.geo.setPerms to set the permission for who may view the geo data associated with a Photo

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the Photo to set permissions to view geo data for.
geoPermsThe permissions to apply to this Photo

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosGeoGetPerms, Photo.geoPerms, http://www.flickr.com- /services- /api- /flickr.photos.geo.setPerms.html

photosLicensesGetInfo

function photosLicensesGetInfo():FlashrRequest

Fetches a list of availabale photo licenses for Flickr

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosLicensesGetInfo, http://www.flickr.com- /services- /api- /flickr.photos.licenses.getInfo.html

photosLicensesSetLicense

function photosLicensesSetLicense(photoId: String,
licenseId: Number):FlashrRequest

Sets the license for a photo.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the Photo you want to change the license for.
licenseIdThe id of the License you want to apply to this Photo.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosLicensesSetLicense, photosLicensesGetInfo, http://www.flickr.com- /services- /api- /flickr.photos.licenses.setLicense.html

photosNotesAdd

function photosNotesAdd(photoId: String,
noteX: Number,
noteY: Number,
noteW: Number,
noteH: Number,
noteText: String)

Add a Note to a Photo.  Coordinates and sizes are in pixels, based on the 500px image size shown on individual photo pages.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photoIdThe id of the Photo you want to add a Note to.
noteXThe left coordinate of the note.
noteYThe top coordinate of the note.
noteWThe width of the note.
noteHThe height of the note.
noteTextThe description of the note

See Also

FlashrResponse.onPhotosNotesAdd, http://www.flickr.com- /services- /api- /flickr.photos.notes.add.html

photosNotesDelete

function photosNotesDelete(noteId: String)

Delete a Note from a Photo.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

noteIdThe id of the Note you want to delete.

See Also

FlashrResponse.onPhotosNotesDelete, http://www.flickr.com- /services- /api- /flickr.photos.notes.delete.html

photosNotesEdit

function photosNotesEdit(noteId: String,
noteX: Number,
noteY: Number,
noteW: Number,
noteH: Number,
noteText: String)

Edit a Note on a Photo.  Coordinates and sizes are in pixels, based on the 500px image size shown on individual photo pages.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

noteIdThe id of the Note you want to edit.
noteXThe left coordinate of the note.
noteYThe top coordinate of the note.
noteWThe width of the note.
noteHThe height of the note.
noteTextThe description of the note

See Also

FlashrResponse.onPhotosNotesEdit, http://www.flickr.com- /services- /api- /flickr.photos.notes.edit.html

photosetsAddPhoto

function photosetsAddPhoto(photosetId: String,
photoId: String):FlashrRequest

Add a photo to the end of an existing photoset.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photosetIdThe id of the photoset to add a photo to.
photoIdThe id of the photo to add to the set.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsAddPhoto, http://www.flickr.com- /services- /api- /flickr.photosets.addPhoto.html

photosetsCreate

function photosetsCreate(title: String,
description: String,
primaryPhotoId: Number):FlashrRequest

Create a new photoset for the calling user (authUser).

Authentication

This method requires authentication with ‘write’ permission.

Parameters

titleA title for the photoset.
descriptionA description of the photoset.  May contain limited html.
primaryPhotoIdThe id of the Photo to represent this set.  The photo must belong to the calling user.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsCreate, http://www.flickr.com- /services- /api- /flickr.photosets.create.html

photosetsDelete

function photosetsDelete(photosetId: String):FlashrRequest

Delete a photoset.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photosetIdThe id of the Photoset to delete.  It must be owned by the calling user (authUser).

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsDelete, http://www.flickr.com- /services- /api- /flickr.photosets.delete.html

photosetsEditMeta

function photosetsEditMeta(photosetId: String,
title: String,
description: String):FlashrRequest

Modify the meta-data for a Photoset.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photosetIdThe id of the Photoset to modify.
titleThe new title for the photoset.
descriptionA description of the photoset.  May contain limited html.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsEditMeta, http://www.flickr.com- /services- /api- /flickr.photosets.editMeta.html

photosetsEditPhotos

function photosetsEditPhotos(photosetId: String,
primaryPhotoId: Number,
photoIds: Array):FlashrRequest

Modify the photos in a photoset.  Use this method to add, remove and re-order photos.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photosetIdThe id of the photoset to modify.  The photoset must belong to the calling user.
primaryPhotoIdThe id of the photo to use as the ‘primary’ photo for the set.  This id must also be passed along in photo_ids list argument.
photoIdsA comma-delimited list of photo ids to include in the set.  They will appear in the set in the order sent.  This list must contain the primary photo id.  All photos must belong to the owner of the set.  This list of photos replaces the existing list.  Call photosetsAddPhoto to append a photo to a set.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsEditPhotos, http://www.flickr.com- /services- /api- /flickr.photosets.editPhotos.html

photosetsGetContext

function photosetsGetContext(photoId: String,
photosetId: String):FlashrRequest

Returns next and previous photos for a photo in a set.

Parameters

photoIdThe id of the Photo to fetch the context for.
photosetIdThe id of the Photoset for which to fetch the Photo’s context.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsGetContext, http://www.flickr.com- /services- /api- /flickr.photosets.getContext.html

photosetsGetInfo

function photosetsGetInfo(photosetId: String):FlashrRequest

Gets information about a photoset.

Parameters

photosetIdThe id of the Photoset to fetch information for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsGetInfo, http://www.flickr.com- /services- /api- /flickr.photosets.getInfo.html

photosetsGetList

function photosetsGetList(userId: String):FlashrRequest

Gets the photosets belonging to the specified user.

Parameters

userIdThe nsid of the Person to get a photoset list for.  If none is specified, the calling user is assumed.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsGetList, http://www.flickr.com- /services- /api- /flickr.photosets.getList.html

photosetsGetPhotos

function photosetsGetPhotos(photosetId: String,
extras: String,
privacyFilter: Number):FlashrRequest

Get the list of photos in a set.

Parameters

photosetIdThe id of the Photoset to return the photos 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
privacyFilterReturn photos only matching a certain privacy level.  Valid values are held in the PRIV_* constants.  [Optional: Defaults to all photos]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsGetPhotos, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photosets.getPhotos.html

photosetsOrderSets

function photosetsOrderSets(photosetIds: Array):FlashrRequest

Set the order of photosets for the calling user.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photosetIdsAn array of photoset IDs, ordered with the set to show first, first in the list.  Any set IDs not given in the list will be set to appear at the end of the list, ordered by their IDs.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsOrderSets, http://www.flickr.com- /services- /api- /flickr.photosets.orderSets.html

photosetsRemovePhoto

function photosetsRemovePhoto(photosetId: String,
photoId: String):FlashrRequest

Remove a photo from a photoset.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photosetIdThe id of the Photoset to remove a Photo from.
photoIdThe id of the Photo to remove from the set.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsRemovePhoto, http://www.flickr.com- /services- /api- /flickr.photosets.removePhoto.html

photosetsCommentsAddComment

function photosetsCommentsAddComment(photosetId: String,
comment: String):FlashrRequest

Add a comment to a photoset.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

photosetIdThe id of the Photoset you want to add a comment to.
commentThe text of the PhotosetComment you want to make.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsCommentsAddComment, http://www.flickr.com- /services- /api- /flickr.photosets.comments.addComment.html

photosetsCommentsDeleteComment

function photosetsCommentsDeleteComment(commentId: String):FlashrRequest

Delete a photoset comment as the currently authenticated user.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

commentIdThe id of the PhotosetComment you want to delete.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsCommentsDeleteComment, http://www.flickr.com- /services- /api- /flickr.photosets.comments.deleteComment.html

photosetsCommentsEditComment

function photosetsCommentsEditComment(commentId: String,
comment: String):FlashrRequest

Edit the text of a comment as the currently authenticated user.

Authentication

This method requires authentication with ‘write’ permission.

Parameters

commentIdThe id of the PhotosetComment you want to edit.
commentThe text you want to change the PhotosetComment to.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsCommentsEditComment, http://www.flickr.com- /services- /api- /flickr.photosets.comments.editComment.html

photosetsCommentsGetList

function photosetsCommentsGetList(photosetId: String,
comment: String):FlashrRequest

Returns the comments for a photoset.

Parameters

photosetIdThe id of the Photoset you want to get PhotosetComments for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onPhotosetsCommentsGetList, http://www.flickr.com- /services- /api- /flickr.photosets.comments.getList.html

tagsGetListPhoto

public function tagsGetListPhoto(photoId: String):FlashrRequest

Calls flickr.tags.getListPhoto to get the tag list for a given photo.

Parameters

photoIdThe id of the photo to return tags for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onTagsGetListPhoto, http://www.flickr.com- /services- /api- /flickr.tags.getListPhoto.html

tagsGetListUser

public function tagsGetListUser(userId: String):FlashrRequest

Calls flickr.tags.getListUser to get the tag list for a given user (or the currently logged in user).

Parameters

userIdThe NSID of the user to fetch the tag list for.  [Optional: defaults to authUser (if any)]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onTagsGetListUser, http://www.flickr.com- /services- /api- /flickr.tags.getListUser.html

tagsGetListUserPopular

public function tagsGetListUserPopular(userId: String,
count: Number):FlashrRequest

Calls flickr.tags.getListUserPopular to get the popular tags for a given user (or the currently logged in user).

Parameters

userIDThe NSID of the user to fetch the tag list for.  [Optional: defaults to authUser (if any)]
countNumber of popular tags to return.  [Optional: default=10]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onTagsGetListUserPopular, FlashrResponse.onError http://www.flickr.com- /services- /api- /flickr.tags.getListUserPopular.html

tagsGetRelated

public function tagsGetRelated(tag: String):FlashrRequest

Calls flickr.tags.getRelated to get a list of tags ‘related’ to the given tag, based on clustered usage analysis.

Parameters

tagThe tag to fetch related tags for.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onTagsGetRelated, FlashrResponse.onError, http://www.flickr.com- /services- /api- /flickr.tags.getRelated.html

testEcho

public function testEcho():FlashrRequest

Calls flickr.test.echo - forwards any arguments on to the Flickr API

Parameters

1...nAny number of parameters to echo back from the server [Optional]

Returns

The generated FlashrRequest

See Also

FlashrResponse.onTestEcho, http://www.flickr.com- /services- /api- /flickr.test.echo.html

testLogin

public function testLogin():FlashrRequest

Calls flickr.test.login - A testing method which checks if the caller is logged in then returns their username.

Authentication

This method requires authentication with ‘read’ permission.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onTestLogin, FlashrResponse.onError, http://www.flickr.com- /services- /api- /flickr.test.login.html

testNull

public function testNull():FlashrRequest

Null test

Authentication

This method requires authentication with ‘read’ permission.

Returns

The generated FlashrRequest

See Also

FlashrResponse.onTestNull, FlashrResponse.onError, http://www.flickr.com- /services- /api- /flickr.test.null.html

executeAtPriority

function executeAtPriority(method: String,
args: Array,
priority: Number):FlashrRequest

Execute a Flashr.* function at a different priority to the current queuePriority.

Useful in a situation where e.g. you are loading lots of information about different photos but one has been clicked on so you want that one to jump to the front of the queue.

You loose the strict type checking of calling the method directly but gain the convienience of easily executing one request at a different priority.

Usage example

Replace

_flashr.photosGetSizes(photo.id);

with

_flashr.executeAtPriority(‘photosGetSizes’, [photo.id], 1);

This will have the same expect except for that the request will be executed with a priority of 1 rather than the current value of queuePriority.

Parameters

methodThe name of the Flashr method you want to call as a String (e.g.  “photosSearch”).
argsThe arguments you would pass to the Flashr method you are calling (in an Array).
priorityThe priority to call this method with.  The lower the number the higher the priority.

Returns

The generated FlashrRequest

See Also

queuePriority, FlashrRequestQueue

queueRequest

function queueRequest(request: FlashrRequest):FlashrRequest

Queues a request for execution on flickr.com

Parameters

requestThe FlashrRequest to queue.

Returns

The FlashrRequest that was queued (you can use this object to change the priority of a given request etc)

callMethod

private function callMethod(request: FlashrRequest):Void

Used internally to call a method on the flickr API.

Use queueRequest if you want to call a method on flickr.com which isn’t implemented in Flashr

Parameters

requestThe FlashrRequest to call

See also

queueRequest, FlashrApiResponse.onAPIResponse

getFlashr

public static function getFlashr():Flashr

Returns a reference to the Flashr instance - if none exists yet then creates one and returns a reference to that.

This is the only access to the Singleton instance of this class.

Returns

The one and only Flashr instance.

public static var SUBVERSION_ID: String
A reference to the this file as stored in subversion.
private var _apiKey: String
Your Flickr API Key.
static var REST_ENDPOINT: String
The place for all API calls to connect to.
private var _AUTH_ENDPOINT: String
The base path you go to when you want to authenticate on flickr.com
public static var STATUS_BUSY: Number
The API is already waiting for the response to a method call so cannot make another call
public static var STATUS_ERROR_CONNECTING: Number
Could not connect to the server (e.g.
public static var STATUS_INVALID_XML: Number
The XML returned by the server wasn’t in a rsp / tag.
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)
public static var STATUS_INVALID_API_KEY: Number
The API key sent to flickr was invalid (returned from flickr.com)
public static var STATUS_OK: Number
There was no errors and valid XML was returned.
public static var PERM_NOBODY: Number
A constant representing permissions for nobody.
public static var PERM_FRIENDS: Number
A constant representing permissions for friends and family.
public static var PERM_CONTACTS: Number
A constant representing permissions for contacts.
public static var PERM_EVERYBODY: Number
A constant representing permissions for everybody.
public static var PRIV_PUBLIC: Number
A constant representing public photos.
public static var PRIV_FRIENDS: Number
A constant representing private photos visible to friends.
public static var PRIV_FAMILY: Number
A constant representing private photos visible to family.
public static var PRIV_FRIENDS_FAMILY: Number
A constant representing private photos visible to friends & family.
public static var PRIV_PRIVATE: Number
A constant representing completely private photos.
private var _secret: String
Private variable to store this app’s shared secret for use with the authentication API.
private var _authToken: String
Stores the token generated by a successful authorisation.
private var _authFrob: String
Stores the frob which is used for the initial part of the authentication process.
private var _authIsLoggingIn: Boolean
A flag which marks whether a user is currently logging in (used internally during the login process)
var authPerms: String
A variable describing the permissions the currently auth’d user has within this app.
var authUser: Person
A Person object for the currently auth’d user (if there is one).
Class to describe a person from Flickr.
var cacheQueries: Boolean
Sets whether the results of queries to flickr.com should be cached.
var cacheObeyOrder: Boolean
Whether to ensure that cached results are returned in the same order as they are added to the queue (i.e.
function get cache():FlashrCache
Variable holding the FlashrCache instance used to hold cached query results where cacheQueries is true.
Class to cache relevant queries to flickr.com.
function get queue():FlashrRequestQueue
The FlashrRequestQueue.
Handles the queue of FlashrRequest objects sent to the Flickr API.
var queuePriority: Number
The priority to add requests to the queue at...
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)
function get history():FlashrResponseHistory
The FlashrResponseHistory if saveHistory is true
Stores information about completed Flickr API requests.
var saveHistory: Boolean
Whether or not a FlashrResponseHistory should be saved of all the calls to flickr.com and all the responses from it.
private function Flashr()
function cancelCurrentRequest()
If there is a FlashrRequest which has been made to flickr.com and hasn’t returned yet then mark it cancelled.
Class to hold information about requests to the Flickr API through Flashr
public function authSetSecret(secret: String)
Use to set the value of the shared secret before any calls to methods like authLogin or authCheckToken
public function authLogin(perms: String)
Pops open a login window so that the user can authenticate with the flickr.com website.
public function authCheckToken(authToken: String):FlashrRequest
Calls flickr.auth.checkToken to get the credentials attached to an authentication token.
public function authGetFrob(authIsLoggingIn: Boolean):FlashrRequest
Calls flickr.auth.getFrob to get a frob to be used during authentication.
public function authGetToken():FlashrRequest
Calls flickr.auth.getToken to get the auth token for the given frob, if one has been attached.
public function authLogout()
Simple function which forgets the information that was making this user be logged in.
private function _authOpenLogin()
Internal function which generates the relevant link and pops open the login window on flickr.com.
function _authSignCall(urlArguments: Object):String
Internal, private function which is used to generate the api_sig used to sign a call.
public function contactsGetList(filter: String):FlashrRequest
Calls flickr.contacts.getList to get a list of contacts for the calling user.
public function contactsGetPublicList(userId: String):FlashrRequest
Calls flickr.contacts.getPublicList to get a list of contacts a user.
public function favoritesAdd(photoId: String):FlashrRequest
Calls flickr.favorites.add to add a photo to a user’s favorites list.
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.
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.
public function favoritesRemove(photoId: String):FlashrRequest
Calls flickr.favorites.remove to remove a photo from a user’s favorites list.
function groupsPoolsAdd(photoId: String,
groupId: String):FlashrRequest
Add a photo to a group’s pool.
function groupsPoolsGetContext(photoId: String,
groupId: String):FlashrRequest
Gets next and previous photos for a photo in a group pool.
function groupsPoolsGetGroups():FlashrRequest
Gets a list of groups to which you can add photos.
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).
function groupsPoolsRemove(photoId: String,
groupId: String):FlashrRequest
Remove a photo from a group pool.
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
function peopleFindByEmail(email: String):FlashrRequest
Calls flickr.people.findByEmail to get a user’s NSID, given their email address.
function peopleFindByUsername(username: String):FlashrRequest
Calls flickr.people.findByUsername to get a user’s NSID, given their username.
function peopleGetInfo(nsid: String):FlashrRequest
Calls flickr.people.getInfo to get information about a user.
function peopleGetPublicGroups(userId: String):FlashrRequest
Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of.
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.
function peopleGetUploadStatus():FlashrRequest
Calls flickr.people.getUploadStatus to get information for the calling user related to photo uploads.
function photosAddTags (photoId: String,
tags: String):FlashrRequest
Calls flickr.photos.addTags to add tags to a given photo.
function photosDelete (photoId: String):FlashrRequest
Calls flickr.photos.addTags to delete a photo from flickr.
function photosGetAllContexts(photoId: String):FlashrRequest
Returns all visble sets and pools the photo belongs to.
function photosGetContactsPhotos (count: Number,
justFriends: Number,
singlePhoto: Number,
includeSelf: Number,
extras: String):FlashrRequest
Calls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ (authUser) contacts.
function photosGetContactsPublicPhotos (nsid: String,
count: Number,
justFriends: Number,
singlePhoto: Number,
includeSelf: Number,
extras: String):FlashrRequest
Calls flickr.photos.getContactsPublicPhotos to fetch a list of recent public photos from a users’ contacts.
function photosGetContext (photoId: String):FlashrRequest
Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream.
function photosGetCounts (dates: String,
takenDates: String):FlashrRequest
Calls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user (authUser).
function photosGetExif (photoId: String,
secret: String):FlashrRequest
Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given Photo.
Class to describe a photo from Flickr.
function photosGetInfo (photoId: String,
secret: String):FlashrRequest
Calls flickr.photos.getInfo to get information about a Photo.
function photosGetNotInSet (extras: String,
perPage: Number,
page: Number,
privacyFilter: Number):FlashrRequest
Calls flickr.photos.getNotInSet to get a list of the calling users’ (authUser) photos that are not part of any sets.
function photosGetPerms (photoId: String):FlashrRequest
Calls flickr.photos.getPerms to get permissions for a photo.
function photosGetRecent (extras: String,
perPage: Number,
page: Number):FlashrRequest
Calls flickr.photos.getRecent to get a list of the latest public photos uploaded to flickr.
function photosGetSizes (photoId: String):FlashrRequest
Calls flickr.photos.getRecent to get the available sizes for a photo.
function photosGetUntagged (extras: String,
perPage: Number,
page: Number):FlashrRequest
Calls flickr.photos.getUntagged to get a list of the calling users’ authUser photos with no tags.
function photosGetWithGeoData (params):FlashrRequest
Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser geo-tagged photos.
function photosGetWithoutGeoData (params):FlashrRequest
Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser photos which haven’t been geo-tagged.
function photosRecentlyUpdated(minDate: Date,
extras: String,
perPage: Number,
page: Number):FlashrRequest
Calls 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.
function photosRemoveTag (tagId: Number):FlashrRequest
Calls flickr.photos.removeTag to remove a tag from a photo.
function photosSearch (params):FlashrRequest
Calls flickr.photos.search to get a list of photos matching some criteria.
function photosSetDates (photoId: String,
datePosted: Date,
dateTaken: Date,
dateTakenGran: Number):FlashrRequest
Calls flickr.photos.setDates to set one or both of the dates for a photo..
function photosSetMeta (photoId: String,
title: String,
description: String):FlashrRequest
Calls flickr.photos.setMeta to set the meta information for a photo.
function photosSetPerms (photoId: String,
isPublic: Number,
isFriend: Number,
isFamily: Number,
permComment: Number,
permAddMeta: Number):FlashrRequest
Calls flickr.photos.setPerms to set permissions for a photo..
function photosSetTags (photoId: String,
tags: String):FlashrRequest
Calls flickr.photos.setTags to set the tags for a photo.
function photosCommentsAddComment(photoId: String,
comment: String):FlashrRequest
Calls flickr.photos.comments.addComment to add a comment to a photo as the currently authenticated user (authUser).
function photosCommentsDeleteComment(commentId: String):FlashrRequest
Calls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser).
function photosCommentsEditComment(commentId: String,
commentText: String):FlashrRequest
Calls flickr.photos.comments.editComment to edit the text of a comment as the currently authenticated user (authUser).
function photosCommentsGetList (photoId: String):FlashrRequest
Calls flickr.photos.comments.getList to get the comments for a photo.
function photosGeoGetLocation(photoId: String):FlashrRequest
Calls flickr.photos.geo.getLocation to get the GeoLocation for a Photo.
Class to describe the geographical location of a Photo on flickr.com.
function photosGeoGetPerms(photoId: String):FlashrRequest
Calls flickr.photos.geo.getPerms to get permissions for who may view geo data for a Photo
function photosGeoRemoveLocation(photoId: String):FlashrRequest
Calls flickr.photos.geo.removeLocation to the geo data GeoLocation associated with a Photo.
function photosGeoSetLocation(photoId: String,
location: GeoLocation):FlashrRequest
Calls flickr.photos.geo.setLocation to set the GeoLocation (latitude and longitude and, optionally, the accuracy level) for a Photo.
function photosGeoSetPerms(photoId: String,
geoPerms: GeoPerms):FlashrRequest
Calls flickr.photos.geo.setPerms to set the permission for who may view the geo data associated with a Photo
function photosLicensesGetInfo():FlashrRequest
Fetches a list of availabale photo licenses for Flickr
function photosLicensesSetLicense(photoId: String,
licenseId: Number):FlashrRequest
Sets the license for a photo.
function photosNotesAdd(photoId: String,
noteX: Number,
noteY: Number,
noteW: Number,
noteH: Number,
noteText: String)
Add a Note to a Photo.
Class to describe a note on a photo on Flickr.
function photosNotesDelete(noteId: String)
Delete a Note from a Photo.
function photosNotesEdit(noteId: String,
noteX: Number,
noteY: Number,
noteW: Number,
noteH: Number,
noteText: String)
Edit a Note on a Photo.
function photosetsAddPhoto(photosetId: String,
photoId: String):FlashrRequest
Add a photo to the end of an existing photoset.
function photosetsCreate(title: String,
description: String,
primaryPhotoId: Number):FlashrRequest
Create a new photoset for the calling user (authUser).
function photosetsDelete(photosetId: String):FlashrRequest
Delete a photoset.
function photosetsEditMeta(photosetId: String,
title: String,
description: String):FlashrRequest
Modify the meta-data for a Photoset.
Describes a Photoset on flickr.com
function photosetsEditPhotos(photosetId: String,
primaryPhotoId: Number,
photoIds: Array):FlashrRequest
Modify the photos in a photoset.
function photosetsGetContext(photoId: String,
photosetId: String):FlashrRequest
Returns next and previous photos for a photo in a set.
function photosetsGetInfo(photosetId: String):FlashrRequest
Gets information about a photoset.
function photosetsGetList(userId: String):FlashrRequest
Gets the photosets belonging to the specified user.
function photosetsGetPhotos(photosetId: String,
extras: String,
privacyFilter: Number):FlashrRequest
Get the list of photos in a set.
function photosetsOrderSets(photosetIds: Array):FlashrRequest
Set the order of photosets for the calling user.
function photosetsRemovePhoto(photosetId: String,
photoId: String):FlashrRequest
Remove a photo from a photoset.
function photosetsCommentsAddComment(photosetId: String,
comment: String):FlashrRequest
Add a comment to a photoset.
function photosetsCommentsDeleteComment(commentId: String):FlashrRequest
Delete a photoset comment as the currently authenticated user.
function photosetsCommentsEditComment(commentId: String,
comment: String):FlashrRequest
Edit the text of a comment as the currently authenticated user.
function photosetsCommentsGetList(photosetId: String,
comment: String):FlashrRequest
Returns the comments for a photoset.
public function tagsGetListPhoto(photoId: String):FlashrRequest
Calls flickr.tags.getListPhoto to get the tag list for a given photo.
public function tagsGetListUser(userId: String):FlashrRequest
Calls flickr.tags.getListUser to get the tag list for a given user (or the currently logged in user).
public function tagsGetListUserPopular(userId: String,
count: Number):FlashrRequest
Calls flickr.tags.getListUserPopular to get the popular tags for a given user (or the currently logged in user).
public function tagsGetRelated(tag: String):FlashrRequest
Calls flickr.tags.getRelated to get a list of tags ‘related’ to the given tag, based on clustered usage analysis.
public function testEcho():FlashrRequest
Calls flickr.test.echo - forwards any arguments on to the Flickr API
public function testLogin():FlashrRequest
Calls flickr.test.login - A testing method which checks if the caller is logged in then returns their username.
public function testNull():FlashrRequest
Null test
function executeAtPriority(method: String,
args: Array,
priority: Number):FlashrRequest
Execute a Flashr.* function at a different priority to the current queuePriority.
function queueRequest(request: FlashrRequest):FlashrRequest
Queues a request for execution on flickr.com
private function callMethod(request: FlashrRequest):Void
Used internally to call a method on the flickr API.
public static function getFlashr():Flashr
Returns a reference to the Flashr instance - if none exists yet then creates one and returns a reference to that.
Class to define a listener for responses from the FlickrAPI.
function clearQueue()
Empties the queue.
var cancelled: Boolean
Whether this FlashrRequest has been cancelled.
public function onAuthGetFrob(frob)
Called when there is a successful response from a call to flickr.auth.getFrob
public function onAuthCheckToken(token)
Called when there is a successful response from a call to flickr.auth.getToken or flickr.auth.checkToken.
function onError(errorCode: Number,
errorDescription: String,
request: FlashrRequest)
Called when the Flickr API returns an error code..
function onContactsGetList(user: Person,
filter: String)
Called when there is a response from a call to flickr.contacts.getList.
function onContactsGetPublicList(user: Person)
Called when there is a response from a call to flickr.contacts.getPublicList.
function onFavoritesAdd(photo: Photo)
Called when there is a response from a call to flickr.favorites.add.
function onFavoritesGetList(user: Person,
resultsSet: ResultsSet)
Called when there is a response from a call to flickr.favorites.getList.
function onFavoritesGetPublicList(user: Person,
resultsSet: ResultsSet)
Called when there is a response from a call to flickr.favorites.getPublicList.
function onFavoritesRemove(photo: Photo)
Called when there is a response from a call to flickr.favorites.remove.
function onGroupsPoolsAdd(photo: Photo,
group: Group)
Called when there is a response from a call to flickr.groups.pools.add
function onGroupsPoolsGetGroups(user: Person)
Called when there is a response from a call to flickr.groups.pools.getGroups
function onGroupsPoolsGetPhotos(group: Group,
resultsSet: ResultsSet)
Called when there is a response from a call to flickr.groups.pools.getPhotos
function onGroupsPoolsRemove(photo: Photo,
group: Group)
Called when there is a response from a call to flickr.groups.pools.remove
function onInterestingnessGetList(resultsSet: ResultsSet,
date: Date)
Called when there is a response from a call to flickr.interestingness.getList
function onPeopleFindByEmail(person: Person)
Called when there is a response from a call to flickr.people.findByEmail.
function onPeopleFindByUsername(person: Person)
Called when there is a response from a call to flickr.people.findByUsername.
function onPeopleGetInfo(person: Person)
Called when there is a response from a call to flickr.people.getInfo.
function onPeopleGetPublicGroups(person: Person)
Called when there is a response from a call to flickr.people.getPublicGroups.
function onPeopleGetPublicPhotos(person: Person,
resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getPublicPhotos.
function onPeopleGetUploadStatus(person: Person)
Called when there is a response from a call to flickr.people.getUploadStatus.
function onPhotosAddTags(photo: Photo,
tags: String)
Called when there is a response from a call to flickr.photos.addTags.
function onPhotosDelete(photoId: String)
Called when there is a response from a call to flickr.photos.delete.
function onPhotosGetAllContexts(photo: Photo)
Called when there is a response from a call to flickr.people.getAllContexts.
function onPhotosGetContactsPhotos(resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getContactsPhotos.
function onPhotosGetContactsPublicPhotos(person: Person,
resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getContactsPhotos.
function onPhotosGetContext(photo: Photo)
Called when there is a response from a call to flickr.people.getContext.
function onPhotosGetCounts(counts: Array)
Called when there is a response from a call to flickr.people.getCounts.
function onPhotosGetExif(photo: Photo)
Called when there is a response from a call to flickr.people.getExif.
public var exifData: Array
The EXIF/TIFF/GPS tags associated with this photo.
function onPhotosGetInfo(photo: Photo)
Called when there is a response from a call to flickr.people.getInfo.
function onPhotosGetNotInSet(resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getPhotosNotInSet.
function onPhotosGetRecent(resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getRecent.
function onPhotosGetSizes(photo: Photo)
Called when there is a response from a call to flickr.people.getSizes.
function onPhotosGetUntagged(resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getUntagged.
function onPhotosGetWithGeoData(resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getWithGeoData.
function onPhotosGetWithoutGeoData(resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.getWithoutGeoData.
function onPhotosRecentlyUpdated(resultsSet: ResultsSet,
minDate: Date)
Called when there is a response from a call to flickr.photos.recentlyUpdated
function onPhotosRemoveTag(tagId: Number)
Called when there is a response from a call to flickr.people.removeTag.
public static var ACCURACY_WORLD: Number
An accuracy level of world.
public static var ACCURACY_COUNTRY: Number
An accuracy level of country.
public static var ACCURACY_REGION: Number
An accuracy level of region.
public static var ACCURACY_CITY: Number
An accuracy level of city.
public static var ACCURACY_STREET: Number
An accuracy level of street.
function onPhotosSearch(resultsSet: ResultsSet)
Called when there is a response from a call to flickr.people.search.
function onPhotosSetDates(photo: Photo)
Called when there is a response from a call to flickr.people.setDates.
function onPhotosSetMeta(photo: Photo)
Called when there is a response from a call to flickr.people.setMeta.
function onPhotosSetTags(photo: Photo)
Called when there is a response from a call to flickr.people.setTags.
private function _setTagsAsStrings(tags: String,
author: Person)
Private internal function - set’s this Photo’s _tags...
function onPhotosCommentsAddComment(comment: Comment,
photo: Photo)
Called when there is a response from a call to flickr.photos.comments.addComment
function getComments():Array
Returns an Array of all the Comments left on this Photo.
function onPhotosCommentsDeleteComment(comment: Comment)
Called when there is a response from a call to flickr.photos.comments.deleteComment
function onPhotosCommentsEditComment(comment: Comment)
Called when there is a response from a call to flickr.photos.comments.editComment
function onPhotosCommentsGetList(photo: Photo)
Called when there is a response from a call to flickr.photos.comments.getList.
function onPhotosGeoGetLocation(photo: Photo)
Called when there is a response from a call to flickr.photos.geo.getLocation
public var location: GeoLocation
The GeoLocation of this Photo.
function onPhotosGeoGetPerms(photo: Photo)
Called when there is a response from a call to flickr.photos.geo.getPerms
var geoPerms: GeoPerms
GeoPerms describing who may view geo data for a photo.
function onPhotosGeoRemoveLocation(photo: Photo)
Called when there is a response from a call to flickr.photos.geo.removeLocation
function onPhotosGeoSetLocation(photo: Photo)
Called when there is a response from a call to flickr.photos.geo.setLocation
function onPhotosLicensesGetInfo(licences: Array)
Called when there is a response from a call to flickr.photos.licenses.getInfo.
Represents one of the possible Licences on flickr.com
function onPhotosLicensesSetLicense(photo: Photo)
Called when there is a response from a call to flickr.photos.licenses.setLicense.
function onPhotosNotesAdd(photo: Photo,
note: Note)
Called when there is a response from a call to flickr.photos.notes.add
function onPhotosNotesDelete(noteId: String)
Called when there is a response from a call to flickr.photos.notes.delete
function onPhotosNotesEdit(note: Note)
Called when there is a response from a call to flickr.photos.notes.edit
function onPhotosetsAddPhoto(photoset: Photoset)
Called when there is a response from a call to flickr.photosets.addPhoto
function onPhotosetsCreate(photoset: Photoset)
Called when there is a response from a call to flickr.photosets.create
function onPhotosetsDelete(photosetId: Number)
Called when there is a response from a call to flickr.photosets.delete
function onPhotosetsEditMeta(photoset: Photoset)
Called when there is a response from a call to flickr.photosets.editMeta
function onPhotosetsEditPhotos(photoset: Photoset)
Called when there is a response from a call to flickr.photosets.editPhotos
function onPhotosetsGetContext(photo: Photo,
photoset: Photoset)
Called when there is a response from a call to flickr.photosets.getContext
function onPhotosetsGetInfo(photoset: Photoset)
Called when there is a response from a call to flickr.photosets.getInfo
function onPhotosetsGetList(user: Person)
Called when there is a response from a call to flickr.photosets.getList
function onPhotosetsGetPhotos(photoset: Photoset,
request: FlashrRequest)
Called when there is a response from a call to flickr.photosets.getPhotos
function onPhotosetsOrderSets(user: Person)
Called when there is a response from a call to flickr.photosets.orderSets
function onPhotosetsRemovePhoto(photoset: Photoset)
Called when there is a response from a call to flickr.photosets.removePhoto
Class to describe a comment on a Photoset on Flickr.
function onPhotosetsCommentsAddComment(comment: PhotosetComment)
Called when there is a response from a call to flickr.photosets.comments.addComment
function onPhotosetsCommentsDeleteComment(commentId: String)
Called when there is a response from a call to flickr.photosets.comments.deleteComment
function onPhotosetsCommentsEditComment(comment: PhotosetComment)
Called when there is a response from a call to flickr.photosets.comments.editComment
function onPhotosetsCommentsGetList(photoset: Photoset)
Called when there is a response from a call to flickr.photosets.comments.getList
function onTagsGetListPhoto(photo: Photo)
Called when there is a response from a call to flickr.tags.tagsGetListPhoto.
function onTagsGetListUser(person: Person)
Called when there is a response from a call to flickr.tags.getListUser.
function onTagsGetListUserPopular(person: Person)
Called when there is a response from a call to flickr.tags.getListUserPopular.
function onTagsGetRelated(sourceTag: Tag)
Called when there is a response from a call to flickr.tags.tagsGetRelated.
function onTestEcho(params: Object)
Called when there is a response from a call to flickr.test.echo.
function onTestLogin(user: Person)
Called when there is a response from a call to flickr.test.login
function onTestNull()
Called when there is a response from a call to flickr.test.null
private function onAPIResponse(success: Boolean):Void
Called internally on recepit of a response from a request to the Flashr.REST_ENDPOINT.