1.0.0 • Published 5 years ago

ministry-platform v1.0.0

Weekly downloads
30
License
ISC
Repository
-
Last release
5 years ago

Ministry Platform

Teamcity Status

an npm package for interacting with the Ministry Platform Rest API

Usage

Prerequisites

This package uses async/await, so requires a node version > 7.6

Build a request

currently, only GET requests with select columns, filters, and table in implemented.

const MP = require('ministry-platform');
const mp = new MP();
   
const selectColumns = []
selectColumns.push('User_ID_Table_Contact_ID_Table.[Contact_ID]')
selectColumns.push('Role_ID_Table.[Role_Name]')
selectColumns.push('dp_User_Roles.[User_Role_ID]')
const filter = `User_ID_Table_Contact_ID_Table.[Contact_ID] = 7680320 and Role_ID_Table.[Role_Name] LIKE 'pushpay'` 
const table = 'dp_User_Roles'
const data = await mp.withSelectColumns(selectColumns)
    .withFilter(filter)
    .fromTable(table)
    .get()
console.info("data:", data);

to run the above example, you can run node example.js, just remember to set your environment variables.

Development

Install dependencies

npm i

Run tests

npm test
# or, to run tests as you change files
npm test:watch

Environment Variables needed

1.0.0

5 years ago

0.1.0

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