com. kelvinluck. flashr. core. PhotoSize

Class to describe the size of a Photo from Flickr.

See Also

Photo, Flashr.photosGetSizes, Photo.getLargestAvailableSize

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: PhotoSize.as 72 2006-09-01 00:33:02Z kluck $

Summary
com. kelvinluck. flashr. core. PhotoSizeClass to describe the size of a Photo from Flickr.
photoThe photo that this PhotoSize is associated with
labelThis photo size’s label.
widthThis Photo’s width.
heightThis Photo’s height.
sourceThis photo size’s source.
urlThis photo size’s url.
maxDimensionThe maximum length of a side of this PhotoSize
orientationWhether this size is PORTRAIT, LANDSCAPE or SQUARE
PORTRAITStatic variable representing portrait pictures
LANDSCAPEStatic variable representing landscape pictures
SQUAREStatic variable representing square pictures
PhotoSizeConstructor function - creates a new PhotoSize object.
getOrientationStringGets a human readable representation of the orientation of this PhotoSize

photo

public var photo: Photo

The photo that this PhotoSize is associated with

label

public var label: String

This photo size’s label.

width

public var width: Number

This Photo’s width.

height

public var height: Number

This Photo’s height.

source

public var source: String

This photo size’s source.

url

public var url: String

This photo size’s url.

maxDimension

public var maxDimension: Number

The maximum length of a side of this PhotoSize

orientation

public var orientation: Number

Whether this size is PORTRAIT, LANDSCAPE or SQUARE

PORTRAIT

public static var PORTRAIT: Number

Static variable representing portrait pictures

See Also

orientation

LANDSCAPE

public static var LANDSCAPE: Number

Static variable representing landscape pictures

See Also

orientation

SQUARE

public static var SQUARE: Number

Static variable representing square pictures

See Also

orientation

PhotoSize

function PhotoSize(photo: Photo,
label: String,
width: Number,
height: Number)

Constructor function - creates a new PhotoSize object.

getOrientationString

function getOrientationString():String

Gets a human readable representation of the orientation of this PhotoSize

Returns

The orientation of this PhotoSize

Class to describe a photo from Flickr.
public var photo: Photo
The photo that this PhotoSize is associated with
public var label: String
This photo size’s label.
public var width: Number
This Photo’s width.
public var height: Number
This Photo’s height.
public var source: String
This photo size’s source.
public var url: String
This photo size’s url.
public var maxDimension: Number
The maximum length of a side of this PhotoSize
function PhotoSize(photo: Photo,
label: String,
width: Number,
height: Number)
Constructor function - creates a new PhotoSize object.
public var orientation: Number
Whether this size is PORTRAIT, LANDSCAPE or SQUARE
public static var PORTRAIT: Number
Static variable representing portrait pictures
public static var LANDSCAPE: Number
Static variable representing landscape pictures
public static var SQUARE: Number
Static variable representing square pictures
function getOrientationString():String
Gets a human readable representation of the orientation of this PhotoSize
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.