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