|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($apiKey) | |
| tagSearch ($query, array $options=array()) | |
| userSearch ($query, array $options=null) | |
| groupPoolGetPhotos ($query, array $options=array()) | |
| getIdByUsername ($username) | |
| getIdByEmail ($email) | |
| getImageDetails ($id) | |
| getRestClient () | |
Data Fields | |
| const | URI_BASE = 'http://www.flickr.com' |
| $apiKey | |
Protected Member Functions | |
| _validateUserSearch (array $options) | |
| _validateTagSearch (array $options) | |
| _validateGroupPoolGetPhotos (array $options) | |
| _prepareOptions ($method, array $options, array $defaultOptions) | |
| _compareOptions (array $options, array $validOptions) | |
Static Protected Member Functions | |
| static | _checkErrors (DOMDocument $dom) |
Protected Attributes | |
| $_restClient = null | |
Definition at line 32 of file Flickr.php.
| __construct | ( | $ | apiKey | ) |
Performs object initializations
# Sets up character encoding # Saves the API key
| string | $apiKey | Your Flickr API key |
Definition at line 63 of file Flickr.php.
| static _checkErrors | ( | DOMDocument $ | dom | ) | [static, protected] |
Throws an exception if and only if the response status indicates a failure
| DOMDocument | $dom |
| Zend_Service_Exception |
Definition at line 577 of file Flickr.php.

| _compareOptions | ( | array $ | options, |
| array $ | validOptions | ||
| ) | [protected] |
Throws an exception if and only if any user options are invalid
| array | $options | User options |
| array | $validOptions | Valid options |
| Zend_Service_Exception |
Definition at line 617 of file Flickr.php.

| _prepareOptions | ( | $ | method, |
| array $ | options, | ||
| array $ | defaultOptions | ||
| ) | [protected] |
Prepare options for the request
| string | $method | Flickr Method to call |
| array | $options | User Options |
| array | $defaultOptions | Default Options |
Definition at line 600 of file Flickr.php.

| _validateGroupPoolGetPhotos | ( | array $ | options | ) | [protected] |
Validate Group Search Options
| array | $options |
| Zend_Service_Exception |
Definition at line 523 of file Flickr.php.


| _validateTagSearch | ( | array $ | options | ) | [protected] |
Validate Tag Search Options
| array | $options |
| Zend_Service_Exception |
Definition at line 464 of file Flickr.php.


| _validateUserSearch | ( | array $ | options | ) | [protected] |
Validate User Search Options
| array | $options |
| Zend_Service_Exception |
Definition at line 410 of file Flickr.php.


| getIdByEmail | ( | $ | ) |
Utility function to find Flickr User IDs for emails.
(You can only find a user's photo with their NSID.)
| string | the email |
| Zend_Service_Exception |
Definition at line 306 of file Flickr.php.


| getIdByUsername | ( | $ | username | ) |
Utility function to find Flickr User IDs for usernames.
(You can only find a user's photo with their NSID.)
| string | $username | the username |
| Zend_Service_Exception |
Definition at line 262 of file Flickr.php.


| getImageDetails | ( | $ | id | ) |
Returns Flickr photo details by for the given photo ID
| string | $id | the NSID |
| Zend_Service_Exception |
Definition at line 348 of file Flickr.php.

| getRestClient | ( | ) |
Returns a reference to the REST client, instantiating it if necessary
Definition at line 389 of file Flickr.php.

| groupPoolGetPhotos | ( | $ | query, |
| array $ | options = array() |
||
| ) |
Finds photos in a group's pool.
| string | $query | group id |
| array | $options | Additional parameters to refine your query. |
| Zend_Service_Exception |
Definition at line 204 of file Flickr.php.

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.
| string | array | $query | A single tag or an array of tags. |
| array | $options | Additional parameters to refine your query. |
| Zend_Service_Exception |
Definition at line 92 of file Flickr.php.

| userSearch | ( | $ | query, |
| array $ | options = null |
||
| ) |
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.
| string | $query | username or email |
| array | $options | Additional parameters to refine your query. |
| Zend_Service_Exception |
Definition at line 150 of file Flickr.php.

$_restClient = null [protected] |
Definition at line 51 of file Flickr.php.
| $apiKey |
Definition at line 44 of file Flickr.php.
| const URI_BASE = 'http://www.flickr.com' |
Base URI for the REST client
Definition at line 37 of file Flickr.php.