Class: Renren2::Interface::Notifications
- Defined in:
- lib/renren2/interface/notifications.rb
Overview
Notifications Interface
Instance Method Summary collapse
-
#send(to_ids, notification) ⇒ Object
test failed: to_ids set to nil, failed..
-
#send_email(template_id, recipients, template_data, opts = {}) ⇒ Object
no test 给你的用户发送Email.
Methods inherited from Base
#check_scope, #get, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Renren2::Interface::Base
Instance Method Details
#send(to_ids, notification) ⇒ Object
test failed: to_ids set to nil, failed.. 给当前登录者的好友或也安装了同样应用的用户发通知
19 20 21 |
# File 'lib/renren2/interface/notifications.rb', line 19 def send(to_ids, notification) post 'notifications.send', :body => {:to_ids => to_ids, :notification => notification} end |
#send_email(template_id, recipients, template_data, opts = {}) ⇒ Object
Note:
require “email” scope
no test 给你的用户发送Email
35 36 37 38 39 40 |
# File 'lib/renren2/interface/notifications.rb', line 35 def send_email(template_id, recipients, template_data, opts={}) check_scope "email" post 'notifications.sendEmail', :body => {:template_id => template_id, :recipients => recipients, :template_data => template_data}.merge(opts) end |