Module: Umeng::Services
Instance Method Summary collapse
-
#cancel(task_id) ⇒ Object
取消任务 POST msg.umeng.com/api/cancel?sign=mysign.
-
#push(params = {}) ⇒ Object
消息发送 POST msg.umeng.com/api/send?sign=mysign.
-
#status(task_id) ⇒ Object
查看状态 POST msg.umeng.com/api/status?sign=mysign.
Methods included from Util
Instance Method Details
#cancel(task_id) ⇒ Object
取消任务 POST msg.umeng.com/api/cancel?sign=mysign
32 33 34 35 36 37 38 39 40 |
# File 'lib/umeng/services.rb', line 32 def cancel(task_id) uri = 'api/cancel' params = { appkey: @appkey, timestamp: Time.now.to_i, task_id: task_id } request(uri, params) end |
#push(params = {}) ⇒ Object
消息发送 POST msg.umeng.com/api/send?sign=mysign
9 10 11 12 13 14 15 16 |
# File 'lib/umeng/services.rb', line 9 def push(params={}) uri = 'api/send' params.merge!({ appkey: @appkey, timestamp: Time.now.to_i }) request(uri, params) end |
#status(task_id) ⇒ Object
查看状态 POST msg.umeng.com/api/status?sign=mysign
20 21 22 23 24 25 26 27 28 |
# File 'lib/umeng/services.rb', line 20 def status(task_id) uri = 'api/status' params = { appkey: @appkey, timestamp: Time.now.to_i, task_id: task_id } request(uri, params) end |