Service/Flickr.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service
- Subpackage
- Flickr
- Version
- $Id$
Package: Zend_Service\Flickr- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants


URI_BASE
= 'http://www.flickr.com'Base URI for the REST client
Properties
Methods



__construct(string $apiKey) : voidPerforms object initializations
# Sets up character encoding
# Saves the API key
Parameters| Name | Type | Description |
|---|
| $apiKey | string | Your Flickr API key |
|---|



_compareOptions(array $options, array $validOptions) : voidThrows an exception if and only if any user options are invalid
Parameters| Name | Type | Description |
|---|
| $options | array | User options |
|---|
| $validOptions | array | Valid options |
|---|
Throws 


_prepareOptions(string $method, array $options, array $defaultOptions) : arrayPrepare options for the request
Parameters| Name | Type | Description |
|---|
| $method | string | Flickr Method to call |
|---|
| $options | array | User Options |
|---|
| $defaultOptions | array | Default Options |
|---|
Returns| Type | Description |
|---|
| array | Merged array of user and default/required options |



_validateGroupPoolGetPhotos(array $options) : voidValidate Group Search Options
Parameters| Name | Type | Description |
|---|
| $options | array | |
|---|
Throws 


_validateTagSearch(array $options) : voidValidate Tag Search Options
Parameters| Name | Type | Description |
|---|
| $options | array | |
|---|
Throws 


_validateUserSearch(array $options) : voidValidate User Search Options
Parameters| Name | Type | Description |
|---|
| $options | array | |
|---|
Throws 


getIdByEmail(string $email) : stringUtility function to find Flickr User IDs for emails.
(You can only find a user's photo with their NSID.)
Parameters| Name | Type | Description |
|---|
| $email | string | the email |
|---|
Returns| Type | Description |
|---|
| string | the NSID (userid) |
Throws


getIdByUsername(string $username) : stringUtility function to find Flickr User IDs for usernames.
(You can only find a user's photo with their NSID.)
Parameters| Name | Type | Description |
|---|
| $username | string | the username |
|---|
Returns| Type | Description |
|---|
| string | the NSID (userid) |
Throws


getImageDetails(string $id) : arrayReturns Flickr photo details by for the given photo ID
Parameters| Name | Type | Description |
|---|
| $id | string | the NSID |
|---|
Returns| Type | Description |
|---|
| array | of Zend_Service_Flickr_Image, details for the specified image |
Throws 


groupPoolGetPhotos(string $query, array $options = array()) : \Zend_Service_Flickr_ResultSetFinds photos in a group's pool.
Parameters| Name | Type | Description |
|---|
| $query | string | group id |
|---|
| $options | array | Additional parameters to refine your query. |
|---|
ReturnsThrows 


tagSearch(string | array $query, array $options = array()) : \Zend_Service_Flickr_ResultSetFind 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.
Parameters| Name | Type | Description |
|---|
| $query | string | array | A single tag or an array of tags. |
|---|
| $options | array | Additional parameters to refine your query. |
|---|
ReturnsThrows


userSearch(string $query, array $options = null) : \Zend_Service_Flickr_ResultSetFinds 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.
Parameters| Name | Type | Description |
|---|
| $query | string | username or email |
|---|
| $options | array | Additional parameters to refine your query. |
|---|
ReturnsThrows