public function AcquiaLiftAPI::getPointsForAgent in Acquia Lift Connector 7
Gets a list of decision points for the specified agent.
Parameters
$agent_name: The name of the agent.
Return value
bool|mixed An array of point names or FALSE if an error occurs.
File
- includes/
acquia_lift.classes.inc, line 813 - Provides an agent type for Acquia Lift
Class
- AcquiaLiftAPI
- @file Provides an agent type for Acquia Lift
Code
public function getPointsForAgent($agent_name) {
$url = $this
->generateEndpoint("/agent-api/{$agent_name}/points");
$response = $this
->httpClient()
->get($url, array(
'Accept' => 'application/json',
));
if ($response->code == 200) {
return json_decode($response->data, TRUE);
}
else {
$this
->handleBadResponse($response->code, 'Could not retrieve decision points from Acquia Lift', array(), FALSE);
}
return FALSE;
}