# ivy-notifier

> Ember CLI addon that provides easy realtime notifications.

Latest version **0.0.1** (published 2015-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install ivy-notifier
pnpm add ivy-notifier
yarn add ivy-notifier
bun add ivy-notifier
```

## 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.0.1 |
| Published | 2015-03-31 |
| First published | 2015-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Dray Lacy |
| Maintainers | omghax |
| Keywords | ember-addon, pusher, realtime |

## Links

- npm: https://www.npmjs.com/package/ivy-notifier
- Repository: https://github.com/IvyApp/ivy-notifier
- Issues: https://github.com/IvyApp/ivy-notifier/issues
- npm.io page: https://npm.io/package/ivy-notifier

## Dependencies (1)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^4.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2015-03-31

## README

# ivy-notifier

[![Build Status](https://travis-ci.org/IvyApp/ivy-notifier.svg?branch=master)](https://travis-ci.org/IvyApp/ivy-notifier)

Ember CLI addon that provides easy realtime notifications.

Currently only [Pusher](https://pusher.com/) is supported.

## Installation

From within your Ember CLI app, run:

```sh
ember install:addon ivy-notifier
```

## Usage

First, add the Pusher javascript to your `app/index.html` file:

```html
<script src="//js.pusher.com/2.2/pusher.min.js" type="text/javascript"></script>
```

Next, define a socket inside your application. Since we're using Pusher, we'll
define a subclass of `PusherSocket` inside `app/sockets/pusher.js`:

```javascript
import PusherSocket from 'ivy-notifier/sockets/pusher';

export default PusherSocket.extend({
  pusher: new Pusher('YOUR_PUSHER_ACCESS_KEY')
});
```

Then mix in the `NotifiableMixin` to any controller or route and define
a `subscriptions` hash to map events to actions:

```javascript
import Ember from 'ember';
import NotifiableMixin from 'ivy-notifier/mixins/notifiable';

export default Ember.Controller.extend(NotifiableMixin, {
  subscriptions: {
    pusher: {
      'test_channel': {
        'test_event': 'testEvent'
      }
    }
  },

  actions: {
    testEvent: function(data) {
      // do something with data...
    }
  }
});
```

This example will use the "pusher" socket we created above, and will subscribe
the controller to any "test\_event" events on the "test\_channel" channel. Each
time a "test\_event" event comes in, the "testEvent" action will be triggered,
passing along the event's data (if any).

## Running

* `ember server`
* Visit your app at http://localhost:4200.

## Running Tests

* `ember test`
* `ember test --server`

## Building

* `ember build`

For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).

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