category Zend
package Zend_Service
subpackage Flickr
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Performs object initializations

__construct(string $apiKey) : void

Sets up character encoding

Saves the API key

Parameters

$apiKey

string

Your Flickr API key

Utility function to find Flickr User IDs for emails.

getIdByEmail(string $email) : string

(You can only find a user's photo with their NSID.)

Parameters

$email

string

the email

Exceptions

\Zend_Service_Exception

Returns

stringthe NSID (userid)

Utility function to find Flickr User IDs for usernames.

getIdByUsername(string $username) : string

(You can only find a user's photo with their NSID.)

Parameters

$username

string

the username

Exceptions

\Zend_Service_Exception

Returns

stringthe NSID (userid)

Returns Flickr photo details by for the given photo ID

getImageDetails(string $id) : array

Parameters

$id

string

the NSID

Exceptions

\Zend_Service_Exception

Returns

arrayof Zend_Service_Flickr_Image, details for the specified image

Returns a reference to the REST client, instantiating it if necessary

getRestClient() : \Zend_Rest_Client

Returns

\Zend_Rest_Client

Finds photos in a group's pool.

groupPoolGetPhotos(string $query, array $options = array()) : \Zend_Service_Flickr_ResultSet

Parameters

$query

string

group id

$options

array

Additional parameters to refine your query.

Exceptions

\Zend_Service_Exception

Returns

\Zend_Service_Flickr_ResultSet

Find Flickr photos by tag.

tagSearch(string|array $query, array $options = array()) : \Zend_Service_Flickr_ResultSet

Query options include:

per_page: how many results to return per query

page: the starting page offset. first result will be (page - 1) * per_page + 1

tag_mode: Either 'any' for an OR combination of tags,

                or 'all' for an AND combination. Default is 'any'.

min_upload_date: Minimum upload date to search on. Date should be a unix timestamp.

max_upload_date: Maximum upload date to search on. Date should be a unix timestamp.

min_taken_date: Minimum upload date to search on. Date should be a MySQL datetime.

max_taken_date: Maximum upload date to search on. Date should be a MySQL datetime.

Parameters

$query

stringarray

A single tag or an array of tags.

$options

array

Additional parameters to refine your query.

Exceptions

\Zend_Service_Exception

Returns

\Zend_Service_Flickr_ResultSet

Finds photos by a user's username or email.

userSearch(string $query, array $options = null) : \Zend_Service_Flickr_ResultSet

Additional query options include:

per_page: how many results to return per query

page: the starting page offset. first result will be (page - 1) * per_page + 1

min_upload_date: Minimum upload date to search on. Date should be a unix timestamp.

max_upload_date: Maximum upload date to search on. Date should be a unix timestamp.

min_taken_date: Minimum upload date to search on. Date should be a MySQL datetime.

max_taken_date: Maximum upload date to search on. Date should be a MySQL datetime.

Parameters

$query

string

username or email

$options

array

Additional parameters to refine your query.

Exceptions

\Zend_Service_Exception

Returns

\Zend_Service_Flickr_ResultSet

Throws an exception if and only if the response status indicates a failure

_checkErrors(\DOMDocument $dom) : void
Static

Parameters

$dom

\DOMDocument

Exceptions

\Zend_Service_Exception

Throws an exception if and only if any user options are invalid

_compareOptions(array $options, array $validOptions) : void

Parameters

$options

array

User options

$validOptions

array

Valid options

Exceptions

\Zend_Service_Exception

Prepare options for the request

_prepareOptions(string $method, array $options, array $defaultOptions) : array

Parameters

$method

string

Flickr Method to call

$options

array

User Options

$defaultOptions

array

Default Options

Returns

arrayMerged array of user and default/required options

Validate Group Search Options

_validateGroupPoolGetPhotos(array $options) : void

Parameters

$options

array

Exceptions

\Zend_Service_Exception

Validate Tag Search Options

_validateTagSearch(array $options) : void

Parameters

$options

array

Exceptions

\Zend_Service_Exception

Validate User Search Options

_validateUserSearch(array $options) : void

Parameters

$options

array

Exceptions

\Zend_Service_Exception

 Properties

 

Your Flickr API key

$apiKey : string

Default

 

Reference to REST client object

$_restClient : \Zend_Rest_Client

Default

null

 Constants

 

Base URI for the REST client

URI_BASE = 'https://www.flickr.com'