public static function create(HttpClientInterface $httpClient, ConfigInterface $config, FactoryInterface $factory) { if ($config->hasTeam()) { return new QiitaTeamAPIV2($httpClient, $config, $factory); } else { return new QiitaAPIV2($httpClient, $config, $factory); } }
protected function prepareConnectionAccessToken() { if (!$this->config->hasAccessToken()) { return; } $accessToken = $this->config->accessToken(); $this->httpClient->setAccessTokenToAutorizationHeader($accessToken); }