Skip to content

Instantly share code, notes, and snippets.

@nicholasf
Last active May 18, 2016 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicholasf/865eef92b60bfa096f5603f75b51047f to your computer and use it in GitHub Desktop.
Save nicholasf/865eef92b60bfa096f5603f75b51047f to your computer and use it in GitHub Desktop.

Events

Win message to individual account

Keno service sends:

{
  "application": "keno",
  "event": "win",
  "data": {
    "message": "this is the test message, you have won",
    "stt": "659228310548717",
    "identifier": "1012998",
    "sound": "chime.wav"
  }
}

Push Notification transforms this into

{
  "event": "win",
    "stt": "659228310548717",
    "identifier": "1012998",
  "aps": {
    "alert": "this is the test message, you have won"
    //"badge": "" - perhaps in the future (would be recorded by the PN service)
    "sound": "chime.wav"
  }
}

Topic message (for jackpots) - a broadcast to many

Keno service sends:

{
  "application": "keno",
  "event": "jackpot10",
  "data": {
    "message": "Jackpot10 is currently above 20 million!",
    "currentLevel": 20100000,
    "sound": "jackpot10.wav"
  }
}

Push Notification service transforms this into:

{
  "event": "jackpot10",
  "aps": {
    "alert": "Jackpot10 is currently above 20 million!",
    "sound": "jackpot10.wav"
  }
  "currentLevel": 20100000
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment