com. kelvinluck. flickr. PhotoClass 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. Currently very bare bones - this class will be expanded as I program the interaction with the flickr.photos.* Flikr API calls Version0.1.0 AuthorKelvin Luck < kelvin at kelvinluck dot com > Summary
owner
A reference to the Person who owns this photo. contextPhotoPrevious
The previous photo in this context (as returned by Flickr.photosGetContext) contextPhotoNext
The next photo in this context (as returned by Flickr.photosGetContext) exifData
The EXIF/TIFF/GPS tags associated with this photo. It is an Array of ExifData objects. _photos
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 getNotes
Returns an object containing all the note’s that have been left on this Photo ReturnsAll the Note’s that have been left on this Photo See Also<_notes> getTags
Returns an object containing all the tags’s that are associated with this Photo. ReturnsAll the Tag’s that are associated with this Photo. Each Tag is associated with
See AlsoaddTag
Adds a Tag object to this Photo and associates it with a Person who is the Person who associated that Tag with this Photo. Parameters
See AlsosetTags
Set’s this Photo’s _tags... Parameters
TODODoesn’t deal properly with tags with spaces in the name now :( Also need to get the Person object for the logged in user so we can correctly associate the author with the tag... 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... getPhoto
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
|
This photo’s id.
public var id: Number
A reference to the Person who owns this photo.
public var owner: Person
This photo’s secret.
public var secret: String
This photo’s server.
public var server: Number
This photo’s title.
public var title: String
This photo’s description.
public var description: String
The number of comments this photo has.
public var numComments: Number
The Tags that are associated with this photo.
var _tags: Object
The PhotoSizes that are associated with this photo.
private var _sizes: Array
Whether or not this photo is public.
public var isPublic: Boolean
Whether or not this photo is by a friend.
public var isFriend: Boolean
Whether or not this photo is by a family member.
public var isFamily: Boolean
public var licence: Number
public var rotation: Number
The URL for this photo within some sort of context e.g.
public var contextUrl: String
The URL for this photo’s thumbnail image within some sort of context e.g.
public var contextThumbUrl: String
The previous photo in this context (as returned by Flickr.photosGetContext)
public var contextPhotoPrevious: Photo
Calls flickr.photos.getContext to return next and previous photos for a photo in a photostream.
function photosGetContext ( photoId: Number )
The next photo in this context (as returned by Flickr.photosGetContext)
public var contextPhotoNext: Photo
Not documented on flickr.com but maybe the number of photos in this context?
public var contextCount: Number
The EXIF/TIFF/GPS tags associated with this photo.
public var exifData: Array
A private static Object containing Photo objects.
private static var _photos: Object
private function Photo( id: Number )
Returns an object containing all the note’s that have been left on this Photo
function getNotes():Object
Adds a Note object to this Photo.
function addNote( note: Note ):Void
Returns an object containing all the tags’s that are associated with this Photo.
function getTags():Object
Adds a Tag object to this Photo and associates it with a Person who is the Person who associated that Tag with this Photo.
function addTag( id: Number, tag: Tag, author: Person ):Void
Set’s this Photo’s _tags...
function setTags( tags: String )
Adds a PhotoSize object to this Photo.
function addSize( size: PhotoSize ):Void
Get’s a Photo object for the given photo ID.
public static function getPhoto( photoId: Number ):Photo
Calls flickr.photos.getInfo to get information about a photo..
function photosGetInfo ( photoId: Number, secret: Number )
Calls flickr.photos.removeTag to remove a tag from a photo.
function photosRemoveTag ( tagId: Number )