Class: FlickrSource

FlickrSource

A potential source of photos from flickr


new FlickrSource(useKey, photosKey, type, desc, isDaily, isArray [, loadArg])

Create a new photo source

Parameters:
Name Type Argument Default Description
useKey string

The key for if the source is selected

photosKey string

The key for the collection of photos

type string

A descriptor of the photo source

desc string

A human readable description of the source

isDaily boolean

Should the source be updated daily

isArray boolean

Is the source an Array of photo Arrays

loadArg Object <optional>
<nullable>
null

optional arg for load function

Source:

Members


<private, static, constant> _KEY :string

Flickr rest API authorization key

Type:
  • string
Source:

<private, static, constant> _MAX_PHOTOS :int

Max photos to return

Type:
  • int
Default Value:
  • 250
Source:

<private, static, constant> _URL_BASE :string

Flickr rest API

Type:
  • string
Default Value:
  • https://api.flickr.com/services/rest/
Source:

Methods


<private, static> _processPhotos(response) → {Promise.<Array.<app.PhotoSource.Photo>>}

Extract the photos into an Array

Parameters:
Name Type Description
response JSON

server response

Source:
Returns:

Array of photos

Type
Promise.<Array.<app.PhotoSource.Photo>>

fetchPhotos() → {Promise.<Array.<app.PhotoSource.Photo>>}

Fetch the photos for this source

Source:
Returns:

Array of photos

Type
Promise.<Array.<app.PhotoSource.Photo>>