Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param string               $email  Access E-mail
  * @param string               $token  Access Token
  * @param ClientInterface|null $client Client Instance
  */
 public function __construct($email, $token, ClientInterface $client = null)
 {
     if (version_compare(ClientInterface::VERSION, '6') === 1) {
         $this->client = $client ?: new Client(['auth' => [$email, $token]]);
     } else {
         $this->client = $client ?: new Client();
         $this->client->setAuth($email, $token);
     }
 }