com. kelvinluck. flashr. core. Photo

Class to describe a photo from Flickr.

Instances of this class are created to hold photos who have been returned in data from calls to the Flickr API.

Licence

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

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

Version

0.5.0

Author

Kelvin Luck < kelvin at kelvinluck dot com >

Project Website

http://flashr.kelvinluck.com/

Subversion Id

$Id: Photo.as 84 2007-03-11 21:18:17Z kluck $

Summary
com. kelvinluck. flashr. core. PhotoClass to describe a photo from Flickr.
idThis photo’s id.
ownerA reference to the Person who owns this photo.
secretThis photo’s secret.
serverThis photo’s server.
farmThis photo’s farm.
originalFormatThe format that this Photo was originally uploaded in.
titleThis photo’s title.
descriptionThis photo’s description.
numCommentsThe number of comments this photo has.
_commentsThe Comments that have been left on this Photo.
_notesThe Notes that have been left on this photo.
_tagsThe Tags that are associated with this photo.
_sizesThe PhotoSizes that are associated with this photo.
isPublicWhether or not this photo is public.
isFriendWhether or not this photo is by a friend.
isFamilyWhether or not this photo is by a family member.
geoPermsGeoPerms describing who may view geo data for a photo.
dateUploadedThe date this photo was uploaded
dateTakenThe date this photo was taken.
dateUpdatedThe date this photo was updated
licenseThe License for this Photo.
rotation
photoPageUrlThe link to this photo’s page on flickr.com.
locationThe GeoLocation of this Photo.
smallSquareUrlThe URL for the small square (75x75 pixels) version of this Photo
thumbnailUrlDEPRECATED This is the 75 x 75 pixel thumbnail image refered to as “small square” in the flickr.com documentation.
thumbUrlThe URL for the thumbUrl image (100px on longest side) NOTE - this is referred to the “thumbnail” image on flickr.com but for historical reasons it is known as thumbUrl here (thumbnailUrl points to smallSquareUrl)
smallUrlThe URL for the small sized image (240px on longest side)
mediumUrlThe URL for the medium sized image (500px on longest side)
largeUrlThe URL for the large sized image (1024px on longest side)
originalUrlThe URL for the originally uploaded image - returns an empty string if we don’t know the format of the original image.
contextUrlThe URL for this photo within the context of the photostream e.g.
contextThumbUrlThe URL for this photo’s thumbnail image within some sort of context e.g.
contextPhotoPreviousThe previous photo in this context (as returned by Flashr.photosGetContext)
contextPhotoNextThe next photo in this context (as returned by Flashr.photosGetContext)
contextCountNot documented on flickr.com but maybe the number of photos in this context (e.g.
_contextPhotosetsStores information about this Photos context in given Photosets
_contextGroupPoolStores information about this Photos context in given Groups
_photosetsAn Array containing references to the Photosets that this Photo is in.
_groupsAn Array containing references to the Groups that this Photo is in.
exifDataThe EXIF/TIFF/GPS tags associated with this photo.
_photosA private static Object containing Photo objects.
PhotoPrivate constructor function - creates a new Photo object.
getCommentsReturns an Array of all the Comments left on this Photo.
_addCommentPrivate internal function - Adds a Comment object to this Photo.
getNotesReturns an object containing all the note’s that have been left on this Photo
_addNotePrivate internal function - adds a Note object to this Photo.
_removeNotePrivate internal function - removes the reference to the given Note from this Photo so that the Note object can be sucessfully garbage collected.
getTagsReturns an object containing all the tags’s that are associated with this Photo.
getTagsAsStringsA utility function to get all the Tag’s associated with this Photo as Strings.
_addTagPrivate internal function - adds a Tag object to this Photo and associates it with a Person who is the Person who associated that Tag with this Photo.
_setTagsAsStringsPrivate internal function - set’s this Photo’s _tags...
_addPhotosetPrivate internal function - adds a photoset to this Photos _photosets Array
_removePhotosetPrivate internal function - removes a given Photoset from this Photos _photosets Array.
getPhotosetsThis Photos _photosets Array.
_addGroupPrivate internal function - adds a Group to this Photos _groups Array
_removeGroupPrivate internal function - removes a given Group from this Photos _groups Array.
getGroupsThis Groups _groups Array.
_setContextPhotosetPrivate internal function - adds information about this Photos context in a given Photoset
getContextPhotosetGet information about the context of this Photo in a given Photoset
_setContextGroupPoolPrivate internal function - adds information about this Photos context in a given Group
getContextGroupPoolGet information about the context of this Photo in a given Photoset
_addSizePrivate internal function - adds a PhotoSize object to this Photo.
getSizesGet’s information about the available PhotoSizes for this Photo (assuming Flashr.photosGetSizes has been called - otherwise returns an empty Array).
getLargestAvailableSizeUse to get the biggest available version of this Photo.
_destroyPrivate function to remove this Photo object from the _photos Array so that it can’t be used again.
getPhotoGet’s a Photo object for the given photo ID.

id

public var id: String

This photo’s id.

owner

public var owner: Person

A reference to the Person who owns this photo.

secret

public var secret: String

This photo’s secret.

server

public var server: Number

This photo’s server.

farm

public var farm: Number

This photo’s farm.

originalFormat

public var originalFormat: String

The format that this Photo was originally uploaded in.

title

public var title: String

This photo’s title.

description

public var description: String

This photo’s description.

numComments

public var numComments: Number

The number of comments this photo has.

_comments

private var _comments: Array

The Comments that have been left on this Photo.  Private so access through the functions below.

See Also

getComments, _addComment

_notes

private var _notes: Object

The Notes that have been left on this photo.  Private so access through the functions below.

See Also

getNotes, _addNote

_tags

private var _tags: Object

The Tags that are associated with this photo.  Private so access through the functions below.

See Also

getTags, _addTag

_sizes

private var _sizes: Array

The PhotoSizes that are associated with this photo.

See Also

getSizes, getLargestAvailableSize, _addSize

isPublic

public var isPublic: Boolean

Whether or not this photo is public.

isFriend

public var isFriend: Boolean

Whether or not this photo is by a friend.

isFamily

public var isFamily: Boolean

Whether or not this photo is by a family member.

geoPerms

var geoPerms: GeoPerms

GeoPerms describing who may view geo data for a photo.

dateUploaded

private var _dateUploaded: Date

The date this photo was uploaded

You set this as a String which the setter method automagically transforms from a UNIX Timestamp (as provided by flickr.com) to a Date object.

dateTaken

private var _dateTaken: Date

The date this photo was taken.

You set this as a string which the setter method automagically transforms from a MySQL Timestamp (as provided by flickr.com) to a Date object.

dateUpdated

private var _dateUpdated: Date

The date this photo was updated

You set this as a String which the setter method automagically transforms from a UNIX Timestamp (as provided by flickr.com) to a Date object.

license

public var license: License

The License for this Photo.

See Also

Flashr.photosLicensesGetInfo

rotation

public var rotation: Number

photoPageUrl

private var _photoPageUrl: String

The link to this photo’s page on flickr.com.  If flickr.photos.getInfo has been called on this photo then the link will be the “pretty” one with the user’s chosen screen name.  Otherwise it will be the “ugly” one which works just as well but doesn’t look as good.

location

public var location: GeoLocation

The GeoLocation of this Photo.  This will be filled on a call to Flashr.photosGetInfo or to any method call which had “geo” passed in it’s “extras” parameter.

smallSquareUrl

public function get smallSquareUrl():String

The URL for the small square (75x75 pixels) version of this Photo

thumbnailUrl

private var _thumbnailUrl: String

DEPRECATED This is the 75 x 75 pixel thumbnail image refered to as “small square” in the flickr.com documentation.  The prefered way to refer to this image is using smallSquareUrl which is more accurately named and will remain in future versions of Flashr.  It is not to be confused with the 100 pixels on the longest side image called “thumbnail” in the flickr.com documentation (and called thumbUrl here)

thumbUrl

public function set thumbUrl(smallUrl: String)

The URL for the thumbUrl image (100px on longest side) NOTE - this is referred to the “thumbnail” image on flickr.com but for historical reasons it is known as thumbUrl here (thumbnailUrl points to smallSquareUrl)

smallUrl

public function set smallUrl(smallUrl: String)

The URL for the small sized image (240px on longest side)

mediumUrl

public function set mediumUrl(mediumUrl: String)

The URL for the medium sized image (500px on longest side)

largeUrl

public function set largeUrl(largeUrl: String)

The URL for the large sized image (1024px on longest side)

Note

This image only exists where the originally uploaded image is of sufficient size - your code should be able to deal with the image not existing

originalUrl

private var _originalUrl: String

The URL for the originally uploaded image - returns an empty string if we don’t know the format of the original image.

Note

If this method returns an empty string you should do one of the following:

  • Make an API call returning information about this photo passing “original_format” to the extras parameter.
  • Call Flashr.photosGetSizes.
  • Assume that the original image was a jpeg and use: (code)photo._urlStart+”_o.jpg”;(end) to try and load the image.

contextUrl

public var contextUrl: String

The URL for this photo within the context of the photostream e.g. as returned from a call to flickr.photo.getContext

contextThumbUrl

public var contextThumbUrl: String

The URL for this photo’s thumbnail image within some sort of context e.g. as returned from a call to flickr.photo.getContext TODO: The thumbnail URL should be independant of context, no?

contextPhotoPrevious

public var contextPhotoPrevious: Photo

The previous photo in this context (as returned by Flashr.photosGetContext)

contextPhotoNext

public var contextPhotoNext: Photo

The next photo in this context (as returned by Flashr.photosGetContext)

contextCount

public var contextCount: Number

Not documented on flickr.com but maybe the number of photos in this context (e.g. the user’s photostream)?  (as returned by Flashr.photosGetContext)

_contextPhotosets

private var _contextPhotosets: Object

Stores information about this Photos context in given Photosets

See Also

Flashr.photosetsGetContext, getContextPhotoset, _setContextPhotoset

_contextGroupPool

private var _contextGroupPools: Object

Stores information about this Photos context in given Groups

See Also

Flashr.groupsPoolsGetContext, getContextGroupPool, _setContextGroupPool

_photosets

private var _photosets: Array

An Array containing references to the Photosets that this Photo is in.  Filled in by a call to Flashr.photosGetAllContexts and also when you e.g. add a Photo to a Photoset through Flashr.photosetsAddPhoto or Flashr.photosetsEditPhotos (via Photoset._addPhoto)

See Also

getPhotosets, _addPhotoset, _removePhotoset

_groups

private var _groups: Array

An Array containing references to the Groups that this Photo is in.  Filled in by a call to Flashr.photosGetAllContexts and also when you e.g. add a Photo to a Group through Flashr.groupsPoolsGetPhotos (via Group._addPhoto)

See Also

getGroups, _addGroup, _removeGroup

exifData

public var exifData: Array

The EXIF/TIFF/GPS tags associated with this photo.  It is an Array of ExifData objects.

See Also

Flashr.photosGetExif

_photos

private static var _photos: Object

A private static Object containing Photo objects.  Used by getPhoto to insure that only one Photo is created for each photo ID returned from flickr.com

See Also

getPhoto

Photo

private function Photo(id: String)

Private constructor function - creates a new Photo object.  Should be called via Photo.getPhoto.

getComments

function getComments():Array

Returns an Array of all the Comments left on this Photo.  Will return an empty Array until Flashr.photosCommentsGetList or Flashr.photosCommentsAddComment has been called.

If Flashr.photosGetInfo has been called and Flashr.photosCommentsGetList hasn’t then we know the number of comments there should be and so can raise a warning to remind the user that they should have called Flashr.photosCommentsGetList

Returns

All the Comments that have been left on this Photo

See Also

_comments, Flashr.photosCommentsGetList

_addComment

private function _addComment(comment: Comment):Void

Private internal function - Adds a Comment object to this Photo.  If you want to do this you are probably looking for Flashr.photosCommentsAddComment

Parameters

noteThe Note you want to add to this photo

getNotes

function getNotes():Object

Returns an object containing all the note’s that have been left on this Photo

Returns

All the Note’s that have been left on this Photo

See Also

_notes, Flashr.photosGetInfo

_addNote

private function _addNote(note: Note):Void

Private internal function - adds a Note object to this Photo.  If you want to do this you are probably looking for Flashr.photosNotesAdd

Parameters

noteThe Note you want to add to this photo

_removeNote

private function _removeNote(noteId: String)

Private internal function - removes the reference to the given Note from this Photo so that the Note object can be sucessfully garbage collected.  Private because it should only be used internally by the library on a sucessful response from Flashr.photosNotesDelete,

Parameters

noteIdThe id of the Note that is being deleted.

getTags

function getTags():Object

Returns an object containing all the tags’s that are associated with this Photo.

Returns

All the Tag’s that are associated with this Photo.  Each Tag is associated with a Person as well &ndash; the Person who left this Tag on this Photo.  Each Tag is also associated with an id &ndash; this is the number you would use to call Flashr.photosRemoveTag if you wanted to remove that Tag from this Photo.

See Also

_tags, getTagsAsStrings, Flashr.photosGetInfo

getTagsAsStrings

function getTagsAsStrings():Array

A utility function to get all the Tag’s associated with this Photo as Strings.  Use this in cases where you don’t care about the details of the Tag or it’s relationship to this Photo (e.g. you aren’t planning to modify it or delete it) and you just want to know what it is...

Returns

An Array containing the clean version of the text for each Tag left on this Photo.  NOTE: this is only useful to you if you are only interested in the textual content of these Tags (otherwise use getTags) and will only be filled after a call to Flashr.photosGetInfo for this Photo.

See Also

_tags, getTags, Flashr.photosGetInfo

_addTag

private function _addTag(id: String,
tag: Tag,
author: Person):Void

Private internal function - adds a Tag object to this Photo and associates it with a Person who is the Person who associated that Tag with this Photo.  If you want to do this you are probably looking for Flashr.photosAddTags

Parameters

idThe id which describes the link between this Photo and Tag.
tagThe Tag you want to add to this photo.
authorThe Person who attached that Tag to this Photo.

See Also

getTags, _tags

_setTagsAsStrings

private function _setTagsAsStrings(tags: String,
author: Person)

Private internal function - set’s this Photo’s _tags...  This method is called when you supply “tags” to any method that takes an “extras” argument.  In this case we get the list of tags returned to us without any corresponding information about the authors of the tags or the ids linking them to the Photo.

Parameters

tagsThe tags to add to this photo as a space seperated string
authorThe Person who added these tags (leave undefined if you don’t know)

We don’t know the id’s that will associate the Tag’s with the Photos at this point so are using garbage ones.  This means that you won’t be able to remove the tags using those ids...  If you ever see a tag linked to a photo with an id starting with an underscore you know that this is not a real id and you need to call Flashr.photosGetInfo to get an id you can use with Flashr.photosRemoveTag

_addPhotoset

private function _addPhotoset(photoset: Photoset)

Private internal function - adds a photoset to this Photos _photosets Array

Parameters

photosetThe Photoset to add to this Photo.

_removePhotoset

private function _removePhotoset(photoset: Photoset)

Private internal function - removes a given Photoset from this Photos _photosets Array.

Parameters

photosetThe Photoset to remove from this Photo.

getPhotosets

function getPhotosets():Array

Returns

This Photos _photosets Array.

See Also

_photosets

_addGroup

private function _addGroup(group: Group)

Private internal function - adds a Group to this Photos _groups Array

Parameters

groupThe Group to add to this Photo.

_removeGroup

private function _removeGroup(group: Group)

Private internal function - removes a given Group from this Photos _groups Array.

getGroups

function getGroups():Array

Returns

This Groups _groups Array.

See Also

_groups

_setContextPhotoset

private function _setContextPhotoset(photosetId: Number,
previousPhoto: Photo,
nextPhoto: Photo)

Private internal function - adds information about this Photos context in a given Photoset

Parameters

photosetIdThe id of the Photoset this context is for
previousPhotoThe Photo before this Photo in this context or undefined if this is the first Photo in this context.
nextPhotoThe Photo after this Photo in this context or undefined if this is the last Photo in this context.

getContextPhotoset

function getContextPhotoset(photosetId: Number)

Get information about the context of this Photo in a given Photoset

Parameters

photosetIdThe id of the Photoset you want the context information for.

Returns

An object containing nextPhoto and previousPhoto which are Photo objects. undefined if there is no information about this Photos context in the requested Photoset

See Also

Flashr.photosetsGetContext, _contextPhotosets

_setContextGroupPool

private function _setContextGroupPool(groupId: String,
previousPhoto: Photo,
nextPhoto: Photo)

Private internal function - adds information about this Photos context in a given Group

Parameters

groupIdThe id of the Group this context is for
previousPhotoThe Photo before this Photo in this context or undefined if this is the first Photo in this context.
nextPhotoThe Photo after this Photo in this context or undefined if this is the last Photo in this context.

getContextGroupPool

function getContextGroupPool(groupId: Number)

Get information about the context of this Photo in a given Photoset

Parameters

groupIdThe id of the Group you want the context information for.

Returns

An object containing nextPhoto and previousPhoto which are Photo objects. undefined if there is no information about this Photos context in the requested Group

See Also

Flashr.groupsPoolsGetContext, _contextGroupPools

_addSize

private function _addSize(size: PhotoSize):Void

Private internal function - adds a PhotoSize object to this Photo.

Parameters

sizeThe PhotoSize you want to add to this photo.

See Also

Flashr.photosGetSizes

getSizes

function getSizes():Array

Get’s information about the available PhotoSizes for this Photo (assuming Flashr.photosGetSizes has been called - otherwise returns an empty Array).

See Also

Flashr.photosGetSizes, getLargestAvailableSize, _sizes

Returns : The _sizes Array.

getLargestAvailableSize

function getLargestAvailableSize(maxDimension: Number):PhotoSize

Use to get the biggest available version of this Photo.  Call after Flashr.photosGetSizes has been called, otherwise logs an error message and returns null.

Parameters

maxDimensionOptionally the biggest size you want. e.g. if you want a version of this Photo which is up to but no more than 900 pixels high or wide you would 900 to this function.

See Also

Flashr.photosGetSizes

Returns : The PhotoSize object representing the largest available image (whose max dimension is less than or equal to the maxDimension parameter if passed)

_destroy

private function _destroy()

Private function to remove this Photo object from the _photos Array so that it can’t be used again.  Called internally on a successful call to Flashr.photosDelete

getPhoto

public static function getPhoto(photoId: String):Photo

Get’s a Photo object for the given photo ID.

Consults _photos to make sure that only one Photo instance is created for each photo ID from flickr.com

Parameters

photoIdThe id of the Photo you want to get

Returns

The Photo object for the given id or false if that photo has been deleted using Flashr.photosDelete

public var id: String
This photo’s id.
public var owner: Person
A reference to the Person who owns this photo.
Class to describe a person from Flickr.
public var secret: String
This photo’s secret.
public var server: Number
This photo’s server.
public var farm: Number
This photo’s farm.
public var originalFormat: String
The format that this Photo was originally uploaded in.
private function Photo(id: String)
Private constructor function - creates a new Photo object.
public var title: String
This photo’s title.
public var description: String
This photo’s description.
public var numComments: Number
The number of comments this photo has.
private var _comments: Array
The Comments that have been left on this Photo.
Class to describe a comment on a photo on Flickr.
private var _notes: Object
The Notes that have been left on this photo.
Class to describe a note on a photo on Flickr.
private var _tags: Object
The Tags that are associated with this photo.
Class to describe a tag on a photo on flickr.com
private var _sizes: Array
The PhotoSizes that are associated with this photo.
Class to describe the size of a Photo from Flickr.
public var isPublic: Boolean
Whether or not this photo is public.
public var isFriend: Boolean
Whether or not this photo is by a friend.
public var isFamily: Boolean
Whether or not this photo is by a family member.
var geoPerms: GeoPerms
GeoPerms describing who may view geo data for a photo.
Class to define the permissions to geographical data for a given Photo
private var _dateUploaded: Date
The date this photo was uploaded
private var _dateTaken: Date
The date this photo was taken.
private var _dateUpdated: Date
The date this photo was updated
public var license: License
The License for this Photo.
Represents one of the possible Licences on flickr.com
public var rotation: Number
private var _photoPageUrl: String
The link to this photo’s page on flickr.com.
public var location: GeoLocation
The GeoLocation of this Photo.
Class to describe the geographical location of a Photo on flickr.com.
public function get smallSquareUrl():String
The URL for the small square (75x75 pixels) version of this Photo
private var _thumbnailUrl: String
DEPRECATED This is the 75 x 75 pixel thumbnail image refered to as “small square” in the flickr.com documentation.
public function set thumbUrl(smallUrl: String)
The URL for the thumbUrl image (100px on longest side) NOTE - this is referred to the “thumbnail” image on flickr.com but for historical reasons it is known as thumbUrl here (thumbnailUrl points to smallSquareUrl)
public function set smallUrl(smallUrl: String)
The URL for the small sized image (240px on longest side)
public function set mediumUrl(mediumUrl: String)
The URL for the medium sized image (500px on longest side)
public function set largeUrl(largeUrl: String)
The URL for the large sized image (1024px on longest side)
private var _originalUrl: String
The URL for the originally uploaded image - returns an empty string if we don’t know the format of the original image.
public var contextUrl: String
The URL for this photo within the context of the photostream e.g.
public var contextThumbUrl: String
The URL for this photo’s thumbnail image within some sort of context e.g.
public var contextPhotoPrevious: Photo
The previous photo in this context (as returned by Flashr.photosGetContext)
function photosGetContext (photoId: String):FlashrRequest
Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream.
public var contextPhotoNext: Photo
The next photo in this context (as returned by Flashr.photosGetContext)
public var contextCount: Number
Not documented on flickr.com but maybe the number of photos in this context (e.g.
private var _contextPhotosets: Object
Stores information about this Photos context in given Photosets
Describes a Photoset on flickr.com
private var _contextGroupPools: Object
Stores information about this Photos context in given Groups
Class to describe a group from Flickr.
private var _photosets: Array
An Array containing references to the Photosets that this Photo is in.
private var _groups: Array
An Array containing references to the Groups that this Photo is in.
public var exifData: Array
The EXIF/TIFF/GPS tags associated with this photo.
private static var _photos: Object
A private static Object containing Photo objects.
function getComments():Array
Returns an Array of all the Comments left on this Photo.
private function _addComment(comment: Comment):Void
Private internal function - Adds a Comment object to this Photo.
function getNotes():Object
Returns an object containing all the note’s that have been left on this Photo
private function _addNote(note: Note):Void
Private internal function - adds a Note object to this Photo.
private function _removeNote(noteId: String)
Private internal function - removes the reference to the given Note from this Photo so that the Note object can be sucessfully garbage collected.
function getTags():Object
Returns an object containing all the tags’s that are associated with this Photo.
function getTagsAsStrings():Array
A utility function to get all the Tag’s associated with this Photo as Strings.
private function _addTag(id: String,
tag: Tag,
author: Person):Void
Private internal function - adds a Tag object to this Photo and associates it with a Person who is the Person who associated that Tag with this Photo.
private function _setTagsAsStrings(tags: String,
author: Person)
Private internal function - set’s this Photo’s _tags...
private function _addPhotoset(photoset: Photoset)
Private internal function - adds a photoset to this Photos _photosets Array
private function _removePhotoset(photoset: Photoset)
Private internal function - removes a given Photoset from this Photos _photosets Array.
function getPhotosets():Array
This Photos _photosets Array.
private function _addGroup(group: Group)
Private internal function - adds a Group to this Photos _groups Array
private function _removeGroup(group: Group)
Private internal function - removes a given Group from this Photos _groups Array.
function getGroups():Array
This Groups _groups Array.
private function _setContextPhotoset(photosetId: Number,
previousPhoto: Photo,
nextPhoto: Photo)
Private internal function - adds information about this Photos context in a given Photoset
function getContextPhotoset(photosetId: Number)
Get information about the context of this Photo in a given Photoset
private function _setContextGroupPool(groupId: String,
previousPhoto: Photo,
nextPhoto: Photo)
Private internal function - adds information about this Photos context in a given Group
function getContextGroupPool(groupId: Number)
Get information about the context of this Photo in a given Photoset
private function _addSize(size: PhotoSize):Void
Private internal function - adds a PhotoSize object to this Photo.
function getSizes():Array
Get’s information about the available PhotoSizes for this Photo (assuming Flashr.photosGetSizes has been called - otherwise returns an empty Array).
function photosGetSizes (photoId: String):FlashrRequest
Calls flickr.photos.getRecent to get the available sizes for a photo.
function getLargestAvailableSize(maxDimension: Number):PhotoSize
Use to get the biggest available version of this Photo.
private function _destroy()
Private function to remove this Photo object from the _photos Array so that it can’t be used again.
public static function getPhoto(photoId: String):Photo
Get’s a Photo object for the given photo ID.
function photosLicensesGetInfo():FlashrRequest
Fetches a list of availabale photo licenses for Flickr
function photosGetInfo (photoId: String,
secret: String):FlashrRequest
Calls flickr.photos.getInfo to get information about a Photo.
function photosetsGetContext(photoId: String,
photosetId: String):FlashrRequest
Returns next and previous photos for a photo in a set.
function groupsPoolsGetContext(photoId: String,
groupId: String):FlashrRequest
Gets next and previous photos for a photo in a group pool.
function photosGetAllContexts(photoId: String):FlashrRequest
Returns all visble sets and pools the photo belongs to.
function photosetsAddPhoto(photosetId: String,
photoId: String):FlashrRequest
Add a photo to the end of an existing photoset.
function photosetsEditPhotos(photosetId: String,
primaryPhotoId: Number,
photoIds: Array):FlashrRequest
Modify the photos in a photoset.
private function _addPhoto(photo: Photo)
Private internal function - adds a Photo to the end of this Photoset’s _photos array and updates numPhotos Called internally on a successful response from flickr.photosets.addPhoto.
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).
private function _addPhoto(photo: Photo)
Private internal function - adds a Photo to this Groups _pool.
Class to describe ExifData for a Photo as returned by Flickr.
function photosGetExif (photoId: String,
secret: String):FlashrRequest
Calls flickr.photos.getExif to return a list of EXIF/TIFF/GPS tags for a given Photo.
function photosCommentsGetList (photoId: String):FlashrRequest
Calls flickr.photos.comments.getList to get the comments for a photo.
function photosCommentsAddComment(photoId: String,
comment: String):FlashrRequest
Calls flickr.photos.comments.addComment to add a comment to a photo as the currently authenticated user (authUser).
function photosNotesAdd(photoId: String,
noteX: Number,
noteY: Number,
noteW: Number,
noteH: Number,
noteText: String)
Add a Note to a Photo.
function photosNotesDelete(noteId: String)
Delete a Note from a Photo.
function photosRemoveTag (tagId: Number):FlashrRequest
Calls flickr.photos.removeTag to remove a tag from a photo.
function photosAddTags (photoId: String,
tags: String):FlashrRequest
Calls flickr.photos.addTags to add tags to a given photo.
function photosDelete (photoId: String):FlashrRequest
Calls flickr.photos.addTags to delete a photo from flickr.