# rubik-sendpulse

> Sendpulse API kubik for the Rubik application system

Latest version **0.5.2** (published 2019-09-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install rubik-sendpulse
pnpm add rubik-sendpulse
yarn add rubik-sendpulse
bun add rubik-sendpulse
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2019-09-13 |
| First published | 2019-09-09 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 28.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Constantin T. |
| Maintainers | ya-kostik |
| Keywords | rubik, kubik, sendpulse |

## Links

- npm: https://www.npmjs.com/package/rubik-sendpulse
- Repository: https://github.com/ya-kostik/rubik-sendpulse
- npm.io page: https://npm.io/package/rubik-sendpulse

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [mustache](https://npm.io/package/mustache.md) ^3.0.3
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [serialize-like-php](https://npm.io/package/serialize-like-php.md) ^1.0.1

## Recent versions

- 0.5.2 (latest) — 2019-09-13
- 0.5.1 — 2019-09-09
- 0.5.0 — 2019-09-09

## README

# rubik-sendpulse
Sendpulse's Bot API kubik for the Rubik

## Install

### npm
```bash
npm i rubik-sendpulse
```

### yarn
```bash
yarn add rubik-sendpulse
```

## Use
```js
const { App, Kubiks } = require('rubik-main');
const Sendpulse = require('rubik-sendpulse');
const path = require('path');

// create rubik app
const app = new App();
// config need for most modules
const config = new Kubiks.Config(path.join(__dirname, './config/'));

const sendpulse = new Sendpulse();

app.add([ config, sendpulse ]);

app.up().
then(() => console.info('App started')).
catch(err => console.error(err));
```

## Config
`sendpulse.js` config in configs volume may contain the host, an id and a secret.

If you do not specify a host, then `https://api.sendpulse.com/` will be used by default.

If you don't specify an id and a secret, you will need to pass it when create kubik.

You may need the host option if for some reason Sendpulse host is not available from your server
and you want to configure a proxy server.


For example:
`config/sendpulse.js`
```js
module.exports = {
  host: 'https://my.sendpulse.proxy.example.com/'
};
```

## Call
All methods are grouped by namespaces.

List of available methods and namespaces you can see in `classes/Sendpulse/methods/`

```js
...
const response = await app.sendpulse.addressbooks.get();
...
const createResponse = await app.sendpulse.addressbooks.createEmails([{
  email,
  variables: {
    ping: 'pong',
    hello: 'world'
  }
}]);
````

## Extensions
Sendpulse kubik doesn't has any extension.

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