/** * Constructor. * @param $client_id string The client id that the people belong to * @param $auth_details array Authentication details to use for API calls. * This array must take one of the following forms: * If using OAuth to authenticate: * array( * 'access_token' => 'your access token', * 'refresh_token' => 'your refresh token') * * Or if using an API key: * array('api_key' => 'your api key') * @param $protocol string The protocol to use for requests (http|https) * @param $debug_level int The level of debugging required CS_REST_LOG_NONE | CS_REST_LOG_ERROR | CS_REST_LOG_WARNING | CS_REST_LOG_VERBOSE * @param $host string The host to send API requests to. There is no need to change this * @param $log CS_REST_Log The logger to use. Used for dependency injection * @param $serialiser The serialiser to use. Used for dependency injection * @param $transport The transport to use. Used for dependency injection * @access public */ function __construct($client_id, $auth_details, $protocol = 'https', $debug_level = CS_REST_LOG_NONE, $host = 'api.createsend.com', $log = NULL, $serialiser = NULL, $transport = NULL) { parent::__construct($auth_details, $protocol, $debug_level, $host, $log, $serialiser, $transport); $this->set_client_id($client_id); }
/** * Constructor. * @param $auth_details array Authentication details to use for API calls. * This array must take one of the following forms: * If using OAuth to authenticate: * array( * 'access_token' => 'your access token', * 'refresh_token' => 'your refresh token') * * Or if using an API key: * array('api_key' => 'your api key') * @param $protocol string The protocol to use for requests (http|https) * @param $debug_level int The level of debugging required CS_REST_LOG_NONE | CS_REST_LOG_ERROR | CS_REST_LOG_WARNING | CS_REST_LOG_VERBOSE * @param $host string The host to send API requests to. There is no need to change this * @param $log CS_REST_Log The logger to use. Used for dependency injection * @param $serialiser The serialiser to use. Used for dependency injection * @param $transport The transport to use. Used for dependency injection * @access public */ function __construct($auth_details, $protocol = 'https', $debug_level = CS_REST_LOG_NONE, $host = 'api.createsend.com', $log = NULL, $serialiser = NULL, $transport = NULL) { parent::__construct($auth_details, $protocol, $debug_level, $host, $log, $serialiser, $transport); $this->_admins_base_route = $this->_base_route . 'admins'; }