You are here

function flickr_photos_search in Flickr 5

Same name and namespace in other branches
  1. 6 flickr.api.inc \flickr_photos_search()
  2. 7 flickr.api.inc \flickr_photos_search()
4 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

File

./flickr.inc, line 477

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;
}