Skip to content

Commit 7a3e283

Browse files
authored
Merge pull request #13 from sendinblue/feature_AP-953
AP-953 wrapper update
2 parents e59fa15 + b4bddc2 commit 7a3e283

15 files changed

+39
-132
lines changed

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 SendinBlue
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,54 +26,36 @@ npm install sib-api-v3-typescript --save
2626
Once you have [installed](#installation) the node module in your project, you can execute the following sample code JS code :
2727

2828
```javascript
29-
// For getAccount API
29+
const SibApiV3Sdk = require('sib-api-v3-typescript');
3030

31-
var SibApiV3Sdk = require('sib-api-v3-typescript');
32-
33-
var apiInstance = new SibApiV3Sdk.AccountApi()
31+
let apiInstance = new SibApiV3Sdk.AccountApi()
3432

3533
// Configure API key authorization: api-key
3634

37-
var apiKey = apiInstance.authentications['apiKey'];
35+
let apiKey = apiInstance.authentications['apiKey'];
3836
apiKey.apiKey = "YOUR API KEY"
3937

40-
// Configure API key authorization: partner-key
41-
42-
var partnerKey = apiInstance.authentications['partnerKey'];
43-
partnerKey.apiKey = "YOUR API KEY"
44-
4538
apiInstance.getAccount().then(function(data) {
4639
console.log('API called successfully. Returned data: ' + data);
4740
}, function(error) {
4841
console.error(error);
4942
});
50-
51-
5243
```
5344

5445
```javascript
55-
//For getLists API
56-
57-
var SibApiV3Sdk = require('sib-api-v3-typescript');
46+
const SibApiV3Sdk = require('sib-api-v3-typescript');
5847

59-
var apiInstance = new SibApiV3Sdk.ContactsApi()
48+
let apiInstance = new SibApiV3Sdk.ContactsApi()
6049

6150
// Configure API key authorization: apiKey
6251

63-
var apiKey = apiInstance.authentications['apiKey'];
52+
let apiKey = apiInstance.authentications['apiKey'];
6453
apiKey.apiKey = "YOUR API KEY"
6554

66-
// Configure API key authorization: partnerKey
55+
let limit = 10; // Number | Number of documents per page
56+
let offset = 0; // Number | Index of the first document of the page
6757

68-
var partnerKey = apiInstance.authentications['partnerKey'];
69-
partnerKey.apiKey = "YOUR API KEY"
70-
71-
var opts = {
72-
'limit': 10, // Number | Number of documents per page
73-
'offset': 0 // Number | Index of the first document of the page
74-
};
75-
76-
apiInstance.getLists(opts).then(function(data) {
58+
apiInstance.getLists(limit, offset).then(function(data) {
7759
console.log('API called successfully. Returned data: ' + data);
7860
apiInstance.getAttributes().then(function(data) {
7961
console.log('API called successfully. Returned data: ' + data);
@@ -84,9 +66,6 @@ apiInstance.getLists(opts).then(function(data) {
8466
}, function(error) {
8567
console.error(error);
8668
});
87-
88-
8969
```
9070

91-
92-
For more examples, refer the https://github.com/sendinblue/APIv3-nodejs-library#documentation-for-api-endpoints
71+
For more examples, refer the [Endpoints Guide](https://developers.sendinblue.com/reference)

model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export declare class GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription {
22
'eventTime': Date;
3-
'ip': string;
3+
'ip'?: string;
44
static discriminator: string | undefined;
55
static attributeTypeMap: Array<{
66
name: string;

model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubsc
2020
/**
2121
* IP from which the user has been unsubscribed
2222
*/
23-
'ip': string;
23+
'ip'?: string;
2424

2525
static discriminator: string | undefined = undefined;
2626

model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export declare class GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription {
22
'campaignId': number;
33
'eventTime': Date;
4-
'ip': string;
4+
'ip'?: string;
55
static discriminator: string | undefined;
66
static attributeTypeMap: Array<{
77
name: string;

model/getExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscr
2424
/**
2525
* IP from which the user has unsubscribed
2626
*/
27-
'ip': string;
27+
'ip'?: string;
2828

2929
static discriminator: string | undefined = undefined;
3030

model/models.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)