public function __construct($api_key = null) { parent::__construct($api_key); $this->method = str_replace('\\', '.', strtolower(get_class())); }
public function __construct($config) { parent::setVariables($config); if (!is_array($config['tags'])) { $config['tags'] = explode(',', $config['tags']); } $maintag = $config['tags'][0]; $config['tags'] = implode(',', $config['tags']); $this->setURL(sprintf('http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=%s&tags=%s&sort=%s&per_page=%d&extras=owner_name,path_alias', $config['key'], $config['tags'], $this->sort, $config['total'])); $this->setURLTemplate('http://www.flickr.com/photos/tags/' . $maintag . '/'); parent::__construct($config); }