public function SendinblueApiV2::getAttributes in SendinBlue 8
Same name and namespace in other branches
- 8.2 src/Tools/Api/SendinblueApiV2.php \Drupal\sendinblue\Tools\Api\SendinblueApiV2::getAttributes()
Get attribute by type.
Return value
\Drupal\sendinblue\Tools\Model\GetAttributes An array of attributes.
Overrides SendInBlueApiInterface::getAttributes
File
- src/
Tools/ Api/ SendinblueApiV2.php, line 273
Class
- SendinblueApiV2
- Sendinblue REST client.
Namespace
Drupal\sendinblue\Tools\ApiCode
public function getAttributes() {
$sibAttributes = $this->sIBHttpClient
->get("attribute/", "");
$attributes['attributes'] = [];
foreach ($sibAttributes['data']['normal_attributes'] as $attribute) {
$attributes['attributes'][] = [
'name' => $attribute['name'],
'type' => $attribute['type'],
'category' => 'normal',
];
}
return new GetAttributes($attributes);
}