You are here

public function SendinblueApiV3::partnerDrupal in SendinBlue 8.2

Same name and namespace in other branches
  1. 8 src/Tools/Api/SendinblueApiV3.php \Drupal\sendinblue\Tools\Api\SendinblueApiV3::partnerDrupal()

Add the Partner's name in sendinblue.

Overrides SendInBlueApiInterface::partnerDrupal

File

src/Tools/Api/SendinblueApiV3.php, line 380

Class

SendinblueApiV3
Sendinblue REST client.

Namespace

Drupal\sendinblue\Tools\Api

Code

public function partnerDrupal() {
  $data = [];
  $data['key'] = $this->apiKey;
  $data['webaction'] = 'MAILIN-PARTNER';
  $data['partner'] = 'DRUPAL';
  $data['source'] = 'Drupal';
  $options = [
    'headers' => [
      'Content-Type' => 'application/json',
    ],
    'form_params' => $data,
    'verify' => FALSE,
  ];
  return $this->sIBHttpClient
    ->doRequestDirect(SendinblueHttpClient::WEBHOOK_WS_SIB_URL, 'POST', $data, $options);
}