@obycode/neoncrm
v2.3.0
Published
NeonCRM REST API client for Node.js
Downloads
15
Readme
Neon CRM REST API Client for Node.js
This module provides a simple async/await interface to Neon CRM.
Installation
npm install @obycode/neoncrm
Setup
const neoncrm = require("@obycode/neoncrm");
let neon = new neoncrm.Client(
process.env.NEON_ORG_ID,
process.env.NEON_API_KEY
);
Usage
findAccount(email)
Returns ID of user with matching email ornull
createAccount(email, firstname, lastname, phone, source = '')
Creates a new user with the given information and returns the IDcreatePledge(accountId, campaignId, amount)
Creates a new pledge with the given information
Testing
Create a file, .env
with the following variables:
NEON_ORG_ID=<neon org id>
NEON_API_KEY=<neon api key>
NEON_CAMPAIGN_ID=<campaign id for testing>
Then run the tests using:
npm test