com. kelvinluck. flickr. FlickrClass to provide an interface to the Flickr API This class in combination with FlickrResponseListener provides a convienient way to interact with the Flickr API from AS 2. The implementation should abstract away any processing of XML and allow for type checking in the functions you override in FlickrResponseListener. The idea is to make flash code which interacts with the Flickr API quicker and easier to write. This code is still beta so feedback is greatfully received :) LicenceThis code and documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0. http://creativecommons.org/licenses/by-nc-sa/2.0/ UsageVery simple usage example -- in the real world you would either subclass FlickrResponseListener to add functionality you required or override the method you were interested in. import com.kelvinluck.flickr.Flickr; import com.kelvinluck.flickr.FlickrResponseListener;
var _flickr:Flickr = Flickr.getFlickr(); _flickrResponseListener = new FlickrResponseListener(); _flickr.apiKey = "***"; _flickr.testEcho("one", 2, "free");
This example shows how you would override the method you were interested in: import com.kelvinluck.flickr.Flickr; import com.kelvinluck.flickr.FlickrResponseListener;
var _flickr:Flickr = Flickr.getFlickr(); _flickrResponseListener = new FlickrResponseListener(); _flickrResponseListener.onTestEcho = function(params:Object) { // do stuff } _flickr.apiKey = "***"; _flickr.testEcho("one", 2, "free");
See AlsoFlickrResponseListener http://www.flickr.com/services/api/ Version0.3.0 AuthorKelvin Luck < kelvin at kelvinluck dot com > Project Websitehttp://kelvinluck.com- /projects- /flashr-a-flickr-api-wrapper-for-flash Summary | Class to provide an interface to the Flickr API | | | | The place for all API calls to connect to. | | The base path you go to when you want to authenticate on flickr.com | | The API is already waiting for the response to a method call so cannot make another call | | Could not connect to the server (e.g. | | The XML returned by the server wasn’t in a <rsp /> tag. | | The user wasn’t logged in and tried to access a method that requires authentication (returned from flickr.com) | | The API key sent to flickr was invalid (returned from flickr.com) | | There was no errors and valid XML was returned. | | A constant representing permissions for nobody. | | A constant representing permissions for friends and family. | | A constant representing permissions for contacts. | | A constant representing permissions for everybody. | | Private variable to store this app’s shared secret for use with the authentication API. | | Private variable which stores the token generated by a successfull authorisation. | | Private variable which is used to store the frob which is used for the first part of the authentication process. | | A variable describing the permissions the currently auth’d user has within this app. | | A Person object for the currently auth’d user (if there is one). | | Constructor - as this class implements the Singleton pattern do not call directly but rather access through Flickr.getFlickr. | | | | Pops open a login window so that the user can authenticate with the flickr.com website. | | Calls flickr.auth.getFrob to get a frob to be used during authentication. | | Calls flickr.auth.getToken to get the auth token for the given frob, if one has been attached. | | Calls flickr.auth.checkToken to get the credentials attached to an authentication token. | | Simple function which forgets the information that was making this user be logged in. | | Internal function which generates the relevant link and pops open the login window on flickr.com. | | Internal, private function which is used to generate the api_sig used to sign a call. | | Calls flickr.contacts.getList to get a list of contacts for the calling user. | | Calls flickr.contacts.getPublicList to get a list of contacts a user. | | Calls flickr.favorites.add to add a photo to a user’s favorites list. | | Calls flickr.favorites.getList to get a list of the user’s favorite photos. | | Calls flickr.favorites.getPublicList to get a list of favorite public photos for the given user. | | Calls flickr.favorites.remove to remove a photo from a user’s favorites list. | | Add a photo to a group’s pool. | | Gets next and previous photos for a photo in a group pool. | | Gets a list of groups to which you can add photos. | | Gets a list of pool photos for a given group, based on the permissions of the group and the user logged in (if any). | | Remove a photo from a group pool. | | Calls flickr.people.findByEmail to get a user’s NSID, given their email address. | | Calls flickr.people.findByUsername to get a user’s NSID, given their username. | | Calls flickr.people.getInfo to get information about a user. | | Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of. | | Calls flickr.people.getPublicPhotos to get a list of public photos for the given user. | | Calls flickr.people.getUploadStatus to get information for the calling user related to photo uploads. | | Calls flickr.photos.addTags to add tags to a given photo. | | Returns all visble sets and pools the photo belongs to. | | Calls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ contacts. | | Calls flickr.photos.getContactsPublicPhotos to fetch a list of recent public photos from a users’ contacts. | | Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream. | | Calls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user. | | Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given photo. | | Calls flickr.photos.getInfo to get information about a photo.. | | Calls flickr.photos.getNotInSet to get a list of your photos that are not part of any sets. | | Calls flickr.photos.getPerms to get permissions for a photo. | | Calls flickr.photos.getRecent to get a list of the latest public photos uploaded to flickr. | | Calls flickr.photos.getRecent to get the available sizes for a photo. | | Calls flickr.photos.getUntagged to get a list of your photos with no tags. | | Calls flickr.photos.removeTag to remove a tag from a photo. | | Calls flickr.photos.search to get a list of photos matching some criteria. | | Calls flickr.photos.setDates to set one or both of the dates for a photo.. | | Calls flickr.photos.setMeta to set the meta information for a photo. | | Calls flickr.photos.setPerms to set permissions for a photo.. | | Calls flickr.photos.setTags to set the tags for a photo. | | Add a photo to the end of an existing photoset. | | Create a new photoset for the calling user. | | | | Modify the meta-data for a photoset. | | Modify the photos in a photoset. | | Returns next and previous photos for a photo in a set. | | Gets information about a photoset. | | Gets the photosets belonging to the specified user. | | Get the list of photos in a set. | | Set the order of photosets for the calling user. | | Remove a photo from a photoset. | | Calls flickr.tags.getListPhoto to get the tag list for a given photo. | | Calls flickr.tags.getListUser to get the tag list for a given user (or the currently logged in user). | | Calls flickr.tags.getListUserPopular to get the popular tags for a given user (or the currently logged in user). | | Calls flickr.tags.getRelated to get a list of tags ‘related’ to the given tag, based on clustered usage analysis. | | Calls flickr.test.echo - forwards any arguments on to the Flickr API | | Calls flickr.test.login - A testing method which checks if the caller is logged in then returns their username. | | Used to call a method on the flickr API. | | Called internally on recepit of a response from a request to the <REST_ENDPOINT>. | | Internal function used to convert a list of arguments into a querystring for use in a URL for a call to flickr.com. | | Private internal function used to avoid duplicate code to parse “the standard photo list xml” | | Private internal function used to avoid duplicate code when parsing the standard photoset XML | | Private internal function used to avoid duplicate code when parsing the standard context XML | | Returns a reference to the Flickr instance - if none exists yet then creates one and returns a reference to that. |
apiKeyprivate var _apiKey: String |
Your Flickr API Key. None of the method calls will work without this.
_REST_ENDPOINTprivate var _REST_ENDPOINT: String |
The place for all API calls to connect to. The default value of connecting directly to the flickr.com server will only work if a relevant entry is added to their crossdomain.xml file otherwise set the value to the location of a proxy script on your server.
_AUTH_ENDPOINTprivate var _AUTH_ENDPOINT: String |
The base path you go to when you want to authenticate on flickr.com
STATUS_BUSYpublic static var STATUS_BUSY: Number |
The API is already waiting for the response to a method call so cannot make another call
STATUS_ERROR_CONNECTINGpublic static var STATUS_ERROR_CONNECTING: Number |
Could not connect to the server (e.g. no internet connection, server down, security restrictions)
STATUS_INVALID_XMLpublic static var STATUS_INVALID_XML: Number |
The XML returned by the server wasn’t in a <rsp /> tag.
STATUS_USER_NOT_LOGGED_INpublic static var STATUS_USER_NOT_LOGGED_IN: Number |
The user wasn’t logged in and tried to access a method that requires authentication (returned from flickr.com)
STATUS_INVALID_API_KEYpublic static var STATUS_INVALID_API_KEY: Number |
The API key sent to flickr was invalid (returned from flickr.com)
STATUS_OKpublic static var STATUS_OK: Number |
There was no errors and valid XML was returned.
PERM_NOBODYpublic static var PERM_NOBODY: Number |
A constant representing permissions for nobody. See AlsophotosSetPerms
PERM_FRIENDSpublic static var PERM_FRIENDS: Number |
A constant representing permissions for friends and family. See AlsophotosSetPerms
PERM_CONTACTSpublic static var PERM_CONTACTS: Number |
A constant representing permissions for contacts. See AlsophotosSetPerms
PERM_EVERYBODYpublic static var PERM_EVERYBODY: Number |
A constant representing permissions for everybody. See AlsophotosSetPerms
_authTokenprivate var _authToken: String |
Private variable which stores the token generated by a successfull authorisation.
_authFrobprivate var _authFrob: String |
Private variable which is used to store the frob which is used for the first part of the authentication process.
authPermsA variable describing the permissions the currently auth’d user has within this app. It will be “none” until the user has been logged in and then will become “read”, “write” or “delete”. You can check whether authPerms == “none” if you want to find out if the user is currently logged in before checking who they are with authUser See AlsoauthLogin authUser
authUserA Person object for the currently auth’d user (if there is one). Empty if there is no currently auth’d user. See AlsoauthLogin authPerms
Flickrprivate function Flickr() |
Constructor - as this class implements the Singleton pattern do not call directly but rather access through Flickr.getFlickr.
authLoginpublic 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. Parametersperms | A desired level of permission for actions which the application wants to perform on behalf of the user. “read”, “write” or “delete”. |
See AlsoauthGetToken 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
authLogoutpublic 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...
favoritesGetListpublic function favoritesGetList( | userId: | String, | | extras: | String, | | perPage: | Number, | | page: | Number | ) |
|
Calls flickr.favorites.getList to get a list of the user’s favorite photos. ParametersuserId | 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. | perPage | The number of results to get per page [Optional: default=100] | page | The page of results to get [Optional: default=1] |
See AlsoFlickrResponseListener.onFavoritesGetList http://www.flickr.com- /services- /api- /flickr.favorites.getList.html
favoritesGetPublicListpublic function favoritesGetPublicList( | userId: | String, | | extras: | String, | | perPage: | Number, | | page: | Number | ) |
|
Calls flickr.favorites.getPublicList to get a list of favorite public photos for the given user. ParametersuserId | 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. | perPage | The number of results to get per page [Optional: default=100] | page | The page of results to get [Optional: default=1] |
See AlsoFlickrResponseListener.onFavoritesGetPublicList http://www.flickr.com- /services- /api- /flickr.favorites.getPublicList.html
groupsPoolsGetPhotosfunction groupsPoolsGetPhotos( | groupId: | String, | | tags: | String, | | extras: | String, | | perPage: | Number, | | page: | Number, | | userId: | String | ) |
|
Gets a list of pool photos for a given group, based on the permissions of the group and the user logged in (if any). ParametersgroupId | 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. | 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] |
See AlsoFlickrResponseListener.onGroupsPoolsGetPhotos http://www.flickr.com- /services- /api- /flickr.groups.pools.getPhotos.html
groupsPoolsRemovefunction groupsPoolsRemove( | photoId: | Number, | | groupId: | String | ) |
|
Remove a photo from a group pool. ParametersphotoId | 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. |
peopleGetPublicPhotosfunction peopleGetPublicPhotos( | nsid: | String, | | extras: | String, | | perPage: | Number, | | page: | Number | ) |
|
Calls flickr.people.getPublicPhotos to get a list of public photos for the given user. Parametersnsid | 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. | perPage | The number of photos to return per page. [Optional: default=100] | page | The page of results to return. [Optional: default=1] |
See AlsoFlickrResponseListener.onPeopleGetPublicPhotos http://flickr.com- /services- /api- /flickr.people.getPublicPhotos.html
photosGetContactsPhotosfunction photosGetContactsPhotos ( | count: | Number, | | justFriends: | Number, | | singlePhoto: | Number, | | includeSelf: | Number, | | extras: | String | ) |
|
Calls flickr.photos.getContactsPhotos to fetch a list of recent photos from the calling users’ contacts. Parameterscount | 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. |
See AlsoFlickrResponseListener.onPhotosGetContactsPhotos http://flickr.com- /services- /api- /flickr.photos.getContactsPhotos.html
photosGetContactsPublicPhotosfunction photosGetContactsPublicPhotos ( | nsid: | String, | | count: | Number, | | justFriends: | Number, | | singlePhoto: | Number, | | includeSelf: | Number, | | extras: | String | ) |
|
Calls flickr.photos.getContactsPublicPhotos to fetch a list of recent public photos from a users’ contacts. Parametersnsid | 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. |
See AlsoFlickrResponseListener.onPhotosGetContactsPublicPhotos http://www.flickr.com- /services- /api- /flickr.photos.getContactsPublicPhotos.html
photosGetCountsfunction photosGetCounts ( | dates: | String, | | takenDates: | String | ) |
|
Calls flickr.photos.getCounts to get a list of photo counts for the given date ranges for the calling user. Parametersdates | 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. |
Note- The dates parameter is passed as UNIX Timestamps while the takenDates parameter is passed as MySQL Timestamps (e.g. 2005-03-21).
- If you want to pass takenDates then pass “” (empty string) or undefined as the value of dates.
TODOShould 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 (Flickr.DATES_UPLOADED or Flickr.DATES_TAKEN)? See AlsoFlickrResponseListener.onPhotosGetCounts http://www.flickr.com- /services- /api- /flickr.photos.getCounts.html
photosGetNotInSetfunction photosGetNotInSet ( | extras: | String, | | perPage: | Number, | | page: | Number | ) |
|
Calls flickr.photos.getNotInSet to get a list of your photos that are not part of any sets. Parametersextras | 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 | perPage | The number of photos to return per page. [Optional: default=100] | page | The page of results to return. [Optional: default=1] |
See AlsoFlickrResponseListener.onPhotosGetNotInSet http://www.flickr.com- /services- /api- /flickr.photos.getNotInSet.html
photosGetRecentfunction photosGetRecent ( | extras: | String, | | perPage: | Number, | | page: | Number | ) |
|
Calls flickr.photos.getRecent to get a list of the latest public photos uploaded to flickr. Parametersextras | 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 | perPage | The number of photos to return per page. [Optional: default=100] | page | The page of results to return. [Optional: default=1] |
See AlsoFlickrResponseListener.onPhotosGetRecent http://www.flickr.com- /services- /api- /flickr.photos.getRecent.html
photosGetUntaggedfunction photosGetUntagged ( | extras: | String, | | perPage: | Number, | | page: | Number | ) |
|
Calls flickr.photos.getUntagged to get a list of your photos with no tags. Parametersextras | 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 | perPage | The number of photos to return per page. [Optional: default=100] | page | The page of results to return. [Optional: default=1] |
See AlsoFlickrResponseListener.onPhotosGetUntagged http://www.flickr.com- /services- /api- /flickr.photos.getUntagged.html
photosSearchfunction photosSearch ( | params | ) |
|
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... Attributesuser_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 | The license id for 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 | 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. | 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 and interestingness-asc |
TODOShould 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. See AlsoFlickrResponseListener.onPhotosSearch http://www.flickr.com- /services- /api- /flickr.photos.search.html
photosSetDatesfunction photosSetDates ( | photoId: | Number, | | datePosted: | Date, | | dateTaken: | Date, | | dateTakenGran: | Number | ) |
|
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... ParametersphotoId | 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. |
See AlsoFlickrResponseListener.onPhotosSetDates http://flickr.com- /services- /api- /flickr.photos.setDates.html http://flickr.com/services/api/misc.dates.html
photosetsEditPhotosfunction photosetsEditPhotos( | photosetId: | Number, | | primaryPhotoId: | Number, | | photoIds: | Array | ) |
|
Modify the photos in a photoset. Use this method to add, remove and re-order photos. ParametersphotosetId | 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. |
See AlsoFlickrResponseListener.onPhotosetsEditPhotos http://www.flickr.com- /services- /api- /flickr.photosets.editPhotos.html
photosetsOrderPhotosetsfunction photosetsOrderPhotosets( | photosetIds: | Array | ) |
|
Set the order of photosets for the calling user. ParametersphotosetIds | 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. |
See Also<FlickrResponseListener.onPhotosetsOrderPhotosets> http://www.flickr.com- /services- /api- /flickr.photosets.orderSets.html
callMethodpublic function callMethod( | method: | String, | | additionalArguments: | Object, | | requiresSigning: | Boolean | ):Void |
|
Used to call a method on the flickr API. When the method returns an onAPIResponse event is broadcast to any registered listeners. You should use the methods above unless you are calling a method on Flickr.com which hasn’t yet been implemented in this API as then you will get argument type checking etc... Parametersmethod | The name of the method you want to call | additionalArguments | Any additional arguments required by the object [Optional] | requiresSigning | Whether the called method requires signing. Used by methods such as flickr.auth.getFrob which need to be signed but are called before the user is auth’d. Once a user is auth’d then all methods are automatically signed. [optional: default=false] |
See alsoFlickr.onAPIResponse
onAPIResponseprivate function onAPIResponse( | success: | Boolean | ):Void |
|
Called internally on recepit of a response from a request to the <REST_ENDPOINT>. Interperets the received XML and broadcasts an onAPIResponse event to any registered listeners. If the XML was the result of a known method call then the broadcast event will include sensible information, otherwise it will just be the XML for parsing outside this class (e.g. if a new method has been added to the Flickr.com API and not programmed into this class). Parameterssuccess | Whether the call to the API was successfull (e.g. the server specfied in <REST_ENDPOINT> was connected to) or not. |
_prepareQuerystringfunction _prepareQuerystring( | method: | String, | | additionalArguments: | Object, | | requiresSigning: | Boolean | ) |
|
Internal function used to convert a list of arguments into a querystring for use in a URL for a call to flickr.com. Deals with signing the call as necessary. Can also be used when a signed querystring is needed outside of the API (e.g. for uploading). Parametersmethod | The method on flickr.com you are calling | additionalArguments | An object whose name/value pairs are what need adding to the URL | requiresSigning | Whether this method requires signing. Should only be called by the inital |
ReturnsThe generated querystring.
_parsePhotoXMLPrivate internal function used to avoid duplicate code to parse “the standard photo list xml” Paramspx | The “standard photo list xml” from flickr. |
ReturnsA ResultsSet.
_parsePhotosetXmlprivate function _parsePhotosetXml( | photosetXml: | XMLNode, | | owner: | Person | ):Photoset |
|
Private internal function used to avoid duplicate code when parsing the standard photoset XML ParametersphotosetXml | An XML node describing a photoset. | owner | The owner of this Photoset - leave as undefined if they exist as an attribute in the XML... |
ReturnsThe created Photoset.
_parseContextXmlprivate function _parseContextXml( | contextXML: | XMLNode | ):Object |
|
Private internal function used to avoid duplicate code when parsing the standard context XML ParameterscontextXML | The contextXML to parse |
ReturnsAn object containing count:Number, prevphoto:Photo and nextphoto:Photo
getFlickrpublic static function getFlickr():Flickr |
Returns a reference to the Flickr instance - if none exists yet then creates one and returns a reference to that. ReturnsA Flickr instance
|