You are here

public function AcquiaLiftAPI::getCampaigns in Acquia Lift Connector 7.2

1 call to AcquiaLiftAPI::getCampaigns()
AcquiaLiftAPI::getExistingAgentNames in includes/AcquiaLiftAPI.inc
Retrieves a list of existing campaigns..

File

includes/AcquiaLiftAPI.inc, line 298

Class

AcquiaLiftAPI

Code

public function getCampaigns() {
  $url = $this
    ->generateEndpoint("campaigns");
  $fail_msg = 'Could not retrieve agents from Lift';
  $response = $this
    ->makeGetRequest($url, array(), $fail_msg);
  if (empty($response) || isset($response['error'])) {
    return array();
  }
  return $response;
}