1.3.1 • Published 10 years ago

apn-test v1.3.1

Weekly downloads
74
License
MIT
Repository
github
Last release
10 years ago

apn-test Build Status Dependency Status Coverage Status

easily send a test push notification

Install

$ npm install --save apn-test

Usage

var apnTest = require('apn-test');

var message = 'Hello';
var options = {
  cert: '/path/to/pushCert.pem',
  key: '/path/to/pushKey.pem',
  token: 'uney4jcnvvw5bc2vlvazog4au1xa0zbcbsjwlfgaj1pi9blcdltgktncfxfwhs5'
};

apnTest(message, options);

CLI

$ npm install --global apn-test
$ apn --help

  quickly test push notifications
    
  Usage
    apn <message> --options
    apn "Hello world" --token=uney4jcnvvw5bc2vlvazog4au1xa0zbcbsjwlfgaj1pi9blcdltgktncfxfwhs5
    
  Options
    --token
          (required)
          The device token you wish to send the notification to
          Takes a single token or a comma-separated list of tokens

Debug

Enable debug messages by running the CLI with DEBUG=apn, like so:

$ DEBUG=apn apn <message> --options

See the node-apn documentation for more details.

Options

Pass in args to the CLI with this syntax: apn --foo=bar.

  • cert (default cert.pem)
  • key (default key.pem)
  • token (required) accepts single token or a comma-separated list of tokens
  • development
  • badge - (default 0) The value to specify for payload.aps.badge
  • sound - (default ping.aiff) The value to specify for payload.aps.sound
  • payload - (default {}) JSON encoded extra payload values
  • expiry - (default 1 hour) The UNIX timestamp representing when the notification should expire. An expiry of 0 indicates that the notification expires immediately.

Related

License

MIT © Matias Singers

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.0

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago