elastic-email-api
Elastic Email API wrapper
Getting started:
npm install elastic-email-api //or npm install --save elastic-email-api
var elastic = ;
How to use:
elastic; //elastic.request(optionObject);
Options object:
path: '/category/actiontodo' // typeof "string", REQUIRED! params: param1: value param2: value //typeof "object", [optional] but most of Elastic Email API requests needs it! {} //typeof "function", [optional], hideApiKey: true // typeof "boolean", default: "false", more info below...
Response Object available in callback
error: //null or error message from request module.response: //object with response from elastic emailpath: //full path for API connection
Set API Key
elastic.setApiKey(YourApiKeyString);
If you set API key, you don't need it anymore in "parameters object". f.e.
elastic;
hideApiKey property in request input
NOTE: You should not sent your api key with "contact/add". If you are using 'setApiKey' & 'request' methods, set the hideApiKey property as true...
elastic;
But you can still specify a different API Key.
elastic;//Returns detailed information about your subaccount.
Attachment Upload >= 1.3.0
const fs = ; var formData = my_file: fs; elastic;
NOTE: From version 1.5.0 I only support request method, all wrapper methods are deprecated