You are here

public function ZoomApiClient::__construct in Zoom API 2.0.x

Same name and namespace in other branches
  1. 8 src/Client/ZoomApiClient.php \Drupal\zoomapi\Client\ZoomApiClient::__construct()

Constructor.

Parameters

\GuzzleHttp\ClientInterface $http_client: Client interface.

\Drupal\key\KeyRepositoryInterface $key_repository: Key repository interface.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory interface.

\Psr\Log\LoggerInterface $logger: Logger interface.

\Drupal\Component\Datetime\Time $time: Time.

File

src/Client/ZoomApiClient.php, line 90

Class

ZoomApiClient
Uses http client to interact with the Zoom API.

Namespace

Drupal\zoomapi\Client

Code

public function __construct(ClientInterface $http_client, KeyRepositoryInterface $key_repository, ConfigFactoryInterface $config_factory, LoggerInterface $logger, Time $time) {
  $this->httpClient = $http_client;
  $this->logger = $logger;
  $this->time = $time;
  $this->keyRepository = $key_repository;
  $this->config = $config_factory
    ->get('zoomapi.settings');
  $this->apiKey = $this
    ->getKeyValue('api_key');
  $this->apiSecret = $this
    ->getKeyValue('api_secret');
  $this->baseUri = $this->config
    ->get('base_uri');
}