com. kelvinluck. flickr. Photoset

Describes a Photoset on flickr.com

Author

Kelvin Luck

Summary
Describes a Photoset on flickr.com
The id of this Photoset
The Person who owns this Photoset
The URL to this Photoset on flickr.com
The primary Photo for this Photoset
The total number of Photos in this Photoset
The title of this Photoset
The description of this Photoset
A private static Object containing Photoset objects.
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.
Replaces this photoset’s photos array with one made up from the passed photoIds.
Clears this photoset’s photos array.
Get’s this Photosets photos
Get’s a Photoset object for the given photoset ID.

id

var id: Number

The id of this Photoset

owner

var owner: Person

The Person who owns this Photoset

url

var url: String

The URL to this Photoset on flickr.com

primaryPhoto

var primaryPhoto: Photo

The primary Photo for this Photoset

numPhotos

var numPhotos: Number

The total number of Photos in this Photoset

photos

private var photos: Array
An array of <Photo>sall of the photos in this Photoset TODO: Should this be done through a getter and if it is empty then photosetsGetPhotos is automatically called?

title

var title: String

The title of this Photoset

description

var description: String

The description of this Photoset

_photosets

private static var _photosets: Object

A private static Object containing Photoset objects.  Used by getPhotoset to insure that only one Photoset is created for each photoset ID returned from flickr.com

Photoset

private function Photoset(id: Number)
Constructordo not call directly, is accessed via Photoset.getPhotoset

addPhoto

function addPhoto(photo: Photo)

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.

Parameters

photoThe photo to add.

removePhoto

function removePhoto(photo: Photo)
Removes a <Photo> from this <Photoset>called as a result of a call to Flickr.photosetsRemovePhoto

Parameters

photoThe Photo to remove from this Photoset

See Also

Flickr.photosetsRemovePhoto

editPhotos

function editPhotos(primaryPhoto: Photo,
photoIds: Array)

Replaces this photoset’s photos array with one made up from the passed photoIds.  Called when there is a response from flickr.com to flickr.photosets.editPhotos

Parameters

primaryPhotoThe primary Photo for this set.
photoIdsAn array of the ids of Photos in this set.

See Also

Flickr.photosetsEditPhotos

clearPhotos

function clearPhotos()

Clears this photoset’s photos array.  Used when the photo list is loaded completely e.g. from Flickr.photosetsGetPhotos

getPhotos

function getPhotos():Array

Get’s this Photosets photos

Returns

The photos for this Photoset

getPhotoset

public static function getPhotoset(id: Number):Photoset

Get’s a Photoset object for the given photoset ID.

Consults _photosets to make sure that only one Photoset instance is created for each photoset ID from flickr.com

Parameters

idThe id of the Photoset you want to get

remove

static function remove(photoset: Photoset):Void
Removes a given photosetcalled when a photoset is deleted through Flickr.photosetsDelete.

Parameters

photosetThe photoset you want to remove

toString

public function toString():String
var id: Number
The id of this Photoset
private function Photoset(id: Number)
var owner: Person
The Person who owns this Photoset
Class to describe a person from Flickr.
var url: String
The URL to this Photoset on flickr.com
var primaryPhoto: Photo
The primary Photo for this Photoset
Class to describe a photo from Flickr.
var numPhotos: Number
The total number of Photos in this Photoset
private var photos: Array
var title: String
The title of this Photoset
var description: String
The description of this Photoset
private static var _photosets: Object
A private static Object containing Photoset objects.
function addPhoto(photo: Photo)
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 removePhoto(photo: Photo)
function editPhotos(primaryPhoto: Photo,
photoIds: Array)
Replaces this photoset’s photos array with one made up from the passed photoIds.
function clearPhotos()
Clears this photoset’s photos array.
function getPhotos():Array
Get’s this Photosets photos
public static function getPhotoset(id: Number):Photoset
Get’s a Photoset object for the given photoset ID.
static function remove(photoset: Photoset):Void
public function toString():String
function photosetsRemovePhoto(photosetId: Number,
photoId: Number)
Remove a photo from a photoset.
function photosetsEditPhotos(photosetId: Number,
primaryPhotoId: Number,
photoIds: Array)
Modify the photos in a photoset.
function photosetsGetPhotos(photosetId: Number)
Get the list of photos in a set.
function photosetsDelete(photosetId: Number)
Delete a photoset.