protected function loadFullDetails()
 {
     $interface = new CS_REST_Lists($this->ID, $this->apiKey);
     $result = $interface->get();
     $response = $this->parseResult($result);
     $this->populateFrom($response);
 }
Esempio n. 2
0
 public function get_list($data = array())
 {
     require_once APPPATH . 'vendor/campaignmonitor/csrest_lists.php';
     $auth = array('api_key' => \Config::get('details.api_key'));
     $client_id = \Config::get('details.client_id');
     $list_id = \Config::get('details.list_id');
     $list = new \CS_REST_Lists($list_id, $auth);
     return $list->get();
 }
Esempio n. 3
0
<?php

require_once '../../csrest_lists.php';
$wrap = new CS_REST_Lists('List ID', 'Your API Key');
$result = $wrap->get();
echo "Result of GET /api/v3/lists/{ID}\n<br />";
if ($result->was_successful()) {
    echo "Got list details\n<br /><pre>";
    var_dump($result->response);
} else {
    echo 'Failed with code ' . $result->http_status_code . "\n<br /><pre>";
    var_dump($result->response);
}
echo '</pre>';