0.0.7 • Published 6 years ago

mautic-api-node v0.0.7

Weekly downloads
66
License
ISC
Repository
-
Last release
6 years ago

Node.js Wrapper for Mautic API

Mautic Logo

Alpha version of a basic wrapper to use the Mautic API in Node.js.

Usage

  • npm install mautic-api-node
  • Require the module with var mautic = require('mautic-api-node')
  • Update the mautic.config object with relevant details as per below:\ mautic.config.base_url = "https://example.mautic.com";\ mautic.config.redirect_uri = "https://www.mautic.com";\ mautic.config.public_key = "EXAMPLE_PUBLIC_KEY";\ mautic.config.secret_key = "EXAMPLE_SECRET_KEY";\ mautic.config.state = "RANDOM_STATE";\ mautic.config.api_endpoint = "https://example.mautic.com/api";
  • Use mautic.auth.checkAuth(callback) to check auth and process the data with callback.
  • You must run this from the command line first, perhaps using example.js - as this will create the token file needed to authenticate with the Mautic API.
  • Callback will either receive a single parameter from these options:
    • An asset object containing the JSON response from the API.
    • An error string containing a relevant error message.
    • An error object from the request itself.

Examples

  • Please reference example.js for an example.

Support

Reference

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago