public function AcquiaLiftAPI::getAgent in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 includes/acquia_lift.classes.inc \AcquiaLiftAPI::getAgent()
Returns the campaign with the provided name if it exists, FALSE otherwise.
File
- includes/
AcquiaLiftAPI.inc, line 311
Class
Code
public function getAgent($agent_name) {
$url = $this
->generateEndpoint("campaigns/{$agent_name}");
$fail_msg = 'Could not retrieve the specified agent from Lift';
$response = $this
->makeGetRequest($url, array(), $fail_msg);
if (!empty($response)) {
return $response;
}
return FALSE;
}