Skip to content

Commit

Permalink
docs: add push usage docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed May 28, 2019
1 parent dcefc1e commit 8a990f7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $ npm install --save redis kue mongoose @lykmapipo/postman

## Usage
```js
const { Email, SMS } = require('@lykmapipo/postman');
const { Email, SMS, Push } = require('@lykmapipo/postman');

//send email
const email = new Email({ to: 'hello@example.com', subject: 'Hello', body: 'Hello' });
Expand All @@ -31,6 +31,18 @@ sms.send(cb);
const sms = new SMS({ to: '255714182838', body: 'Hello' });
const sendSMSJob = sms.queue();

...

//send push
const push = new Push({ to: 'f_T6rJL43xp:zBDA9obFwy24YR...', body: 'Hello' });
push.send(cb);

...

//queue push
const push = new Push({ to: 'f_T6rJL43xp:zBDA9obFwy24YR...', body: 'Hello' });
const sendPushJob = push.queue();

```

## Configuration
Expand Down Expand Up @@ -76,6 +88,9 @@ SMTP_SECURE=
SMTP_FROM=
SMTP_TEST_RECEIVER=

# GOOGLE FCM(GCM) TRANSPORT
PUSH_FCM_API_KEY=
PUSH_FCM_TEST_REGISTRATION_TOKEN=
```

## Testing
Expand Down

0 comments on commit 8a990f7

Please sign in to comment.