summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/etc/push.js
blob: 0db5c1a23cfa9f73e3b59ba7cd324c8276e19eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var push = (function(){
  var appId
  var clientKey
  var push = {}
  push.init = function(){
    parsePlugin.initialize(appId, clientKey, push.subscribe, push.error)
  }
  push.subscribe = function() {
    parsePlugin.subscribe('SampleChannel', push.did_subscribe, push.error)
  }
  push.did_subscribe = function(){
    // parsePlugin.getInstallationId(function(id) {
    //   var install_data = {
    //     installation_id: id,
    //     channels: ['SampleChannel']
    //   }
    // }, push.error)
  }
  push.error = function(e){
    console.log("push error")
  }
  
  return push
})()