# simple-ionic-push

> Easy API for using ionics push notifications, with promises

Latest version **1.0.1** (published 2016-05-03) · GNU General Public License v3 license · 0 weekly downloads

## Install

```sh
npm install simple-ionic-push
pnpm add simple-ionic-push
yarn add simple-ionic-push
bun add simple-ionic-push
```

## 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.1 |
| Published | 2016-05-03 |
| First published | 2016-05-02 |
| Weekly downloads | 0 |
| License | GNU General Public License v3 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Carman Babin |
| Maintainers | babinc |
| Keywords | ionic, iOS, android, push |

## Links

- npm: https://www.npmjs.com/package/simple-ionic-push
- Repository: https://github.com/babinc/simple-ionic-push
- Homepage: https://github.com/babinc/simple-ionic-push#readme
- Issues: https://github.com/babinc/simple-ionic-push/issues
- npm.io page: https://npm.io/package/simple-ionic-push

## Dependencies (2)

- [q](https://npm.io/package/q.md) ^1.4.1
- [https](https://npm.io/package/https.md) ^1.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-05-03
- 1.0.0 — 2016-05-02

## README

#Simple Ionic Push
This is a simple to way to push notifications to the ionic API server with your node server. 
## Install Simple-Ionic-Push

```bash
$ npm install --save simple-ionic-push
```

[![NPM](https://nodei.co/npm/simple-ionic-push.png)](https://nodei.co/npm/simple-ionic-push/)

##Require the package
```javascript
var ionicPush = require('simple-ionic-push')('Your API Token from Ionic');
```

Pushes will return a promise, and passed the success or error responses from the Ionic API.

##Sending a push
```javascript
var tokens = [];
tokens.push('yourDeviceToken');

var notification = {
  "tokens": tokens,
  "profile": "prod",
  "notification": {
    "message": "Hello World!"
  }
};
    
ionicPush.send(notification).then(function(response) {
  return res.status(201).send(response);
  }, function(error) {
  return res.status(400).send(error);
});
```

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