Gaurun
.push
POST /push
client = Gaurun::Client.new
notification = Gaurun::Notification.new(message: 'this is test message')
notification.ios.token = ['device_token1', 'device_token2']
notification.ios.badge = 10
notification.ios.extend = { hoge: 'piyo' }
notification.android.token = ['registration_id1', 'registration_id2']
notification.android.extend = { foo: 'bar' }
res = client.push(notification)
p res.body
.parallel_push
client = Gaurun::Client.new
notifications = 10.times.map do
notification = Gaurun::Notification.new(message: 'hoge')
...
notification
end
res = client.parallel_push(notifications)
p res.map(&:body)
.stat_go
GET /stat/go
client = Gaurun::Client.new
res = client.stat_go
p res.body
.stat_app
GET /stat/app
client = Gaurun::Client.new
res = client.stat_app
p res.body
.config_pushers
PUT /config/pushers
client = Gaurun::Client.new
res = client.config_pushers(24)
p res.body