# firstpromoter-api-node

> Node.js library for firstpromoter.com API

Latest version **1.0.0** (published 2019-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install firstpromoter-api-node
pnpm add firstpromoter-api-node
yarn add firstpromoter-api-node
bun add firstpromoter-api-node
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-11-12 |
| First published | 2019-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.15.3 |
| Dependencies | 2 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Sergey Kalaus |
| Maintainers | pixcinc |
| Keywords | firstpromoter, api, node.js |

## Links

- npm: https://www.npmjs.com/package/firstpromoter-api-node
- Repository: https://github.com/Pixc2/firstpromoter-api-node
- Homepage: https://firstpromoter.com
- Issues: https://github.com/Pixc2/firstpromoter-api-node/issues
- npm.io page: https://npm.io/package/firstpromoter-api-node

## Dependencies (2)

- [ip](https://npm.io/package/ip.md) ^1.1.5
- [request](https://npm.io/package/request.md) ^2.88.0

## Recent versions

- 1.0.0 (latest) — 2019-11-12
- 0.0.5 — 2019-07-24
- 0.0.4 — 2019-05-02
- 0.0.3 — 2019-05-01
- 0.0.2 — 2019-05-01
- 0.0.1 — 2019-05-01

## README

firstpromoter-api-node
==============

[![travis ci](https://travis-ci.org/Pixc2/firstpromoter-api-node.svg?branch=master)](https://travis-ci.org/Pixc2/firstpromoter-api-node)

Node.js FirstPromoter API bindings. API docs available here: https://docs.firstpromoter.com/#api-reference

### Installation

    npm install --save firstpromoter-api-node
    
## API

### `FirstpromoterApiNode(options)`

Creates a new `FirstpromoterApiNode` instance.

#### Arguments

- `options` - Optional - A plain JavaScript object that contains the configuration options.

#### Options

- `wid` - Optional (String) - Integration ID(wid)
- `key` - Required (Boolean) - API key

#### Return value

A `FirstpromoterApiNode` instance.

### Example of POST request

```js
const FirstpromoterApiNode = require('firstpromoter-api-node');

const firstpromoterApiNode = new FirstpromoterApiNode({
  key: 'YOUR_KEY',
  wid: 'YOUR_WID'
});

firstpromoterApiNode.post('track/signup', {
  email: 'example: email.com',
  tid: 'VISITOR_ID'
}).then(
  result => console.log(result),
  err => console.log(err)
);
```

#### Result

```json
{
  "body": {
    "id": 12345,
    "type": "signup",
    "amount_cents": null,
    "reward": null,
    "lead": {},
    "promoter": {}
  }
}
```

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