You are here

public function SendinblueApiV2::partnerDrupal in SendinBlue 8.2

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

Add the Partner's name in sendinblue.

Overrides SendInBlueApiInterface::partnerDrupal

File

src/Tools/Api/SendinblueApiV2.php, line 327

Class

SendinblueApiV2
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);
}