0.5.1 • Published 5 years ago
mailerlite-mailerlite v0.5.1
MailerLite SDK for Node.js
Many thanks to Filipe Oliveira for the API v1 implementation which this fork was created from.
Node.js wrapper for MailerLite API, supporting versions 1 and 2.
Usage
Install with npm: npm install --save mailerlite-mailerlite
.
Terrible name, I know, but needed to get uniqueness :)
Browse your lists (API v1):
var MailerLite = require('mailerlite');
var ML = new MailerLite(apiKey);
ML.Lists.getAll()
.then(function(data) {
console.log(data);
});
Browse your groups ( API v2):
var MailerLite = require('mailerlite');
var ML = new MailerLite(apiKey, 2);
ML.Groups.getAll()
.then(function(data) {
console.log(data);
});
Refer to the test cases for more detail.
Compatibility
All methods will return promises.
Documentation
License
MIT.