ongage

1.1.7 • Public • Published

Ongage API Javascript Client

Works by composing fetch-compatible request objects.

Use node-fetch in Node.js applications.

Installation

$ npm install ongage --save

Usage

const fetch = require('node-fetch');
const { ContactsApi } = require('ongage');

const ongage = new ContactsApi('username', 'password', 'account code');

const { url, ...req } = ongage.getByEmail('jonathon@compwright.com');
const res = await fetch(url, req);
const data = await res.json();

API

ContactsApi

  • getById(id, listId)
  • getByEmail(email, listId)
  • getListsByEmail(email)
  • create({ email, overwrite, fields }, listId)
  • create([{ email, overwrite, fields }, { email, overwrite, fields }, ...], listId)
  • update({ email, ...fields }, listId)
  • update([{ email, ...fields }, { email, ...fields }, { email, ...fields }, ...], listId)
  • delete({ contact_id }, listId)
  • delete({ contact_ids }, listId)
  • changeStatus({ emails, change_to, ocx_child_id, ocx_connection_id }, listId)
  • changeEmail({ email, new_email }, listId)

ListsApi

  • get(id)
  • getAll({ name, type, sort, order, offset, limit })

License

MIT license

Readme

Keywords

none

Package Sidebar

Install

npm i ongage

Weekly Downloads

59

Version

1.1.7

License

MIT

Unpacked Size

2.73 MB

Total Files

10

Last publish

Collaborators

  • compwright