Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e359ea8
commit 0a0a79d
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*! | ||
* Dependencies | ||
*/ | ||
|
||
var agent = require('./_header') | ||
, device = require('../device'); | ||
|
||
/*! | ||
* Send message | ||
*/ | ||
|
||
agent.createMessage() | ||
.device(device) | ||
.alert('Time to set the badge number to 3.') | ||
.badge(3) | ||
.send(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*! | ||
* Dependencies | ||
*/ | ||
|
||
var agent = require('./_header') | ||
, device = require('../device'); | ||
|
||
/*! | ||
* Send message | ||
*/ | ||
|
||
agent.createMessage() | ||
.device(device) | ||
.alert('Custom variables') | ||
.set('id_1', 12345) | ||
.set('id_2', 'abcdef') | ||
.send(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*! | ||
* Dependencies | ||
*/ | ||
|
||
var agent = require('./_header') | ||
, device = require('../device'); | ||
|
||
/*! | ||
* Send messages | ||
*/ | ||
|
||
// set default to one day | ||
agent.set('expires', '1d'); | ||
|
||
// send using default 1d | ||
agent.createMessage() | ||
.device(device) | ||
.alert('You were invited to a new event.') | ||
.send(); | ||
|
||
// use custom for 1 hour | ||
agent.createMessage() | ||
.device(device) | ||
.alert('New Event @ 4pm') | ||
.expires('1h') | ||
.send(); | ||
|
||
// set custom no expiration | ||
agent.createMessage() | ||
.device(device) | ||
.alert('Event happening now!') | ||
.expires(0) | ||
.send(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/*! | ||
* Dependencies | ||
*/ | ||
|
||
var agent = require('./_header') | ||
, device = require('../device'); | ||
|
||
/*! | ||
* Send message | ||
*/ | ||
|
||
agent.createMessage() | ||
.device(device) | ||
.alert('Hello Universe!') | ||
.send(); |
Empty file.