You are here

public function SendinblueManager::getApiVersion in SendinBlue 8.2

Same name and namespace in other branches
  1. 8 src/SendinblueManager.php \Drupal\sendinblue\SendinblueManager::getApiVersion()

Get the access key store in configuration.

Parameters

string $accessKey: The SiB access key.

Return value

string The SiB API version (V2 or V3)

2 calls to SendinblueManager::getApiVersion()
SendinblueManager::generateHomeLogin in src/SendinblueManager.php
Generate Home layout of Log out.
SendinblueManager::updateSendinblueMailin in src/SendinblueManager.php
Change Class Class in function of API version.

File

src/SendinblueManager.php, line 202

Class

SendinblueManager
Basic manager of module.

Namespace

Drupal\sendinblue

Code

public function getApiVersion($accessKey) {
  if (strlen($accessKey) > 20 && strpos($accessKey, 'xkeysib') !== FALSE) {
    return self::SENDINBLUE_API_VERSION_V3;
  }
  return self::SENDINBLUE_API_VERSION_V2;
}