/vendor/sendinblue/api-v3-sdk/docs/Api/AttributesApi.md

https://gitlab.com/i-have-a-green/digitemis-v3 · Markdown · 243 lines · 180 code · 63 blank · 0 comment · 0 complexity · 5312d2cbc3337bd404917a1cb6e776f1 MD5 · raw file

  1. # SendinBlue\Client\AttributesApi
  2. All URIs are relative to *https://api.sendinblue.com/v3*
  3. Method | HTTP request | Description
  4. ------------- | ------------- | -------------
  5. [**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute
  6. [**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute
  7. [**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | List all attributes
  8. [**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute
  9. # **createAttribute**
  10. > createAttribute($attributeCategory, $attributeName, $createAttribute)
  11. Create contact attribute
  12. ### Example
  13. ```php
  14. <?php
  15. require_once(__DIR__ . '/vendor/autoload.php');
  16. // Configure API key authorization: api-key
  17. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  18. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  19. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  20. // Configure API key authorization: partner-key
  21. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  22. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  23. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  24. $apiInstance = new SendinBlue\Client\Api\AttributesApi(
  25. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  26. // This is optional, `GuzzleHttp\Client` will be used as default.
  27. new GuzzleHttp\Client(),
  28. $config
  29. );
  30. $attributeCategory = "attributeCategory_example"; // string | Category of the attribute
  31. $attributeName = "attributeName_example"; // string | Name of the attribute
  32. $createAttribute = new \SendinBlue\Client\Model\CreateAttribute(); // \SendinBlue\Client\Model\CreateAttribute | Values to create an attribute
  33. try {
  34. $apiInstance->createAttribute($attributeCategory, $attributeName, $createAttribute);
  35. } catch (Exception $e) {
  36. echo 'Exception when calling AttributesApi->createAttribute: ', $e->getMessage(), PHP_EOL;
  37. }
  38. ?>
  39. ```
  40. ### Parameters
  41. Name | Type | Description | Notes
  42. ------------- | ------------- | ------------- | -------------
  43. **attributeCategory** | **string**| Category of the attribute |
  44. **attributeName** | **string**| Name of the attribute |
  45. **createAttribute** | [**\SendinBlue\Client\Model\CreateAttribute**](../Model/CreateAttribute.md)| Values to create an attribute |
  46. ### Return type
  47. void (empty response body)
  48. ### Authorization
  49. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  50. ### HTTP request headers
  51. - **Content-Type**: application/json
  52. - **Accept**: application/json
  53. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
  54. # **deleteAttribute**
  55. > deleteAttribute($attributeCategory, $attributeName)
  56. Delete an attribute
  57. ### Example
  58. ```php
  59. <?php
  60. require_once(__DIR__ . '/vendor/autoload.php');
  61. // Configure API key authorization: api-key
  62. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  63. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  64. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  65. // Configure API key authorization: partner-key
  66. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  67. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  68. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  69. $apiInstance = new SendinBlue\Client\Api\AttributesApi(
  70. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  71. // This is optional, `GuzzleHttp\Client` will be used as default.
  72. new GuzzleHttp\Client(),
  73. $config
  74. );
  75. $attributeCategory = "attributeCategory_example"; // string | Category of the attribute
  76. $attributeName = "attributeName_example"; // string | Name of the existing attribute
  77. try {
  78. $apiInstance->deleteAttribute($attributeCategory, $attributeName);
  79. } catch (Exception $e) {
  80. echo 'Exception when calling AttributesApi->deleteAttribute: ', $e->getMessage(), PHP_EOL;
  81. }
  82. ?>
  83. ```
  84. ### Parameters
  85. Name | Type | Description | Notes
  86. ------------- | ------------- | ------------- | -------------
  87. **attributeCategory** | **string**| Category of the attribute |
  88. **attributeName** | **string**| Name of the existing attribute |
  89. ### Return type
  90. void (empty response body)
  91. ### Authorization
  92. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  93. ### HTTP request headers
  94. - **Content-Type**: application/json
  95. - **Accept**: application/json
  96. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
  97. # **getAttributes**
  98. > \SendinBlue\Client\Model\GetAttributes getAttributes()
  99. List all attributes
  100. ### Example
  101. ```php
  102. <?php
  103. require_once(__DIR__ . '/vendor/autoload.php');
  104. // Configure API key authorization: api-key
  105. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  106. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  107. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  108. // Configure API key authorization: partner-key
  109. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  110. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  111. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  112. $apiInstance = new SendinBlue\Client\Api\AttributesApi(
  113. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  114. // This is optional, `GuzzleHttp\Client` will be used as default.
  115. new GuzzleHttp\Client(),
  116. $config
  117. );
  118. try {
  119. $result = $apiInstance->getAttributes();
  120. print_r($result);
  121. } catch (Exception $e) {
  122. echo 'Exception when calling AttributesApi->getAttributes: ', $e->getMessage(), PHP_EOL;
  123. }
  124. ?>
  125. ```
  126. ### Parameters
  127. This endpoint does not need any parameter.
  128. ### Return type
  129. [**\SendinBlue\Client\Model\GetAttributes**](../Model/GetAttributes.md)
  130. ### Authorization
  131. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  132. ### HTTP request headers
  133. - **Content-Type**: application/json
  134. - **Accept**: application/json
  135. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
  136. # **updateAttribute**
  137. > updateAttribute($attributeCategory, $attributeName, $updateAttribute)
  138. Update contact attribute
  139. ### Example
  140. ```php
  141. <?php
  142. require_once(__DIR__ . '/vendor/autoload.php');
  143. // Configure API key authorization: api-key
  144. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  145. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  146. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  147. // Configure API key authorization: partner-key
  148. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  149. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  150. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  151. $apiInstance = new SendinBlue\Client\Api\AttributesApi(
  152. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  153. // This is optional, `GuzzleHttp\Client` will be used as default.
  154. new GuzzleHttp\Client(),
  155. $config
  156. );
  157. $attributeCategory = "attributeCategory_example"; // string | Category of the attribute
  158. $attributeName = "attributeName_example"; // string | Name of the existing attribute
  159. $updateAttribute = new \SendinBlue\Client\Model\UpdateAttribute(); // \SendinBlue\Client\Model\UpdateAttribute | Values to update an attribute
  160. try {
  161. $apiInstance->updateAttribute($attributeCategory, $attributeName, $updateAttribute);
  162. } catch (Exception $e) {
  163. echo 'Exception when calling AttributesApi->updateAttribute: ', $e->getMessage(), PHP_EOL;
  164. }
  165. ?>
  166. ```
  167. ### Parameters
  168. Name | Type | Description | Notes
  169. ------------- | ------------- | ------------- | -------------
  170. **attributeCategory** | **string**| Category of the attribute |
  171. **attributeName** | **string**| Name of the existing attribute |
  172. **updateAttribute** | [**\SendinBlue\Client\Model\UpdateAttribute**](../Model/UpdateAttribute.md)| Values to update an attribute |
  173. ### Return type
  174. void (empty response body)
  175. ### Authorization
  176. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  177. ### HTTP request headers
  178. - **Content-Type**: application/json
  179. - **Accept**: application/json
  180. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)