[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Service/ -> Flickr.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
Version: $Id$
File Size: 629 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Zend_Service_Flickr:: (14 methods):
  __construct()
  tagSearch()
  userSearch()
  groupPoolGetPhotos()
  getIdByUsername()
  getIdByEmail()
  getImageDetails()
  getRestClient()
  _validateUserSearch()
  _validateTagSearch()
  _validateGroupPoolGetPhotos()
  _checkErrors()
  _prepareOptions()
  _compareOptions()


Class: Zend_Service_Flickr  - X-Ref


__construct($apiKey)   X-Ref
Performs object initializations

# Sets up character encoding
# Saves the API key

param: string $apiKey Your Flickr API key
return: void

tagSearch($query, array $options = array()   X-Ref
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.

param: string|array $query   A single tag or an array of tags.
param: array        $options Additional parameters to refine your query.
return: Zend_Service_Flickr_ResultSet

userSearch($query, array $options = null)   X-Ref
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.

param: string $query   username or email
param: array  $options Additional parameters to refine your query.
return: Zend_Service_Flickr_ResultSet

groupPoolGetPhotos($query, array $options = array()   X-Ref
Finds photos in a group's pool.

param: string $query   group id
param: array  $options Additional parameters to refine your query.
return: Zend_Service_Flickr_ResultSet

getIdByUsername($username)   X-Ref
Utility function to find Flickr User IDs for usernames.

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

param: string $username the username
return: string the NSID (userid)

getIdByEmail($email)   X-Ref
Utility function to find Flickr User IDs for emails.

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

param: string $email the email
return: string the NSID (userid)

getImageDetails($id)   X-Ref
Returns Flickr photo details by for the given photo ID

param: string $id the NSID
return: array of Zend_Service_Flickr_Image, details for the specified image

getRestClient()   X-Ref
Returns a reference to the REST client, instantiating it if necessary

return: Zend_Rest_Client

_validateUserSearch(array $options)   X-Ref
Validate User Search Options

param: array $options
return: void

_validateTagSearch(array $options)   X-Ref
Validate Tag Search Options

param: array $options
return: void

_validateGroupPoolGetPhotos(array $options)   X-Ref
Validate Group Search Options

param: array $options
return: void

_checkErrors(DOMDocument $dom)   X-Ref
Throws an exception if and only if the response status indicates a failure

param: DOMDocument $dom
return: void

_prepareOptions($method, array $options, array $defaultOptions)   X-Ref
Prepare options for the request

param: string $method         Flickr Method to call
param: array  $options        User Options
param: array  $defaultOptions Default Options
return: array Merged array of user and default/required options

_compareOptions(array $options, array $validOptions)   X-Ref
Throws an exception if and only if any user options are invalid

param: array $options      User options
param: array $validOptions Valid options
return: void



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1