public function __construct($config = null) { $this->config = $config ?: Config::getInstance(); if (!$this->config->configured()) { $this->config->configure(['endpoint' => $this->endpoints['api'][$this->config->getEnvironment()], 'auth' => $this->auth]); } }
public function setAccessToken($token) { $this->config->setAppAccessToken($token); $this->config->configure(['endpoint' => $this->endpoints['api'][$this->config->getEnvironment()], 'auth' => $this->auth]); return $this; }