function __construct($server, $client_id, $client_secret, $token) { $this->clientId = $client_id; $this->clientSecret = $client_secret; $this->token = $token; $client = new Client(array('base_url' => $server, 'defaults' => array('exceptions' => false))); $options = array('headers' => array('Content-Type' => 'application/json', 'Authorization' => "Bearer {$token}", 'trakt-api-key' => "{$client_id}", 'trakt-api-version' => '2')); parent::__construct($client, $options); }
function __construct($server, $token) { $client = new Client(array('base_url' => $server, 'defaults' => array('exceptions' => false))); $options = array('headers' => array('Content-Type' => 'application/json', 'Access-Token' => $token)); parent::__construct($client, $options); }