class DingBot::Message::Markdown
markdown类型 {
"msgtype": "markdown", "markdown": { "title":"杭州天气", "text": "#### 杭州天气\n" + "> 9度,西北风1级,空气良89,相对温度73%\n\n" + "> \n" + "> ###### 10点20分发布 [天气](http://www.thinkpage.cn/) \n" }, "at": { "atMobiles": [ "1825718XXXX" ], "isAtAll": false }
}
Attributes
at_mobiles[RW]
is_at_all[RW]
text[RW]
title[RW]
Public Class Methods
new(title='', text='', at_mobiles=[], is_at_all=false)
click to toggle source
# File lib/dingbot/message/markdown.rb, line 24 def initialize(title='', text='', at_mobiles=[], is_at_all=false) @title = title @text = text @at_mobiles = at_mobiles @is_at_all = is_at_all end
Public Instance Methods
body_params()
click to toggle source
Calls superclass method
DingBot::Message::Base#body_params
# File lib/dingbot/message/markdown.rb, line 35 def body_params super.merge({ markdown: { text: @text, title: @title, }, at: { atMobiles: @at_mobiles, isAtAll: @is_at_all } } ) end
msg_type()
click to toggle source
# File lib/dingbot/message/markdown.rb, line 31 def msg_type TYPE::MARKDOWN end