public function Instagram::call in Drupagram 6
Same name and namespace in other branches
- 7 drupagram.lib.php \Instagram::call()
Method for calling any drupagram api resource
1 call to Instagram::call()
- Instagram::fetch in ./
drupagram.lib.php - Get an array of Instagram objects from an API endpoint
File
- ./
drupagram.lib.php, line 358 - Classes to implement the full Instagram API
Class
- Primary Instagram API implementation class Supports the full REST API for drupagram.
Code
public function call($path, $params = array(), $method = 'GET', $use_auth = FALSE) {
$url = $this
->create_url($path, '');
try {
if ($use_auth) {
$response = $this
->auth_request($url, $params, $method);
}
else {
$response = $this
->request($url, $params, $method);
}
} catch (InstagramException $e) {
watchdog('drupagram', '!message', array(
'!message' => $e
->__toString(),
), WATCHDOG_ERROR);
return FALSE;
}
if (!$response) {
return FALSE;
}
return $this
->parse_response($response);
}