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/)
FlashrResponse, http://flashr.kelvinluck.com/, http://www.flickr.com/services/api/
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.
0.5.0
Kelvin Luck < kelvin at kelvinluck dot com >
$Id: Flashr.as 80 2006-09-06 17:53:53Z kluck $
| com. kelvinluck. flashr. core. Flashr | Flashr is an ActionScript 2 wrapper for the Flickr API. |
| SUBVERSION_ID | A reference to the this file as stored in subversion. |
| apiKey | Your Flickr API Key. |
| REST_ENDPOINT | The place for all API calls to connect to. |
| _AUTH_ENDPOINT | The base path you go to when you want to authenticate on flickr.com |
| STATUS_BUSY | The API is already waiting for the response to a method call so cannot make another call |
| STATUS_ERROR_CONNECTING | Could not connect to the server (e.g. |
| STATUS_INVALID_XML | The XML returned by the server wasn’t in a <rsp /> tag. |
| STATUS_USER_NOT_LOGGED_IN | The user wasn’t logged in and tried to access a method that requires authentication (returned from flickr.com) |
| STATUS_INVALID_API_KEY | The API key sent to flickr was invalid (returned from flickr.com) |
| STATUS_OK | There was no errors and valid XML was returned. |
| PERM_NOBODY | A constant representing permissions for nobody. |
| PERM_FRIENDS | A constant representing permissions for friends and family. |
| PERM_CONTACTS | A constant representing permissions for contacts. |
| PERM_EVERYBODY | A constant representing permissions for everybody. |
| PRIV_PUBLIC | A constant representing public photos. |
| PRIV_FRIENDS | A constant representing private photos visible to friends. |
| PRIV_FAMILY | A constant representing private photos visible to family. |
| PRIV_FRIENDS_FAMILY | A constant representing private photos visible to friends & family. |
| PRIV_PRIVATE | A constant representing completely private photos. |
| _secret | Private variable to store this app’s shared secret for use with the authentication API. |
| authToken | Stores the token generated by a successful authorisation. |
| authFrob | Stores the frob which is used for the initial part of the authentication process. |
| authIsLoggingIn | A flag which marks whether a user is currently logging in (used internally during the login process) |
| authPerms | A variable describing the permissions the currently auth’d user has within this app. |
| authUser | A Person object for the currently auth’d user (if there is one). |
| cacheQueries | Sets whether the results of queries to flickr.com should be cached. |
| cacheObeyOrder | Whether to ensure that cached results are returned in the same order as they are added to the queue (i.e. |
| cache | Variable holding the FlashrCache instance used to hold cached query results where cacheQueries is true. |
| queue | The FlashrRequestQueue. |
| queuePriority | The priority to add requests to the queue at... |
| queryMaxFrequency | The number of milliseconds to wait between subsequent queries to flickr.com (Flickr’s TOS request no more than one request per second) |
| history | The FlashrResponseHistory if saveHistory is true |
| saveHistory | Whether or not a FlashrResponseHistory should be saved of all the calls to flickr.com and all the responses from it. |
| Flashr | |
| cancelCurrentRequest | If there is a FlashrRequest which has been made to flickr.com and hasn’t returned yet then mark it cancelled. |
| authSetSecret | Use to set the value of the shared secret before any calls to methods like authLogin or authCheckToken |
| authLogin | Pops open a login window so that the user can authenticate with the flickr.com website. |
| authGetFrob | Calls flickr.auth.getFrob to get a frob to be used during authentication. |
| authGetToken | Calls flickr.auth.getToken to get the auth token for the given frob, if one has been attached. |
| authCheckToken | Calls flickr.auth.checkToken to get the credentials attached to an authentication token. |
| authLogout | Simple function which forgets the information that was making this user be logged in. |
| _authOpenLogin | Internal function which generates the relevant link and pops open the login window on flickr.com. |
| _authSignCall | Internal, private function which is used to generate the api_sig used to sign a call. |
| contactsGetList | Calls flickr.contacts.getList to get a list of contacts for the calling user. |
| contactsGetPublicList | Calls flickr.contacts.getPublicList to get a list of contacts a user. |
| favoritesAdd | Calls flickr.favorites.add to add a photo to a user’s favorites list. |
| favoritesGetList | Calls flickr.favorites.getList to get a list of the user’s favorite photos. |
| favoritesGetPublicList | Calls flickr.favorites.getPublicList to get a list of favorite public photos for the given user. |
| favoritesRemove | Calls flickr.favorites.remove to remove a photo from a user’s favorites list. |
| groupsPoolsAdd | Add a photo to a group’s pool. |
| groupsPoolsGetContext | Gets next and previous photos for a photo in a group pool. |
| groupsPoolsGetGroups | Gets a list of groups to which you can add photos. |
| groupsPoolsGetPhotos | Gets a list of pool photos for a given group, based on the permissions of the group and the user logged in (if any). |
| groupsPoolsRemove | Remove a photo from a group pool. |
| interestingnessGetList | Get the list of interesting photos for the most recent day or a user-specified date |
| peopleFindByEmail | Calls flickr.people.findByEmail to get a user’s NSID, given their email address. |
| peopleFindByUsername | Calls flickr.people.findByUsername to get a user’s NSID, given their username. |
| peopleGetInfo | Calls flickr.people.getInfo to get information about a user. |
| peopleGetPublicGroups | Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of. |
| peopleGetPublicPhotos | Calls flickr.people.getPublicPhotos to get a list of public photos for the given user. |
| peopleGetUploadStatus | Calls flickr.people.getUploadStatus to get information for the calling user related to photo uploads. |
| photosAddTags | Calls flickr.photos.addTags to add tags to a given photo. |
| photosDelete | Calls flickr.photos.addTags to delete a photo from flickr. |
| photosGetAllContexts | Returns all visble sets and pools the photo belongs to. |
| photosGetContactsPhotos | Calls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ (authUser) contacts. |
| photosGetContactsPublicPhotos | Calls flickr.photos.getContactsPublicPhotos to fetch a list of recent public photos from a users’ contacts. |
| photosGetContext | Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream. |
| photosGetCounts | Calls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user (authUser). |
| photosGetExif | Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given Photo. |
| photosGetInfo | Calls flickr.photos.getInfo to get information about a Photo. |
| photosGetNotInSet | Calls flickr.photos.getNotInSet to get a list of the calling users’ (authUser) photos that are not part of any sets. |
| photosGetPerms | Calls flickr.photos.getPerms to get permissions for a photo. |
| photosGetRecent | Calls flickr.photos.getRecent to get a list of the latest public photos uploaded to flickr. |
| photosGetSizes | Calls flickr.photos.getRecent to get the available sizes for a photo. |
| photosGetUntagged | Calls flickr.photos.getUntagged to get a list of the calling users’ authUser photos with no tags. |
| photosGetWithGeoData | Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser geo-tagged photos. |
| photosGetWithoutGeoData | Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser photos which haven’t been geo-tagged. |
| photosRecentlyUpdated | 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. |
| photosRemoveTag | Calls flickr.photos.removeTag to remove a tag from a photo. |
| photosSearch | Calls flickr.photos.search to get a list of photos matching some criteria. |
| photosSetDates | Calls flickr.photos.setDates to set one or both of the dates for a photo.. |
| photosSetMeta | Calls flickr.photos.setMeta to set the meta information for a photo. |
| photosSetPerms | Calls flickr.photos.setPerms to set permissions for a photo.. |
| photosSetTags | Calls flickr.photos.setTags to set the tags for a photo. |
| photosCommentsAddComment | Calls flickr.photos.comments.addComment to add a comment to a photo as the currently authenticated user (authUser). |
| photosCommentsDeleteComment | Calls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser). |
| photosCommentsEditComment | Calls flickr.photos.comments.editComment to edit the text of a comment as the currently authenticated user (authUser). |
| photosCommentsGetList | Calls flickr.photos.comments.getList to get the comments for a photo. |
| photosGeoGetLocation | Calls flickr.photos.geo.getLocation to get the GeoLocation for a Photo. |
| photosGeoGetPerms | Calls flickr.photos.geo.getPerms to get permissions for who may view geo data for a Photo |
| photosGeoRemoveLocation | Calls flickr.photos.geo.removeLocation to the geo data GeoLocation associated with a Photo. |
| photosGeoSetLocation | Calls flickr.photos.geo.setLocation to set the GeoLocation (latitude and longitude and, optionally, the accuracy level) for a Photo. |
| photosGeoSetPerms | Calls flickr.photos.geo.setPerms to set the permission for who may view the geo data associated with a Photo |
| photosLicensesGetInfo | Fetches a list of availabale photo licenses for Flickr |
| photosLicensesSetLicense | Sets the license for a photo. |
| photosNotesAdd | Add a Note to a Photo. |
| photosNotesDelete | Delete a Note from a Photo. |
| photosNotesEdit | Edit a Note on a Photo. |
| photosetsAddPhoto | Add a photo to the end of an existing photoset. |
| photosetsCreate | Create a new photoset for the calling user (authUser). |
| photosetsDelete | Delete a photoset. |
| photosetsEditMeta | Modify the meta-data for a Photoset. |
| photosetsEditPhotos | Modify the photos in a photoset. |
| photosetsGetContext | Returns next and previous photos for a photo in a set. |
| photosetsGetInfo | Gets information about a photoset. |
| photosetsGetList | Gets the photosets belonging to the specified user. |
| photosetsGetPhotos | Get the list of photos in a set. |
| photosetsOrderSets | Set the order of photosets for the calling user. |
| photosetsRemovePhoto | Remove a photo from a photoset. |
| photosetsCommentsAddComment | Add a comment to a photoset. |
| photosetsCommentsDeleteComment | Delete a photoset comment as the currently authenticated user. |
| photosetsCommentsEditComment | Edit the text of a comment as the currently authenticated user. |
| photosetsCommentsGetList | Returns the comments for a photoset. |
| tagsGetListPhoto | Calls flickr.tags.getListPhoto to get the tag list for a given photo. |
| tagsGetListUser | Calls flickr.tags.getListUser to get the tag list for a given user (or the currently logged in user). |
| tagsGetListUserPopular | Calls flickr.tags.getListUserPopular to get the popular tags for a given user (or the currently logged in user). |
| tagsGetRelated | Calls flickr.tags.getRelated to get a list of tags ‘related’ to the given tag, based on clustered usage analysis. |
| testEcho | Calls flickr.test.echo - forwards any arguments on to the Flickr API |
| testLogin | Calls flickr.test.login - A testing method which checks if the caller is logged in then returns their username. |
| testNull | Null test |
| executeAtPriority | Execute a Flashr.* function at a different priority to the current queuePriority. |
| queueRequest | Queues a request for execution on flickr.com |
| callMethod | Used internally to call a method on the flickr API. |
| getFlashr | Returns a reference to the Flashr instance - if none exists yet then creates one and returns a reference to that. |
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.
private var _apiKey: String
Your Flickr API Key. None of the method calls will work without this.
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.
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. no internet connection, server down, security restrictions)
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 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_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. Set with authSetSecret.
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
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. 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
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.
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...
function get cache():FlashrCache
Variable holding the FlashrCache instance used to hold cached query results where cacheQueries is true.
function get queue():FlashrRequestQueue
The FlashrRequestQueue.
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.
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
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.
private function Flashr()
| Constructor | as this class implements the Singleton pattern do not call directly but rather access through Flashr.getFlashr. |
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.
True if there was a FlashrRequest to cancel, false otherwise.
public function authSetSecret( secret: String )
Use to set the value of the shared secret before any calls to methods like authLogin or authCheckToken
| secret | Your applications shared secret. |
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
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.
| perms | A desired level of permission for actions which the application wants to perform on behalf of the user. “read”, “write” or “delete”. |
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
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.
| authIsLoggingIn | Set 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). |
The generated FlashrRequest
authLogin, FlashrResponse.onAuthGetFrob, http://flickr.com- /services- /api- /flickr.auth.getFrob.html
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.
The generated FlashrRequest
authLogin, FlashrResponse.onAuthCheckToken, http://www.flickr.com- /services- /api- /flickr.auth.getToken.html
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.
| authToken | The authentication token to check. |
The generated FlashrRequest
FlashrResponse.onAuthCheckToken, http://www.flickr.com- /services- /api- /flickr.auth.checkToken.html
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...
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.
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
function _authSignCall( urlArguments: Object ):String
Internal, private function which is used to generate the api_sig used to sign a call.
| urlArguments | An Object containing name/value pairs which describe all of the arguments on the URL. |
The generated signature
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
public function contactsGetList( filter: String ):FlashrRequest
Calls flickr.contacts.getList to get a list of contacts for the calling user.
| filter | An optional filter of the results. One of “friends”, “family”, “both” or “neither” |
The generated FlashrRequest
FlashrResponse.onContactsGetList, http://flickr.com- /services- /api- /flickr.contacts.getList.html
public function contactsGetPublicList( userId: String ):FlashrRequest
Calls flickr.contacts.getPublicList to get a list of contacts a user.
| userId | The user id of the Person whose contacts you want to get. |
The generated FlashrRequest
FlashrResponse.onContactsGetPublicList, http://flickr.com- /services- /api- /flickr.contacts.getPublicList.html
public function favoritesAdd( photoId: String ):FlashrRequest
Calls flickr.favorites.add to add a photo to a user’s favorites list.
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo you want to add. |
The generated FlashrRequest
FlashrResponse.onFavoritesAdd, http://www.flickr.com- /services- /api- /flickr.favorites.add.html
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.
| userId | The id of the user to get favourites for [Optional: default=logged in user] |
| extras | A 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 |
| perPage | The number of results to get per page [Optional: default=100] |
| page | The page of results to get [Optional: default=1] |
The generated FlashrRequest
FlashrResponse.onFavoritesGetList, http://www.flickr.com- /services- /api- /flickr.favorites.getList.html
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.
| userId | The id of the user to get favourites for |
| extras | A 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 |
| perPage | The number of results to get per page [Optional: default=100] |
| page | The page of results to get [Optional: default=1] |
The generated FlashrRequest
FlashrResponse.onFavoritesGetPublicList, http://www.flickr.com- /services- /api- /flickr.favorites.getPublicList.html
public function favoritesRemove( photoId: String ):FlashrRequest
Calls flickr.favorites.remove to remove a photo from a user’s favorites list.
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo you want to remove. |
The generated FlashrRequest
FlashrResponse.onFavoritesRemove, http://www.flickr.com- /services- /api- /flickr.favorites.remove.html
function groupsPoolsAdd( photoId: String, groupId: String ):FlashrRequest
Add a photo to a group’s pool.
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo to add to the group pool. The photo must belong to the calling user. |
| groupId | The NSID of the group who’s pool the photo is to be added to. |
The generated FlashrRequest
FlashrResponse.onGroupsPoolsAdd, http://www.flickr.com- /services- /api- /flickr.groups.pools.add.html
function groupsPoolsGetContext( photoId: String, groupId: String ):FlashrRequest
Gets next and previous photos for a photo in a group pool.
| photoId | The id of the photo to fetch the context for. |
| groupId | The nsid of the group who’s pool to fetch the photo’s context for. |
The generated FlashrRequest
FlashrResponse.onGroupsPoolsAdd, http://www.flickr.com- /services- /api- /flickr.groups.pools.getContext.html
function groupsPoolsGetGroups():FlashrRequest
Gets a list of groups to which you can add photos.
The generated FlashrRequest
FlashrResponse.onGroupsPoolsGetGroups, http://www.flickr.com- /services- /api- /flickr.groups.pools.getGroups.html
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).
| groupId | The id of the group who’s pool you which to get the photo list for. |
| tags | A tag to filter the pool with. At the moment only one tag at a time is supported. |
| extras | A 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 |
| perPage | The number of photos to return per page. [Optional: default=100] |
| page | The page of results to return. [Optional: default=1] |
| userId | The nsid of a user. Specifiying this parameter will retrieve for you only those photos that the user has contributed to the group pool. [Optional] |
The generated FlashrRequest
FlashrResponse.onGroupsPoolsGetPhotos, http://www.flickr.com- /services- /api- /flickr.groups.pools.getPhotos.html
function groupsPoolsRemove( photoId: String, groupId: String ):FlashrRequest
Remove a photo from a group pool.
This method requires authentication with ‘write’ permission.
| photoId | The 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 |
| groupId | The NSID of the group who’s pool the photo is to removed from. |
The generated FlashrRequest
FlashrResponse.onGroupsPoolsRemove, http://www.flickr.com- /services- /api- /flickr.groups.pools.remove.html
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
| date | A specific date, to return interesting photos for (or undefined for the most recent days photos) |
| extras | A 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 |
| perPage | The number of photos to return per page. [Optional: default=100] |
| page | The page of results to return. [Optional: default=1] |
The generated FlashrRequest
FlashrResponse.onInterestingnessGetList, http://www.flickr.com- /services- /api- /flickr.interestingness.getList.html
function peopleFindByEmail( email: String ):FlashrRequest
Calls flickr.people.findByEmail to get a user’s NSID, given their email address.
| The email address of the person whose nsid you want |
The generated FlashrRequest
FlashrResponse.onPeopleFindByEmail, http://flickr.com- /services- /api- /flickr.people.findByEmail.html
function peopleFindByUsername( username: String ):FlashrRequest
Calls flickr.people.findByUsername to get a user’s NSID, given their username.
| username | The username of the person whose nsid you want |
The generated FlashrRequest
FlashrResponse.onPeopleFindByUsername, Person, http://flickr.com- /services- /api- /flickr.people.findByUsername.html
function peopleGetInfo( nsid: String ):FlashrRequest
Calls flickr.people.getInfo to get information about a user.
| nsid | The nsid of the user you want information about. |
The generated FlashrRequest
FlashrResponse.onPeopleGetInfo, Person, http://flickr.com- /services- /api- /flickr.people.getInfo.html
function peopleGetPublicGroups( userId: String ):FlashrRequest
Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of.
| userId | The nsid of the user whose groups you want to know about. |
The generated FlashrRequest
FlashrResponse.onPeopleGetPublicGroups, http://www.flickr.com- /services- /api- /flickr.people.getPublicGroups.html
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.
| nsid | The nsid of the user whose photos you want to know about. |
| extras | A 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 |
| perPage | The number of photos to return per page. [Optional: default=100] |
| page | The page of results to return. [Optional: default=1] |
The generated FlashrRequest
FlashrResponse.onPeopleGetPublicPhotos, http://flickr.com- /services- /api- /flickr.people.getPublicPhotos.html
function peopleGetUploadStatus():FlashrRequest
Calls flickr.people.getUploadStatus to get information for the calling user related to photo uploads.
The generated FlashrRequest
FlashrResponse.onPeopleGetUploadStatus, http://flickr.com- /services- /api- /flickr.people.getUploadStatus.html
function photosAddTags ( photoId: String, tags: String ):FlashrRequest
Calls flickr.photos.addTags to add tags to a given photo.
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo to add tags to. |
| tags | The tags to add to the photo. |
The generated FlashrRequest
FlashrResponse.onPhotosAddTags, http://flickr.com- /services- /api- /flickr.photos.addTags.html
function photosDelete ( photoId: String ):FlashrRequest
Calls flickr.photos.addTags to delete a photo from flickr.
This method requires authentication with ‘delete’ permission.
| photoId | The id of the photo to delete. |
The generated FlashrRequest
FlashrResponse.onPhotosDelete, http://flickr.com- /services- /api- /flickr.photos.delete.html
function photosGetAllContexts( photoId: String ):FlashrRequest
Returns all visble sets and pools the photo belongs to.
| photoId | The photo to return information for. |
The generated FlashrRequest
FlashrResponse.onPhotosGetAllContexts, http://www.flickr.com- /services- /api- /flickr.photos.getAllContexts.html
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.
This method requires authentication with ‘read’ permission.
| count | Number of photos to return. Defaults to 10, maximum 50. This is only used if single_photo is not passed. |
| justFriends | set as 1 to only show photos from friends and family (excluding regular contacts). [Optional: default=0]. |
| singlePhoto | Only fetch one photo (the latest) per contact, instead of all photos in chronological order [Optional: default=0]. |
| includeSelf | Set to 1 to include photos from the calling user. [Optional: default=0]. |
| extras | A 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 |
The generated FlashrRequest
FlashrResponse.onPhotosGetContactsPhotos, http://flickr.com- /services- /api- /flickr.photos.getContactsPhotos.html
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.
| nsid | The NSID of the user to fetch photos for. |
| count | Number of photos to return. Defaults to 10, maximum 50. This is only used if single_photo is not passed. [Optional: default=10]. |
| justFriends | set as 1 to only show photos from friends and family (excluding regular contacts). [Optional: default=0]. |
| singlePhoto | Only fetch one photo (the latest) per contact, instead of all photos in chronological order [Optional: default=0]. |
| includeSelf | Set to 1 to include photos from the calling user. [Optional: default=0]. |
| extras | A 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 |
The generated FlashrRequest
FlashrResponse.onPhotosGetContactsPublicPhotos, http://www.flickr.com- /services- /api- /flickr.photos.getContactsPublicPhotos.html
function photosGetContext ( photoId: String ):FlashrRequest
Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream.
| photoId | The id of the photo to fetch the context for. |
The generated FlashrRequest
FlashrResponse.onPhotosGetContext, http://www.flickr.com- /services- /api- /flickr.photos.getContext.html
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).
This method requires authentication with ‘read’ permission.
| dates | A 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. |
| takenDates | A 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. |
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)?
The generated FlashrRequest
FlashrResponse.onPhotosGetCounts, http://www.flickr.com- /services- /api- /flickr.photos.getCounts.html
function photosGetExif ( photoId: String, secret: String ):FlashrRequest
Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given Photo.
| photoId | The id of the photo to fetch the context for. |
| secret | The 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. |
The generated FlashrRequest
FlashrResponse.onPhotosGetExif, Photo.exifData, http://www.flickr.com- /services- /api- /flickr.photos.getExif.html
function photosGetInfo ( photoId: String, secret: String ):FlashrRequest
Calls flickr.photos.getInfo to get information about a Photo.
| photoId | The id of the photo to fetch the context for. |
| secret | The 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. |
FlashrResponse.onPhotosGetInfo, Photo, http://www.flickr.com- /services- /api- /flickr.photos.getInfo.html
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.
This method requires authentication with ‘read’ permission.
| extras | A 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 |
| perPage | The number of photos to return per page. [Optional: default=100] |
| page | The page of results to return. [Optional: default=1] |
| privacyFilter | Return photos only matching a certain privacy level. Valid values are held in the PRIV_* constants. [Optional: Defaults to all photos] |
The generated FlashrRequest
FlashrResponse.onPhotosGetNotInSet, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY, PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photos.getNotInSet.html
function photosGetPerms ( photoId: String ):FlashrRequest
Calls flickr.photos.getPerms to get permissions for a photo.
This method requires authentication with ‘read’ permission.
| photoId | The id of the photo whose permissions you want |
The generated FlashrRequest
FlashrResponse.onPhotosGetNotInSet, http://www.flickr.com- /services- /api- /flickr.photos.getPerms.html
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.
| extras | A 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 |
| perPage | The number of photos to return per page. [Optional: default=100] |
| page | The page of results to return. [Optional: default=1] |
The generated FlashrRequest
FlashrResponse.onPhotosGetRecent, http://www.flickr.com- /services- /api- /flickr.photos.getRecent.html
function photosGetSizes ( photoId: String ):FlashrRequest
Calls flickr.photos.getRecent to get the available sizes for a photo.
| photoId | The id of the photo to fetch size information for. |
FlashrResponse.onPhotosGetSizes, http://www.flickr.com- /services- /api- /flickr.photos.getSizes.html
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.
This method requires authentication with ‘read’ permission.
| extras | A 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 |
| perPage | The number of photos to return per page. [Optional: default=100] |
| page | The page of results to return. [Optional: default=1] |
The generated FlashrRequest
FlashrResponse.onPhotosGetUntagged, http://www.flickr.com- /services- /api- /flickr.photos.getUntagged.html
function photosGetWithGeoData ( params ):FlashrRequest
Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser geo-tagged photos.
This method requires authentication with ‘read’ permission.
You pass an object with one or many of the following attributes...
| min_upload_date | Minimum 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_date | Maximum 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_date | Minimum 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_date | Maximum 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_filter | Return photos only matching a certain privacy level. Valid values are held in the PRIV_* constants. |
| sort | The order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc, date-taken-asc , date-taken-desc, interestingness-desc, interestingness-asc and relevance |
| extras | A 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_page | Number of photos to return per page. If this argument is ommited, it defaults to 100. The maximum allowed value is 500. |
| page | The page of results to return. If this argument is ommited, it defaults to 1. |
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.
The generated FlashrRequest
FlashrResponse.onPhotosGetWithGeoData, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY, PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photos.getWithGeoData.html
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.
This method requires authentication with ‘read’ permission.
You pass an object with one or many of the following attributes...
| min_upload_date | Minimum 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_date | Maximum 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_date | Minimum 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_date | Maximum 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_filter | Return photos only matching a certain privacy level. Valid values are held in the PRIV_* constants. |
| sort | The order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc, date-taken-asc , date-taken-desc, interestingness-desc, interestingness-asc and relevance |
| extras | A 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_page | Number of photos to return per page. If this argument is ommited, it defaults to 100. The maximum allowed value is 500. |
| page | The page of results to return. If this argument is ommited, it defaults to 1. |
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.
The generated FlashrRequest
FlashrResponse.onPhotosGetWithoutGeoData, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photos.getWithoutGeoData.html
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 :-)
This method requires authentication with ‘read’ permission.
| minDate | The Date from which modifications should be compared. |
| extras | A 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 |
| perPage | The number of photos to return per page. [Optional: default=100] |
| page | The page of results to return. [Optional: default=1] |
The generated FlashrRequest
FlashrResponse.onPhotosRecentlyUpdated, http://www.flickr.com- /services- /api- /flickr.photos.recentlyUpdated.html
function photosRemoveTag ( tagId: Number ):FlashrRequest
Calls flickr.photos.removeTag to remove a tag from a photo.
This method requires authentication with ‘write’ permission.
| tagId | The tag to remove from the photo. This parameter should contain a tag id, as returned by photosGetInfo. |
FlashrResponse.onPhotosRemoveTag, http://www.flickr.com- /services- /api- /flickr.photos.removeTag.html
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...
| user_id | The NSID of the user who’s photo to search. If this parameter isn’t passed then everybody’s public photos will be searched. |
| tags | A comma-delimited list of tags. Photos with one or more of the tags listed will be returned. |
| tag_mode | Either ‘any’ for an OR combination of tags, or ‘all’ for an AND combination. Defaults to ‘any’ if not specified. |
| text | A free text search. Photos who’s title, description or tags contain the text will be returned. |
| min_upload_date | Minimum 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_date | Maximum 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_date | Minimum 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_date | Maximum 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. |
| license | A comma seperated list of license ids for photos. |
| sort | The order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc, date-taken-asc , date-taken-desc, interestingness-desc, interestingness-asc and relevance |
| privacy_filter | Return 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. |
| bbox | A 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] |
| accuracy | Recorded 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] |
| extras | A 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_page | Number of photos to return per page. If this argument is ommited, it defaults to 100. The maximum allowed value is 500. |
| page | The page of results to return. If this argument is ommited, it defaults to 1. |
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.
The generated FlashrRequest
FlashrResponse.onPhotosSearch, http://www.flickr.com- /services- /api- /flickr.photos.search.html
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...
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo to edit dates for. |
| datePosted | The Date the photo was uploaded to flickr. |
| dateTaken | The Date the photo was taken. |
| dateTakenGran | The granularity of the date the photo was taken. |
The generated FlashrRequest
FlashrResponse.onPhotosSetDates, http://flickr.com- /services- /api- /flickr.photos.setDates.html, http://flickr.com/services/api/misc.dates.html
function photosSetMeta ( photoId: String, title: String, description: String ):FlashrRequest
Calls flickr.photos.setMeta to set the meta information for a photo.
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo to edit dates for. |
| title | The title for the photo. |
| description | The description for the photo. |
The generated FlashrRequest
FlashrResponse.onPhotosSetMeta, http://flickr.com- /services- /api- /flickr.photos.setMeta.html
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..
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo to set permissions for. |
| isPublic | 1 to set the photo to public, 0 to set it to private. |
| isFriend | 1 to make the photo visible to friends when private, 0 to not. |
| isFamily | 1 to make the photo visible to family when private, 0 to not. |
| permComment | who can add comments to the photo and it’s notes. See Flashr.PERM_* for options. |
| permAddMeta | who can add notes and tags to the photo. See Flashr.PERM_* for options. |
The generated FlashrRequest
Flashr.PERM_NOBODY, Flashr.PERM_FRIENDS, Flashr.PERM_CONTACTS, Flashr.PERM_EVERYBODY, FlashrResponse.onPhotosSetMeta, http://flickr.com- /services- /api- /flickr.photos.setMeta.html
function photosSetTags ( photoId: String, tags: String ):FlashrRequest
Calls flickr.photos.setTags to set the tags for a photo.
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo to edit dates for. |
| tags | All tags for the photo (as a single space-delimited string). |
The generated FlashrRequest
FlashrResponse.onPhotosSetTags, Photo._setTagsAsStrings (There are some problems listed there), http://flickr.com- /services- /api- /flickr.photos.setTags.html
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).
This method requires authentication with ‘write’ permission.
| photoId | The id of the photo to add the comment to. |
| comment | The text of the comment |
The generated FlashrRequest
FlashrResponse.onPhotosCommentsAddComment, Photo.getComments, http://flickr.com- /services- /api- /flickr.photos.comments.addComment.html
function photosCommentsDeleteComment( commentId: String ):FlashrRequest
Calls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser).
This method requires authentication with ‘write’ permission.
| commentId | The id of the comment you want to delete |
The generated FlashrRequest
FlashrResponse.onPhotosCommentsDeleteComment, photosCommentsGetList, http://flickr.com- /services- /api- /flickr.photos.comments.deleteComment.html
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).
This method requires authentication with ‘write’ permission.
| commentId | The id of the comment you want to edit. |
| commentText | The new text for the comment. |
The generated FlashrRequest
FlashrResponse.onPhotosCommentsEditComment, photosCommentsGetList, http://flickr.com- /services- /api- /flickr.photos.comments.editComment.html
function photosCommentsGetList ( photoId: String ):FlashrRequest
Calls flickr.photos.comments.getList to get the comments for a photo.
| photoId | The id of the photo to get comments for. |
The generated FlashrRequest
FlashrResponse.onPhotosCommentsGetList, Photo.getComments, http://flickr.com- /services- /api- /flickr.photos.comments.getList.html
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.
| photoId | The id of the Photo to get GeoLocation for. |
The generated FlashrRequest
FlashrResponse.onPhotosGeoGetLocation, Photo.location, http://www.flickr.com- /services- /api- /flickr.photos.geo.getLocation.html
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.
This method requires authentication with ‘read’ permission.
| photoId | The id of the Photo to get permissions to view geo data for. |
The generated FlashrRequest
FlashrResponse.onPhotosGeoGetPerms, Photo.geoPerms, http://www.flickr.com- /services- /api- /flickr.photos.geo.getPerms.html
function photosGeoRemoveLocation( photoId: String ):FlashrRequest
Calls flickr.photos.geo.removeLocation to the geo data GeoLocation associated with a Photo.
This method requires authentication with ‘write’ permission.
| photoId | The id of the Photo to get GeoLocation for. |
The generated FlashrRequest
FlashrResponse.onPhotosGeoRemoveLocation, Photo.location, http://www.flickr.com- /services- /api- /flickr.photos.geo.removeLocation.html
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/.
This method requires authentication with ‘write’ permission.
| photoId | The id of the Photo to set Photo.location for |
| location | The GeoLocation for this Photo |
The generated FlashrRequest
FlashrResponse.onPhotosGeoSetLocation, Photo.location, http://www.flickr.com- /services- /api- /flickr.photos.geo.setLocation.html
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
This method requires authentication with ‘write’ permission.
| photoId | The id of the Photo to set permissions to view geo data for. |
| geoPerms | The permissions to apply to this Photo |
The generated FlashrRequest
FlashrResponse.onPhotosGeoGetPerms, Photo.geoPerms, http://www.flickr.com- /services- /api- /flickr.photos.geo.setPerms.html
function photosLicensesGetInfo():FlashrRequest
Fetches a list of availabale photo licenses for Flickr
The generated FlashrRequest
FlashrResponse.onPhotosLicensesGetInfo, http://www.flickr.com- /services- /api- /flickr.photos.licenses.getInfo.html
function photosLicensesSetLicense( photoId: String, licenseId: Number ):FlashrRequest
Sets the license for a photo.
This method requires authentication with ‘write’ permission.
| photoId | The id of the Photo you want to change the license for. |
| licenseId | The id of the License you want to apply to this Photo. |
The generated FlashrRequest
FlashrResponse.onPhotosLicensesSetLicense, photosLicensesGetInfo, http://www.flickr.com- /services- /api- /flickr.photos.licenses.setLicense.html
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.
This method requires authentication with ‘write’ permission.
| photoId | The id of the Photo you want to add a Note to. |
| noteX | The left coordinate of the note. |
| noteY | The top coordinate of the note. |
| noteW | The width of the note. |
| noteH | The height of the note. |
| noteText | The description of the note |
FlashrResponse.onPhotosNotesAdd, http://www.flickr.com- /services- /api- /flickr.photos.notes.add.html
function photosNotesDelete( noteId: String )
This method requires authentication with ‘write’ permission.
| noteId | The id of the Note you want to delete. |
FlashrResponse.onPhotosNotesDelete, http://www.flickr.com- /services- /api- /flickr.photos.notes.delete.html
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.
This method requires authentication with ‘write’ permission.
| noteId | The id of the Note you want to edit. |
| noteX | The left coordinate of the note. |
| noteY | The top coordinate of the note. |
| noteW | The width of the note. |
| noteH | The height of the note. |
| noteText | The description of the note |
FlashrResponse.onPhotosNotesEdit, http://www.flickr.com- /services- /api- /flickr.photos.notes.edit.html
function photosetsAddPhoto( photosetId: String, photoId: String ):FlashrRequest
Add a photo to the end of an existing photoset.
This method requires authentication with ‘write’ permission.
| photosetId | The id of the photoset to add a photo to. |
| photoId | The id of the photo to add to the set. |
The generated FlashrRequest
FlashrResponse.onPhotosetsAddPhoto, http://www.flickr.com- /services- /api- /flickr.photosets.addPhoto.html
function photosetsCreate( title: String, description: String, primaryPhotoId: Number ):FlashrRequest
Create a new photoset for the calling user (authUser).
This method requires authentication with ‘write’ permission.
| title | A title for the photoset. |
| description | A description of the photoset. May contain limited html. |
| primaryPhotoId | The id of the Photo to represent this set. The photo must belong to the calling user. |
The generated FlashrRequest
FlashrResponse.onPhotosetsCreate, http://www.flickr.com- /services- /api- /flickr.photosets.create.html
function photosetsDelete( photosetId: String ):FlashrRequest
Delete a photoset.
This method requires authentication with ‘write’ permission.
| photosetId | The id of the Photoset to delete. It must be owned by the calling user (authUser). |
The generated FlashrRequest
FlashrResponse.onPhotosetsDelete, http://www.flickr.com- /services- /api- /flickr.photosets.delete.html
function photosetsEditMeta( photosetId: String, title: String, description: String ):FlashrRequest
Modify the meta-data for a Photoset.
This method requires authentication with ‘write’ permission.
| photosetId | The id of the Photoset to modify. |
| title | The new title for the photoset. |
| description | A description of the photoset. May contain limited html. |
The generated FlashrRequest
FlashrResponse.onPhotosetsEditMeta, http://www.flickr.com- /services- /api- /flickr.photosets.editMeta.html
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.
This method requires authentication with ‘write’ permission.
| photosetId | The id of the photoset to modify. The photoset must belong to the calling user. |
| primaryPhotoId | The 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. |
| photoIds | A 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. |
The generated FlashrRequest
FlashrResponse.onPhotosetsEditPhotos, http://www.flickr.com- /services- /api- /flickr.photosets.editPhotos.html
function photosetsGetContext( photoId: String, photosetId: String ):FlashrRequest
Returns next and previous photos for a photo in a set.
| photoId | The id of the Photo to fetch the context for. |
| photosetId | The id of the Photoset for which to fetch the Photo’s context. |
The generated FlashrRequest
FlashrResponse.onPhotosetsGetContext, http://www.flickr.com- /services- /api- /flickr.photosets.getContext.html
function photosetsGetInfo( photosetId: String ):FlashrRequest
Gets information about a photoset.
| photosetId | The id of the Photoset to fetch information for. |
The generated FlashrRequest
FlashrResponse.onPhotosetsGetInfo, http://www.flickr.com- /services- /api- /flickr.photosets.getInfo.html
function photosetsGetList( userId: String ):FlashrRequest
Gets the photosets belonging to the specified user.
| userId | The nsid of the Person to get a photoset list for. If none is specified, the calling user is assumed. |
The generated FlashrRequest
FlashrResponse.onPhotosetsGetList, http://www.flickr.com- /services- /api- /flickr.photosets.getList.html
function photosetsGetPhotos( photosetId: String, extras: String, privacyFilter: Number ):FlashrRequest
Get the list of photos in a set.
| photosetId | The id of the Photoset to return the photos for. |
| extras | A 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 |
| privacyFilter | Return photos only matching a certain privacy level. Valid values are held in the PRIV_* constants. [Optional: Defaults to all photos] |
The generated FlashrRequest
FlashrResponse.onPhotosetsGetPhotos, PRIV_PUBLIC, PRIV_FRIENDS, PRIV_FAMILY, PRIV_FRIENDS_FAMILY PRIV_PRIVATE, http://www.flickr.com- /services- /api- /flickr.photosets.getPhotos.html
function photosetsOrderSets( photosetIds: Array ):FlashrRequest
Set the order of photosets for the calling user.
This method requires authentication with ‘write’ permission.
| photosetIds | An 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. |
The generated FlashrRequest
FlashrResponse.onPhotosetsOrderSets, http://www.flickr.com- /services- /api- /flickr.photosets.orderSets.html
function photosetsRemovePhoto( photosetId: String, photoId: String ):FlashrRequest
Remove a photo from a photoset.
This method requires authentication with ‘write’ permission.
| photosetId | The id of the Photoset to remove a Photo from. |
| photoId | The id of the Photo to remove from the set. |
The generated FlashrRequest
FlashrResponse.onPhotosetsRemovePhoto, http://www.flickr.com- /services- /api- /flickr.photosets.removePhoto.html
function photosetsCommentsAddComment( photosetId: String, comment: String ):FlashrRequest
Add a comment to a photoset.
This method requires authentication with ‘write’ permission.
| photosetId | The id of the Photoset you want to add a comment to. |
| comment | The text of the PhotosetComment you want to make. |
The generated FlashrRequest
FlashrResponse.onPhotosetsCommentsAddComment, http://www.flickr.com- /services- /api- /flickr.photosets.comments.addComment.html
function photosetsCommentsDeleteComment( commentId: String ):FlashrRequest
Delete a photoset comment as the currently authenticated user.
This method requires authentication with ‘write’ permission.
| commentId | The id of the PhotosetComment you want to delete. |
The generated FlashrRequest
FlashrResponse.onPhotosetsCommentsDeleteComment, http://www.flickr.com- /services- /api- /flickr.photosets.comments.deleteComment.html
function photosetsCommentsEditComment( commentId: String, comment: String ):FlashrRequest
Edit the text of a comment as the currently authenticated user.
This method requires authentication with ‘write’ permission.
| commentId | The id of the PhotosetComment you want to edit. |
| comment | The text you want to change the PhotosetComment to. |
The generated FlashrRequest
FlashrResponse.onPhotosetsCommentsEditComment, http://www.flickr.com- /services- /api- /flickr.photosets.comments.editComment.html
function photosetsCommentsGetList( photosetId: String, comment: String ):FlashrRequest
Returns the comments for a photoset.
| photosetId | The id of the Photoset you want to get PhotosetComments for. |
The generated FlashrRequest
FlashrResponse.onPhotosetsCommentsGetList, http://www.flickr.com- /services- /api- /flickr.photosets.comments.getList.html
public function tagsGetListPhoto( photoId: String ):FlashrRequest
Calls flickr.tags.getListPhoto to get the tag list for a given photo.
| photoId | The id of the photo to return tags for. |
The generated FlashrRequest
FlashrResponse.onTagsGetListPhoto, http://www.flickr.com- /services- /api- /flickr.tags.getListPhoto.html
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).
| userId | The NSID of the user to fetch the tag list for. [Optional: defaults to authUser (if any)] |
The generated FlashrRequest
FlashrResponse.onTagsGetListUser, http://www.flickr.com- /services- /api- /flickr.tags.getListUser.html
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).
| userID | The NSID of the user to fetch the tag list for. [Optional: defaults to authUser (if any)] |
| count | Number of popular tags to return. [Optional: default=10] |
The generated FlashrRequest
FlashrResponse.onTagsGetListUserPopular, FlashrResponse.onError http://www.flickr.com- /services- /api- /flickr.tags.getListUserPopular.html
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.
| tag | The tag to fetch related tags for. |
The generated FlashrRequest
FlashrResponse.onTagsGetRelated, FlashrResponse.onError, http://www.flickr.com- /services- /api- /flickr.tags.getRelated.html
public function testEcho():FlashrRequest
Calls flickr.test.echo - forwards any arguments on to the Flickr API
| 1...n | Any number of parameters to echo back from the server [Optional] |
The generated FlashrRequest
FlashrResponse.onTestEcho, http://www.flickr.com- /services- /api- /flickr.test.echo.html
public function testLogin():FlashrRequest
Calls flickr.test.login - A testing method which checks if the caller is logged in then returns their username.
This method requires authentication with ‘read’ permission.
The generated FlashrRequest
FlashrResponse.onTestLogin, FlashrResponse.onError, http://www.flickr.com- /services- /api- /flickr.test.login.html
public function testNull():FlashrRequest
Null test
This method requires authentication with ‘read’ permission.
The generated FlashrRequest
FlashrResponse.onTestNull, FlashrResponse.onError, http://www.flickr.com- /services- /api- /flickr.test.null.html
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.
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.
| method | The name of the Flashr method you want to call as a String (e.g. “photosSearch”). |
| args | The arguments you would pass to the Flashr method you are calling (in an Array). |
| priority | The priority to call this method with. The lower the number the higher the priority. |
The generated FlashrRequest
function queueRequest( request: FlashrRequest ):FlashrRequest
Queues a request for execution on flickr.com
| request | The FlashrRequest to queue. |
The FlashrRequest that was queued (you can use this object to change the priority of a given request etc)
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
| request | The FlashrRequest to call |
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.
The one and only Flashr instance.
A reference to the this file as stored in subversion.
public static var SUBVERSION_ID: String
Your Flickr API Key.
private var _apiKey: String
The place for all API calls to connect to.
static var REST_ENDPOINT: String
The base path you go to when you want to authenticate on flickr.com
private var _AUTH_ENDPOINT: String
The API is already waiting for the response to a method call so cannot make another call
public static var STATUS_BUSY: Number
Could not connect to the server (e.g.
public static var STATUS_ERROR_CONNECTING: Number
The XML returned by the server wasn’t in a rsp / tag.
public static var STATUS_INVALID_XML: Number
The user wasn’t logged in and tried to access a method that requires authentication (returned from flickr.com)
public static var STATUS_USER_NOT_LOGGED_IN: Number
The API key sent to flickr was invalid (returned from flickr.com)
public static var STATUS_INVALID_API_KEY: Number
There was no errors and valid XML was returned.
public static var STATUS_OK: Number
A constant representing permissions for nobody.
public static var PERM_NOBODY: Number
A constant representing permissions for friends and family.
public static var PERM_FRIENDS: Number
A constant representing permissions for contacts.
public static var PERM_CONTACTS: Number
A constant representing permissions for everybody.
public static var PERM_EVERYBODY: Number
A constant representing public photos.
public static var PRIV_PUBLIC: Number
A constant representing private photos visible to friends.
public static var PRIV_FRIENDS: Number
A constant representing private photos visible to family.
public static var PRIV_FAMILY: Number
A constant representing private photos visible to friends & family.
public static var PRIV_FRIENDS_FAMILY: Number
A constant representing completely private photos.
public static var PRIV_PRIVATE: Number
Private variable to store this app’s shared secret for use with the authentication API.
private var _secret: String
Stores the token generated by a successful authorisation.
private var _authToken: String
Stores the frob which is used for the initial part of the authentication process.
private var _authFrob: String
A flag which marks whether a user is currently logging in (used internally during the login process)
private var _authIsLoggingIn: Boolean
A variable describing the permissions the currently auth’d user has within this app.
var authPerms: String
A Person object for the currently auth’d user (if there is one).
var authUser: Person
Sets whether the results of queries to flickr.com should be cached.
var cacheQueries: Boolean
Whether to ensure that cached results are returned in the same order as they are added to the queue (i.e.
var cacheObeyOrder: Boolean
Variable holding the FlashrCache instance used to hold cached query results where cacheQueries is true.
function get cache():FlashrCache
The FlashrRequestQueue.
function get queue():FlashrRequestQueue
The priority to add requests to the queue at...
var queuePriority: Number
The number of milliseconds to wait between subsequent queries to flickr.com (Flickr’s TOS request no more than one request per second)
var queryMaxFrequency: Number
The FlashrResponseHistory if saveHistory is true
function get history():FlashrResponseHistory
Whether or not a FlashrResponseHistory should be saved of all the calls to flickr.com and all the responses from it.
var saveHistory: Boolean
private function Flashr()
If there is a FlashrRequest which has been made to flickr.com and hasn’t returned yet then mark it cancelled.
function cancelCurrentRequest()
Use to set the value of the shared secret before any calls to methods like authLogin or authCheckToken
public function authSetSecret( secret: String )
Pops open a login window so that the user can authenticate with the flickr.com website.
public function authLogin( perms: String )
Calls flickr.auth.checkToken to get the credentials attached to an authentication token.
public function authCheckToken( authToken: String ):FlashrRequest
Calls flickr.auth.getFrob to get a frob to be used during authentication.
public function authGetFrob( authIsLoggingIn: Boolean ):FlashrRequest
Calls flickr.auth.getToken to get the auth token for the given frob, if one has been attached.
public function authGetToken():FlashrRequest
Simple function which forgets the information that was making this user be logged in.
public function authLogout()
Internal function which generates the relevant link and pops open the login window on flickr.com.
private function _authOpenLogin()
Internal, private function which is used to generate the api_sig used to sign a call.
function _authSignCall( urlArguments: Object ):String
Calls flickr.contacts.getList to get a list of contacts for the calling user.
public function contactsGetList( filter: String ):FlashrRequest
Calls flickr.contacts.getPublicList to get a list of contacts a user.
public function contactsGetPublicList( userId: String ):FlashrRequest
Calls flickr.favorites.add to add a photo to a user’s favorites list.
public function favoritesAdd( photoId: String ):FlashrRequest
Calls flickr.favorites.getList to get a list of the user’s favorite photos.
public function favoritesGetList( 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 favoritesGetPublicList( userId: String, extras: String, perPage: Number, page: Number ):FlashrRequest
Calls flickr.favorites.remove to remove a photo from a user’s favorites list.
public function favoritesRemove( photoId: String ):FlashrRequest
Add a photo to a group’s pool.
function groupsPoolsAdd( photoId: String, groupId: String ):FlashrRequest
Gets next and previous photos for a photo in a group pool.
function groupsPoolsGetContext( photoId: String, groupId: String ):FlashrRequest
Gets a list of groups to which you can add photos.
function groupsPoolsGetGroups():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 groupsPoolsGetPhotos( groupId: String, tags: String, extras: String, perPage: Number, page: Number, userId: String ):FlashrRequest
Remove a photo from a group pool.
function groupsPoolsRemove( photoId: String, groupId: String ):FlashrRequest
Get the list of interesting photos for the most recent day or a user-specified date
function interestingnessGetList( date: Date, extras: String, perPage: Number, page: Number ):FlashrRequest
Calls flickr.people.findByEmail to get a user’s NSID, given their email address.
function peopleFindByEmail( email: String ):FlashrRequest
Calls flickr.people.findByUsername to get a user’s NSID, given their username.
function peopleFindByUsername( username: String ):FlashrRequest
Calls flickr.people.getInfo to get information about a user.
function peopleGetInfo( nsid: String ):FlashrRequest
Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of.
function peopleGetPublicGroups( userId: String ):FlashrRequest
Calls flickr.people.getPublicPhotos to get a list of public photos for the given user.
function peopleGetPublicPhotos( nsid: String, extras: String, perPage: Number, page: Number ):FlashrRequest
Calls flickr.people.getUploadStatus to get information for the calling user related to photo uploads.
function peopleGetUploadStatus():FlashrRequest
Calls flickr.photos.addTags to add tags to a given photo.
function photosAddTags ( photoId: String, tags: String ):FlashrRequest
Calls flickr.photos.addTags to delete a photo from flickr.
function photosDelete ( photoId: String ):FlashrRequest
Returns all visble sets and pools the photo belongs to.
function photosGetAllContexts( photoId: String ):FlashrRequest
Calls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ (authUser) contacts.
function photosGetContactsPhotos ( 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 photosGetContactsPublicPhotos ( nsid: String, count: Number, justFriends: Number, singlePhoto: Number, includeSelf: Number, extras: String ):FlashrRequest
Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream.
function photosGetContext ( photoId: String ):FlashrRequest
Calls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user (authUser).
function photosGetCounts ( dates: String, takenDates: String ):FlashrRequest
Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given Photo.
function photosGetExif ( photoId: String, secret: String ):FlashrRequest
Calls flickr.photos.getInfo to get information about a Photo.
function photosGetInfo ( photoId: String, secret: String ):FlashrRequest
Calls flickr.photos.getNotInSet to get a list of the calling users’ (authUser) photos that are not part of any sets.
function photosGetNotInSet ( extras: String, perPage: Number, page: Number, privacyFilter: Number ):FlashrRequest
Calls flickr.photos.getPerms to get permissions for a photo.
function photosGetPerms ( photoId: String ):FlashrRequest
Calls flickr.photos.getRecent to get a list of the latest public photos uploaded to flickr.
function photosGetRecent ( extras: String, perPage: Number, page: Number ):FlashrRequest
Calls flickr.photos.getRecent to get the available sizes for a photo.
function photosGetSizes ( photoId: String ):FlashrRequest
Calls flickr.photos.getUntagged to get a list of the calling users’ authUser photos with no tags.
function photosGetUntagged ( extras: String, perPage: Number, page: Number ):FlashrRequest
Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser geo-tagged photos.
function photosGetWithGeoData ( params ):FlashrRequest
Calls flickr.photos.getWithGeoData to get a list of the calling user’s authUser photos which haven’t been geo-tagged.
function photosGetWithoutGeoData ( params ):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 photosRecentlyUpdated( minDate: Date, extras: String, perPage: Number, page: Number ):FlashrRequest
Calls flickr.photos.removeTag to remove a tag from a photo.
function photosRemoveTag ( tagId: Number ):FlashrRequest
Calls flickr.photos.search to get a list of photos matching some criteria.
function photosSearch ( params ):FlashrRequest
Calls flickr.photos.setDates to set one or both of the dates for a photo..
function photosSetDates ( photoId: String, datePosted: Date, dateTaken: Date, dateTakenGran: Number ):FlashrRequest
Calls flickr.photos.setMeta to set the meta information for a photo.
function photosSetMeta ( photoId: String, title: String, description: String ):FlashrRequest
Calls flickr.photos.setPerms to set permissions for a photo..
function photosSetPerms ( photoId: String, isPublic: Number, isFriend: Number, isFamily: Number, permComment: Number, permAddMeta: Number ):FlashrRequest
Calls flickr.photos.setTags to set the tags for a photo.
function photosSetTags ( photoId: String, tags: String ):FlashrRequest
Calls flickr.photos.comments.addComment to add a comment to a photo as the currently authenticated user (authUser).
function photosCommentsAddComment( photoId: String, comment: String ):FlashrRequest
Calls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser).
function photosCommentsDeleteComment( commentId: String ):FlashrRequest
Calls flickr.photos.comments.editComment to edit the text of a comment as the currently authenticated user (authUser).
function photosCommentsEditComment( commentId: String, commentText: String ):FlashrRequest
Calls flickr.photos.comments.getList to get the comments for a photo.
function photosCommentsGetList ( photoId: String ):FlashrRequest
Calls flickr.photos.geo.getLocation to get the GeoLocation for a Photo.
function photosGeoGetLocation( photoId: String ):FlashrRequest
Calls flickr.photos.geo.getPerms to get permissions for who may view geo data for a Photo
function photosGeoGetPerms( photoId: String ):FlashrRequest
Calls flickr.photos.geo.removeLocation to the geo data GeoLocation associated with a Photo.
function photosGeoRemoveLocation( photoId: String ):FlashrRequest
Calls flickr.photos.geo.setLocation to set the GeoLocation (latitude and longitude and, optionally, the accuracy level) for a Photo.
function photosGeoSetLocation( photoId: String, location: GeoLocation ):FlashrRequest
Calls flickr.photos.geo.setPerms to set the permission for who may view the geo data associated with a Photo
function photosGeoSetPerms( photoId: String, geoPerms: GeoPerms ):FlashrRequest
Fetches a list of availabale photo licenses for Flickr
function photosLicensesGetInfo():FlashrRequest
Sets the license for a photo.
function photosLicensesSetLicense( photoId: String, licenseId: Number ):FlashrRequest
Add a Note to a Photo.
function photosNotesAdd( photoId: String, noteX: Number, noteY: Number, noteW: Number, noteH: Number, noteText: String )
Delete a Note from a Photo.
function photosNotesDelete( noteId: String )
Edit a Note on a Photo.
function photosNotesEdit( noteId: String, noteX: Number, noteY: Number, noteW: Number, noteH: Number, noteText: String )
Add a photo to the end of an existing photoset.
function photosetsAddPhoto( photosetId: String, photoId: String ):FlashrRequest
Create a new photoset for the calling user (authUser).
function photosetsCreate( title: String, description: String, primaryPhotoId: Number ):FlashrRequest
Delete a photoset.
function photosetsDelete( photosetId: String ):FlashrRequest
Modify the meta-data for a Photoset.
function photosetsEditMeta( photosetId: String, title: String, description: String ):FlashrRequest
Modify the photos in a photoset.
function photosetsEditPhotos( photosetId: String, primaryPhotoId: Number, photoIds: Array ):FlashrRequest
Returns next and previous photos for a photo in a set.
function photosetsGetContext( photoId: String, photosetId: String ):FlashrRequest
Gets information about a photoset.
function photosetsGetInfo( photosetId: String ):FlashrRequest
Gets the photosets belonging to the specified user.
function photosetsGetList( userId: String ):FlashrRequest
Get the list of photos in a set.
function photosetsGetPhotos( photosetId: String, extras: String, privacyFilter: Number ):FlashrRequest
Set the order of photosets for the calling user.
function photosetsOrderSets( photosetIds: Array ):FlashrRequest
Remove a photo from a photoset.
function photosetsRemovePhoto( photosetId: String, photoId: String ):FlashrRequest
Add a comment to a photoset.
function photosetsCommentsAddComment( photosetId: String, comment: String ):FlashrRequest
Delete a photoset comment as the currently authenticated user.
function photosetsCommentsDeleteComment( commentId: String ):FlashrRequest
Edit the text of a comment as the currently authenticated user.
function photosetsCommentsEditComment( commentId: String, comment: String ):FlashrRequest
Returns the comments for a photoset.
function photosetsCommentsGetList( photosetId: String, comment: String ):FlashrRequest
Calls flickr.tags.getListPhoto to get the tag list for a given photo.
public function tagsGetListPhoto( photoId: String ):FlashrRequest
Calls flickr.tags.getListUser to get the tag list for a given user (or the currently logged in user).
public function tagsGetListUser( userId: String ):FlashrRequest
Calls flickr.tags.getListUserPopular to get the popular tags for a given user (or the currently logged in user).
public function tagsGetListUserPopular( userId: String, count: Number ):FlashrRequest
Calls flickr.tags.getRelated to get a list of tags ‘related’ to the given tag, based on clustered usage analysis.
public function tagsGetRelated( tag: String ):FlashrRequest
Calls flickr.test.echo - forwards any arguments on to the Flickr API
public function testEcho():FlashrRequest
Calls flickr.test.login - A testing method which checks if the caller is logged in then returns their username.
public function testLogin():FlashrRequest
Null test
public function testNull():FlashrRequest
Execute a Flashr.* function at a different priority to the current queuePriority.
function executeAtPriority( method: String, args: Array, priority: Number ):FlashrRequest
Queues a request for execution on flickr.com
function queueRequest( request: FlashrRequest ):FlashrRequest
Used internally to call a method on the flickr API.
private function callMethod( request: FlashrRequest ):Void
Returns a reference to the Flashr instance - if none exists yet then creates one and returns a reference to that.
public static function getFlashr():Flashr
Empties the queue.
function clearQueue()
Whether this FlashrRequest has been cancelled.
var cancelled: Boolean
Called when there is a successful response from a call to flickr.auth.getFrob
public function onAuthGetFrob( frob )
Called when there is a successful response from a call to flickr.auth.getToken or flickr.auth.checkToken.
public function onAuthCheckToken( token )
Called when the Flickr API returns an error code..
function onError( errorCode: Number, errorDescription: String, request: FlashrRequest )
Called when there is a response from a call to flickr.contacts.getList.
function onContactsGetList( user: Person, filter: String )
Called when there is a response from a call to flickr.contacts.getPublicList.
function onContactsGetPublicList( user: Person )
Called when there is a response from a call to flickr.favorites.add.
function onFavoritesAdd( photo: Photo )
Called when there is a response from a call to flickr.favorites.getList.
function onFavoritesGetList( user: Person, resultsSet: ResultsSet )
Called when there is a response from a call to flickr.favorites.getPublicList.
function onFavoritesGetPublicList( user: Person, resultsSet: ResultsSet )
Called when there is a response from a call to flickr.favorites.remove.
function onFavoritesRemove( photo: Photo )
Called when there is a response from a call to flickr.groups.pools.add
function onGroupsPoolsAdd( photo: Photo, group: Group )
Called when there is a response from a call to flickr.groups.pools.getGroups
function onGroupsPoolsGetGroups( user: Person )
Called when there is a response from a call to flickr.groups.pools.getPhotos
function onGroupsPoolsGetPhotos( group: Group, resultsSet: ResultsSet )
Called when there is a response from a call to flickr.groups.pools.remove
function onGroupsPoolsRemove( photo: Photo, group: Group )
Called when there is a response from a call to flickr.interestingness.getList
function onInterestingnessGetList( resultsSet: ResultsSet, date: Date )
Called when there is a response from a call to flickr.people.findByEmail.
function onPeopleFindByEmail( person: Person )
Called when there is a response from a call to flickr.people.findByUsername.
function onPeopleFindByUsername( person: Person )
Called when there is a response from a call to flickr.people.getInfo.
function onPeopleGetInfo( person: Person )
Called when there is a response from a call to flickr.people.getPublicGroups.
function onPeopleGetPublicGroups( person: Person )
Called when there is a response from a call to flickr.people.getPublicPhotos.
function onPeopleGetPublicPhotos( person: Person, resultsSet: ResultsSet )
Called when there is a response from a call to flickr.people.getUploadStatus.
function onPeopleGetUploadStatus( person: Person )
Called when there is a response from a call to flickr.photos.addTags.
function onPhotosAddTags( photo: Photo, tags: String )
Called when there is a response from a call to flickr.photos.delete.
function onPhotosDelete( photoId: String )
Called when there is a response from a call to flickr.people.getAllContexts.
function onPhotosGetAllContexts( photo: Photo )
Called when there is a response from a call to flickr.people.getContactsPhotos.
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.getContext.
function onPhotosGetContext( photo: Photo )
Called when there is a response from a call to flickr.people.getCounts.
function onPhotosGetCounts( counts: Array )
Called when there is a response from a call to flickr.people.getExif.
function onPhotosGetExif( photo: Photo )
The EXIF/TIFF/GPS tags associated with this photo.
public var exifData: Array
Called when there is a response from a call to flickr.people.getInfo.
function onPhotosGetInfo( photo: Photo )
Called when there is a response from a call to flickr.people.getPhotosNotInSet.
function onPhotosGetNotInSet( resultsSet: ResultsSet )
Called when there is a response from a call to flickr.people.getRecent.
function onPhotosGetRecent( resultsSet: ResultsSet )
Called when there is a response from a call to flickr.people.getSizes.
function onPhotosGetSizes( photo: Photo )
Called when there is a response from a call to flickr.people.getUntagged.
function onPhotosGetUntagged( resultsSet: ResultsSet )
Called when there is a response from a call to flickr.people.getWithGeoData.
function onPhotosGetWithGeoData( resultsSet: ResultsSet )
Called when there is a response from a call to flickr.people.getWithoutGeoData.
function onPhotosGetWithoutGeoData( resultsSet: ResultsSet )
Called when there is a response from a call to flickr.photos.recentlyUpdated
function onPhotosRecentlyUpdated( resultsSet: ResultsSet, minDate: Date )
Called when there is a response from a call to flickr.people.removeTag.
function onPhotosRemoveTag( tagId: Number )
An accuracy level of world.
public static var ACCURACY_WORLD: Number
An accuracy level of country.
public static var ACCURACY_COUNTRY: Number
An accuracy level of region.
public static var ACCURACY_REGION: Number
An accuracy level of city.
public static var ACCURACY_CITY: Number
An accuracy level of street.
public static var ACCURACY_STREET: Number
Called when there is a response from a call to flickr.people.search.
function onPhotosSearch( resultsSet: ResultsSet )
Called when there is a response from a call to flickr.people.setDates.
function onPhotosSetDates( photo: Photo )
Called when there is a response from a call to flickr.people.setMeta.
function onPhotosSetMeta( photo: Photo )
Called when there is a response from a call to flickr.people.setTags.
function onPhotosSetTags( photo: Photo )
Private internal function - set’s this Photo’s _tags...
private function _setTagsAsStrings( tags: String, author: Person )
Called when there is a response from a call to flickr.photos.comments.addComment
function onPhotosCommentsAddComment( comment: Comment, photo: Photo )
Returns an Array of all the Comments left on this Photo.
function getComments():Array
Called when there is a response from a call to flickr.photos.comments.deleteComment
function onPhotosCommentsDeleteComment( comment: Comment )
Called when there is a response from a call to flickr.photos.comments.editComment
function onPhotosCommentsEditComment( comment: Comment )
Called when there is a response from a call to flickr.photos.comments.getList.
function onPhotosCommentsGetList( photo: Photo )
Called when there is a response from a call to flickr.photos.geo.getLocation
function onPhotosGeoGetLocation( photo: Photo )
The GeoLocation of this Photo.
public var location: GeoLocation
Called when there is a response from a call to flickr.photos.geo.getPerms
function onPhotosGeoGetPerms( photo: Photo )
GeoPerms describing who may view geo data for a photo.
var geoPerms: GeoPerms
Called when there is a response from a call to flickr.photos.geo.removeLocation
function onPhotosGeoRemoveLocation( photo: Photo )
Called when there is a response from a call to flickr.photos.geo.setLocation
function onPhotosGeoSetLocation( photo: Photo )
Called when there is a response from a call to flickr.photos.licenses.getInfo.
function onPhotosLicensesGetInfo( licences: Array )
Called when there is a response from a call to flickr.photos.licenses.setLicense.
function onPhotosLicensesSetLicense( photo: Photo )
Called when there is a response from a call to flickr.photos.notes.add
function onPhotosNotesAdd( photo: Photo, note: Note )
Called when there is a response from a call to flickr.photos.notes.delete
function onPhotosNotesDelete( noteId: String )
Called when there is a response from a call to flickr.photos.notes.edit
function onPhotosNotesEdit( note: Note )
Called when there is a response from a call to flickr.photosets.addPhoto
function onPhotosetsAddPhoto( photoset: Photoset )
Called when there is a response from a call to flickr.photosets.create
function onPhotosetsCreate( photoset: Photoset )
Called when there is a response from a call to flickr.photosets.delete
function onPhotosetsDelete( photosetId: Number )
Called when there is a response from a call to flickr.photosets.editMeta
function onPhotosetsEditMeta( photoset: Photoset )
Called when there is a response from a call to flickr.photosets.editPhotos
function onPhotosetsEditPhotos( photoset: Photoset )
Called when there is a response from a call to flickr.photosets.getContext
function onPhotosetsGetContext( photo: Photo, photoset: Photoset )
Called when there is a response from a call to flickr.photosets.getInfo
function onPhotosetsGetInfo( photoset: Photoset )
Called when there is a response from a call to flickr.photosets.getList
function onPhotosetsGetList( user: Person )
Called when there is a response from a call to flickr.photosets.getPhotos
function onPhotosetsGetPhotos( photoset: Photoset, request: FlashrRequest )
Called when there is a response from a call to flickr.photosets.orderSets
function onPhotosetsOrderSets( user: Person )
Called when there is a response from a call to flickr.photosets.removePhoto
function onPhotosetsRemovePhoto( photoset: Photoset )
Called when there is a response from a call to flickr.photosets.comments.addComment
function onPhotosetsCommentsAddComment( comment: PhotosetComment )
Called when there is a response from a call to flickr.photosets.comments.deleteComment
function onPhotosetsCommentsDeleteComment( commentId: String )
Called when there is a response from a call to flickr.photosets.comments.editComment
function onPhotosetsCommentsEditComment( comment: PhotosetComment )
Called when there is a response from a call to flickr.photosets.comments.getList
function onPhotosetsCommentsGetList( photoset: Photoset )
Called when there is a response from a call to flickr.tags.tagsGetListPhoto.
function onTagsGetListPhoto( photo: Photo )
Called when there is a response from a call to flickr.tags.getListUser.
function onTagsGetListUser( person: Person )
Called when there is a response from a call to flickr.tags.getListUserPopular.
function onTagsGetListUserPopular( person: Person )
Called when there is a response from a call to flickr.tags.tagsGetRelated.
function onTagsGetRelated( sourceTag: Tag )
Called when there is a response from a call to flickr.test.echo.
function onTestEcho( params: Object )
Called when there is a response from a call to flickr.test.login
function onTestLogin( user: Person )
Called when there is a response from a call to flickr.test.null
function onTestNull()
Called internally on recepit of a response from a request to the Flashr.REST_ENDPOINT.
private function onAPIResponse( success: Boolean ):Void