You are here

function flickr_photos_search in Flickr 6

Same name and namespace in other branches
  1. 5 flickr.inc \flickr_photos_search()
  2. 7 flickr.api.inc \flickr_photos_search()

Parameters

$nsid: nsid of the user whose photoset tags will be returned

$page: page of results to return

Return value

response from the flickr method flickr.photos.search (http://www.flickr.com/services/api/flickr.photos.search.html)

5 calls to flickr_photos_search()
flickr_photos in ./flickr.module
flickr_tags_photos in tags/flickr_tags.module
_flickr_block_random in block/flickr_block.module
_flickr_block_recent in block/flickr_block.module
_flickr_block_tag_random in block/flickr_block.module
Random by tag block.

File

./flickr.api.inc, line 54

Code

function flickr_photos_search($nsid, $page = 1, $other_args = array()) {
  $args = array(
    'user_id' => $nsid,
    'page' => $page,
  );

  // Set per_page to flickr module default if it is not specified in
  // $other_args.
  if (!isset($other_args['per_page'])) {
    $args['per_page'] = variable_get('flickr_photos_per_page', 20);
  }
  $response = flickr_request('flickr.photos.search', array_merge($args, $other_args));
  if ($response) {
    return $response['photos'];
  }
  return FALSE;
}