@@ -11,43 +11,42 @@ Method | HTTP request | Description
11
11
12
12
<a name =" createAttribute " ></a >
13
13
# ** createAttribute**
14
- > InlineResponse201 createAttribute(createAttribute)
14
+ > CreateModel createAttribute(createAttribute)
15
15
16
16
Creates contact attributes
17
17
18
18
### Example
19
19
``` javascript
20
- var SendinBlueApi = require (' sendinblue-apiv3 ' );
20
+ var SendinBlueApi = require (' sendin_blue_api ' );
21
21
var defaultClient = SendinBlueApi .ApiClient .instance ;
22
22
23
23
// Configure API key authorization: api-key
24
- var apiKey = defaultClient .authentications [' api-key' ];
25
- apiKey .apiKey = ' YOUR API KEY' ;
24
+ var api- key = defaultClient .authentications [' api-key' ];
25
+ api- key .apiKey = ' YOUR API KEY' ;
26
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
27
+ // api-key.apiKeyPrefix = 'Token';
26
28
27
29
var apiInstance = new SendinBlueApi.AttributesApi ();
28
30
29
- var createAttribute = new SendinBlueApi.CreateAttribute1 (); // CreateAttribute1 | Values to create an attribute
31
+ var createAttribute = new SendinBlueApi.CreateAttribute (); // CreateAttribute | Values to create an attribute
30
32
33
+ apiInstance .createAttribute (createAttribute).then (function (data ) {
34
+ console .log (' API called successfully. Returned data: ' + data);
35
+ }, function (error ) {
36
+ console .error (error);
37
+ });
31
38
32
- var callback = function (error , data , response ) {
33
- if (error) {
34
- console .error (error);
35
- } else {
36
- console .log (' API called successfully. Returned data: ' + data);
37
- }
38
- };
39
- apiInstance .createAttribute (createAttribute, callback);
40
39
```
41
40
42
41
### Parameters
43
42
44
43
Name | Type | Description | Notes
45
44
------------- | ------------- | ------------- | -------------
46
- ** createAttribute** | [ ** CreateAttribute1 ** ] ( CreateAttribute1 .md) | Values to create an attribute |
45
+ ** createAttribute** | [ ** CreateAttribute ** ] ( CreateAttribute .md) | Values to create an attribute |
47
46
48
47
### Return type
49
48
50
- [ ** InlineResponse201 ** ] ( InlineResponse201 .md)
49
+ [ ** CreateModel ** ] ( CreateModel .md)
51
50
52
51
### Authorization
53
52
@@ -66,26 +65,25 @@ Deletes an attribute
66
65
67
66
### Example
68
67
``` javascript
69
- var SendinBlueApi = require (' sendinblue-apiv3 ' );
68
+ var SendinBlueApi = require (' sendin_blue_api ' );
70
69
var defaultClient = SendinBlueApi .ApiClient .instance ;
71
70
72
71
// Configure API key authorization: api-key
73
- var apiKey = defaultClient .authentications [' api-key' ];
74
- apiKey .apiKey = ' YOUR API KEY' ;
72
+ var api- key = defaultClient .authentications [' api-key' ];
73
+ api- key .apiKey = ' YOUR API KEY' ;
74
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
75
+ // api-key.apiKeyPrefix = 'Token';
75
76
76
77
var apiInstance = new SendinBlueApi.AttributesApi ();
77
78
78
79
var attributeId = " attributeId_example" ; // String | id of the attribute
79
80
81
+ apiInstance .deleteAttribute (attributeId).then (function () {
82
+ console .log (' API called successfully.' );
83
+ }, function (error ) {
84
+ console .error (error);
85
+ });
80
86
81
- var callback = function (error , data , response ) {
82
- if (error) {
83
- console .error (error);
84
- } else {
85
- console .log (' API called successfully.' );
86
- }
87
- };
88
- apiInstance .deleteAttribute (attributeId, callback);
89
87
```
90
88
91
89
### Parameters
@@ -109,37 +107,36 @@ null (empty response body)
109
107
110
108
<a name =" getAttributes " ></a >
111
109
# ** getAttributes**
112
- > InlineResponse20016 getAttributes()
110
+ > GetAttributes getAttributes()
113
111
114
112
Lists all attributes
115
113
116
114
### Example
117
115
``` javascript
118
- var SendinBlueApi = require (' sendinblue-apiv3 ' );
116
+ var SendinBlueApi = require (' sendin_blue_api ' );
119
117
var defaultClient = SendinBlueApi .ApiClient .instance ;
120
118
121
119
// Configure API key authorization: api-key
122
- var apiKey = defaultClient .authentications [' api-key' ];
123
- apiKey .apiKey = ' YOUR API KEY' ;
120
+ var api- key = defaultClient .authentications [' api-key' ];
121
+ api- key .apiKey = ' YOUR API KEY' ;
122
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
123
+ // api-key.apiKeyPrefix = 'Token';
124
124
125
125
var apiInstance = new SendinBlueApi.AttributesApi ();
126
+ apiInstance .getAttributes ().then (function (data ) {
127
+ console .log (' API called successfully. Returned data: ' + data);
128
+ }, function (error ) {
129
+ console .error (error);
130
+ });
126
131
127
- var callback = function (error , data , response ) {
128
- if (error) {
129
- console .error (error);
130
- } else {
131
- console .log (' API called successfully. Returned data: ' + data);
132
- }
133
- };
134
- apiInstance .getAttributes (callback);
135
132
```
136
133
137
134
### Parameters
138
135
This endpoint does not need any parameter.
139
136
140
137
### Return type
141
138
142
- [ ** InlineResponse20016 ** ] ( InlineResponse20016 .md)
139
+ [ ** GetAttributes ** ] ( GetAttributes .md)
143
140
144
141
### Authorization
145
142
0 commit comments