# ongage

> Ongage API client

Latest version **2.1.1** (published 2024-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install ongage
pnpm add ongage
yarn add ongage
bun add ongage
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2024-08-12 |
| First published | 2021-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >= 20 |
| Dependencies | 1 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jonathon Hill |
| Maintainers | compwright |

## Links

- npm: https://www.npmjs.com/package/ongage
- npm.io page: https://npm.io/package/ongage

## Dependencies (1)

- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21

## Recent versions

- 2.1.1 (latest) — 2024-08-12
- 2.1.0 — 2024-08-12
- 2.0.0 — 2024-08-12
- 1.1.7 — 2021-06-07
- 1.1.6 — 2021-05-20
- 1.1.5 — 2021-05-20
- 1.1.4 — 2021-05-20
- 1.1.3 — 2021-05-20
- 1.1.2 — 2021-05-20
- 1.0.1 — 2021-05-20
- 1.1.1 — 2021-05-20
- 1.1.0 — 2021-05-20
- 1.0.0 — 2021-04-29

## README

# Ongage API Javascript Client

Works by composing fetch-compatible request objects.

## Installation

```
$ npm install ongage --save
```

## Usage

```js
import { ContactsApi } from 'ongage';

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

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

## API

### [ContactsApi](https://ongage.atlassian.net/wiki/spaces/HELP/pages/1004175381/Contacts+API+Methods)

* 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](https://ongage.atlassian.net/wiki/spaces/HELP/pages/1027965140/List+API+Methods)

* get(id)
* getAll({ name, type, sort, order, offset, limit })
* createExport({ list_id, name, segment_id, mailing_id, date_format, file_format, fields_selected, status })
* retrieveExport(id)

## License

MIT license

---
_Source: https://npm.io/package/ongage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
