Class: SSPhoto

SSPhoto

A photo for the screen saver


new SSPhoto(id, source, sourceType)

Create a new photo

Parameters:
Name Type Description
id int

unique id

source app.PhotoSource.Photo

source photo

sourceType string

type of app.PhotoSource

Properties:
Name Type Description
_id int

Unique id

_url string

The url to the photo

_photographer string

The photographer

_type string

type of app.PhotoSource

_aspectRatio number

aspect ratio

_ex Object

additional information about the photo

_point string

geolocation 'lat lon'

_isBad boolean

true if url didn't load

Source:

Methods


getAspectRatio() → {number}

Get photo aspect ratio

Source:
Returns:

aspect ratio

Type
number

getId() → {int}

Get unique id

Source:
Returns:

id

Type
int

getPhotographer() → {string}

Get photographer

Source:
Returns:

photographer

Type
string

getPoint() → {string}

Get geo location point

Source:
Returns:

point

Type
string

getType() → {string}

Get photo source type

Source:
Returns:

type

Type
string

getUrl() → {string}

Get photo url

Source:
Returns:

url

Type
string

isBad() → {boolean}

Is photo bad

Source:
Returns:

true if bad

Type
boolean

markBad()

Mark photo unusable

Source:

setId(id)

Set unique id

Parameters:
Name Type Description
id int

unique id

Source:

showSource()

Create a new tab with a link to the original source of the photo, if possible

Source: