public static function clients_connection_flickr::call in Web Service Clients 7
Executes call and processes data
Overrides clients_connection_base::call
1 call to clients_connection_flickr::call()
- clients_flickr_clients_call in backends/
clients_flickr/ clients_flickr.module - Implementation of hook_clients_call
File
- backends/
clients_flickr/ clients_flickr.inc, line 83 - Defines Flickr services and calls
Class
Code
public static function call($serviceConfig, $serviceOptions) {
if ($serviceOptions->configuration['options']['method'] == 'flickr.photos.search') {
// gets raw result
$cache_id = md5($serviceConfig->name . implode($serviceOptions->configuration['options']));
$fetch_url = $serviceConfig->endpoint . '?method=' . $serviceOptions->configuration['options']['method'] . '&api_key=' . $serviceConfig->configuration['api_key'] . '&text=' . $serviceOptions->configuration['options']['text'] . '&page=' . $serviceOptions->configuration['options']['page'] . '&per_page=' . $serviceOptions->configuration['options']['per_page'];
// etc http://www.flickr.com/services/api/flickr.photos.search.html
$result = parent::doCall('rest', $cache_id, $fetch_url);
return $result;
}
// else method not supported yet
}