Closed clementAC closed 6 years ago
Hi @clem91
Here https://github.com/sendinblue/APIv3-nodejs-library#documentation-for-api-endpoints each method has a link to its sample. Also a working sample to create an email campaign with required input parameters can be found here https://account.sendinblue.com/advanced/api
Hope that helps!
Thanks SendinBlue Team
Hi,
I was talking about the type developer has to create in order to use the sdk.
For exemple if you take the create list function exemple
var createList = new SibApiV3Sdk.CreateList(); // CreateList | Values to create a list
// CreateList | Values to create a list
is not really a nice and complete exemple and you have to dig deeper in the doc to find what kind of parameters it accept (here again without exemple => createList type ). I was thinking first it was json parameters but it was not the case... it's normal parameters. Whithout clear exemple I lost some times doing try&learn.
Sincerely yours
Hi @clem91
Some of the APIs have quite large number of input parameters & It's quite not neat to provide each and every input parameter in a sample, and that we why we have parameter description table with type
defined for each parameter properly.
Passing inputs is quite easy though ;)
var apiInstance = new SibApiV3Sdk.ContactsApi();
var createList = new SibApiV3Sdk.CreateList(); // CreateList | Values to create a list
createList.name = 'mylist';
createList.folderId = 10;
OR
createList = {
name: 'mylist',
folderId: 10
}
apiInstance.createList(createList).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Hope that helps!
Thanks
Can you provide usage exemple of this node js sdk? This kind of tool should save time and without exemples it's not the case
Thanks in advance