public function ClientService::getClient in Sparkpost email 8
Same name and namespace in other branches
- 8.2 src/ClientService.php \Drupal\sparkpost\ClientService::getClient()
Return value
\SparkPost\SparkPost
Overrides ClientServiceInterface::getClient
2 calls to ClientService::getClient()
File
- src/
ClientService.php, line 42
Class
- ClientService
- Class ClientService.
Namespace
Drupal\sparkpostCode
public function getClient() {
$config = $this->configFactory
->get('sparkpost.settings');
$httpClient = new GuzzleAdapter($this->client);
return new SparkPost($httpClient, [
'key' => $config
->get('api_key'),
]);
}