Module: Umengo::Req
Instance Method Summary collapse
- #broadcast(opts) ⇒ Object
- #listcast(device_tokens, opts) ⇒ Object
- #unicast(device_tokens, opts) ⇒ Object
Methods included from Service
Methods included from Util
Instance Method Details
#broadcast(opts) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/umengo/req.rb', line 7 def broadcast(opts) basic_data = { type: 'broadcast', production_mode: opts[:production_mode] || "false" } opts[:data] = opts.fetch(:data, {}).merge(basic_data) push(@plantform, opts) end |
#listcast(device_tokens, opts) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/umengo/req.rb', line 28 def listcast(device_tokens, opts) basic_data = { device_tokens: device_tokens, type: 'listcast', production_mode: opts[:production_mode] || "false" } opts[:data] = opts.fetch(:data, {}).merge(basic_data) push(@plantform, opts) end |
#unicast(device_tokens, opts) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/umengo/req.rb', line 17 def unicast(device_tokens, opts) basic_data = { device_tokens: device_tokens, type: 'unicast', production_mode: opts[:production_mode] || "false" } opts[:data] = opts.fetch(:data, {}).merge(basic_data) push(@plantform, opts) end |