Class Zend_Service_Flickr

Description
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Service/Flickr.php (line 32)


	
			
Class Constant Summary
 URI_BASE = 'http://www.flickr.com'
Variable Summary
Method Summary
 static void _checkErrors ( $dom)
 void __construct (string $apiKey)
 string getIdByEmail (string $email)
 string getIdByUsername (string $username)
 array getImageDetails (string $id)
 Zend_Service_Flickr_ResultSet tagSearch (string|array $query, [ $options = array()])
 Zend_Service_Flickr_ResultSet userSearch (string $query, [ $options = null])
 void _compareOptions ( $options,  $validOptions)
 array _prepareOptions (string $method,  $options,  $defaultOptions)
 void _validateTagSearch ( $options)
 void _validateUserSearch ( $options)
Variables
string $apiKey (line 44)

Your Flickr API key

  • access: public
Zend_Rest_Client $_restClient = null (line 51)

Reference to REST client object

  • access: protected
Methods
static _checkErrors (line 464)

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

  • throws: Zend_Service_Exception
  • access: protected
static void _checkErrors ( $dom)
  • DOMDocument $dom
Constructor __construct (line 63)

Performs object initializations

  • Sets up character encoding
  • Saves the API key

  • access: public
void __construct (string $apiKey)
  • string $apiKey: Your Flickr API key
getIdByEmail (line 249)

Utility function to find Flickr User IDs for emails.

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

  • return: the NSID (userid)
  • throws: Zend_Service_Exception
  • access: public
string getIdByEmail (string $email)
  • string $email: the email
getIdByUsername (line 205)

Utility function to find Flickr User IDs for usernames.

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

  • return: the NSID (userid)
  • throws: Zend_Service_Exception
  • access: public
string getIdByUsername (string $username)
  • string $username: the username
getImageDetails (line 291)

Returns Flickr photo details by for the given photo ID

  • return: of Zend_Service_Flickr_Image, details for the specified image
  • throws: Zend_Service_Exception
  • access: public
array getImageDetails (string $id)
  • string $id: the NSID
getRestClient (line 332)

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

  • access: public
Zend_Rest_Client getRestClient ()
tagSearch (line 91)

Find Flickr photos by tag.

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.

  • access: public
Zend_Service_Flickr_ResultSet tagSearch (string|array $query, [ $options = array()])
  • string|array $query: A single tag or an array of tags.
  • array $options: Additional parameters to refine your query.
userSearch (line 149)

Finds photos by a user's username or email.

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.

  • throws: Zend_Service_Exception
  • access: public
Zend_Service_Flickr_ResultSet userSearch (string $query, [ $options = null])
  • string $query: username or email
  • array $options: Additional parameters to refine your query.
_compareOptions (line 504)

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

  • throws: Zend_Service_Exception
  • access: protected
void _compareOptions ( $options,  $validOptions)
  • array $options: User options
  • array $validOptions: Valid options
_prepareOptions (line 487)

Prepare options for the request

  • return: Merged array of user and default/required options
  • access: protected
array _prepareOptions (string $method,  $options,  $defaultOptions)
  • string $method: Flickr Method to call
  • array $options: User Options
  • array $defaultOptions: Default Options
_validateTagSearch (line 407)

Validate Tag Search Options

  • throws: Zend_Service_Exception
  • access: protected
void _validateTagSearch ( $options)
  • array $options
_validateUserSearch (line 353)

Validate User Search Options

  • throws: Zend_Service_Exception
  • access: protected
void _validateUserSearch ( $options)
  • array $options
Class Constants
URI_BASE = 'http://www.flickr.com' (line 37)

Base URI for the REST client

Documentation generated on Sun, 27 May 2007 23:24:01 -0700 by phpDocumentor 1.3.2