public static function ClientsServicesFlickr::call in Web Service Clients 6
Executes call and processes data
Overrides ClientsServicesBase::call
1 call to ClientsServicesFlickr::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 84 - 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
}