Class: UmengMessage::Subject
- Inherits:
-
Object
- Object
- UmengMessage::Subject
- Defined in:
- lib/umeng_message/subject.rb
Constant Summary collapse
- CAST_TYPE =
%w|unicast listcast filecast broadcast groupcast customizedcast|
- PUSH_URL =
'http://msg.umeng.com/api/send'
- CHECK_URL =
'http://msg.umeng.com/api/status'
- CANCEL_URL =
'http://msg.umeng.com/api/cancel'
- UPLOAD_URL =
'http://msg.umeng.com/upload'
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#file_id ⇒ Object
readonly
Returns the value of attribute file_id.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#ret ⇒ Object
readonly
Returns the value of attribute ret.
-
#task_id ⇒ Object
readonly
Returns the value of attribute task_id.
Instance Method Summary collapse
- #cancel ⇒ Object
- #check ⇒ Object
-
#initialize(platform, options) ⇒ Subject
constructor
A new instance of Subject.
- #push ⇒ Object
- #upload ⇒ Object
Constructor Details
#initialize(platform, options) ⇒ Subject
Returns a new instance of Subject.
13 14 15 16 |
# File 'lib/umeng_message/subject.rb', line 13 def initialize(platform, ) @platform = platform @options = end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
6 7 8 |
# File 'lib/umeng_message/subject.rb', line 6 def content @content end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
6 7 8 |
# File 'lib/umeng_message/subject.rb', line 6 def error_code @error_code end |
#file_id ⇒ Object (readonly)
Returns the value of attribute file_id.
6 7 8 |
# File 'lib/umeng_message/subject.rb', line 6 def file_id @file_id end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
6 7 8 |
# File 'lib/umeng_message/subject.rb', line 6 def payload @payload end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
6 7 8 |
# File 'lib/umeng_message/subject.rb', line 6 def platform @platform end |
#ret ⇒ Object (readonly)
Returns the value of attribute ret.
6 7 8 |
# File 'lib/umeng_message/subject.rb', line 6 def ret @ret end |
#task_id ⇒ Object (readonly)
Returns the value of attribute task_id.
6 7 8 |
# File 'lib/umeng_message/subject.rb', line 6 def task_id @task_id end |
Instance Method Details
#cancel ⇒ Object
26 27 28 |
# File 'lib/umeng_message/subject.rb', line 26 def cancel post_youmeng(CANCEL_URL, Params.cancel_params(@platform, @options['task_id'])) end |
#check ⇒ Object
22 23 24 |
# File 'lib/umeng_message/subject.rb', line 22 def check post_youmeng(CHECK_URL, Params.check_params(@platform, @options['task_id'])) end |
#push ⇒ Object
18 19 20 |
# File 'lib/umeng_message/subject.rb', line 18 def push post_youmeng(PUSH_URL, Params.push_params(@platform, @options)) end |
#upload ⇒ Object
30 31 32 |
# File 'lib/umeng_message/subject.rb', line 30 def upload post_youmeng(UPLOAD_URL, Params.upload_params(@platform, @options['content'])) end |