Sha256: c71c51c91903938215b6419a5bf4c078141f6da5cd2b348246ac890b3890d36e
Contents?: true
Size: 801 Bytes
Versions: 2
Compression:
Stored size: 801 Bytes
Contents
module DingBot module Message # markdown类型 # { # "msgtype": "markdown", # "markdown": { # "title":"杭州天气", # "text": "#### 杭州天气\n" + # "> 9度,西北风1级,空气良89,相对温度73%\n\n" + # "> ![screenshot](http://image.jpg)\n" + # "> ###### 10点20分发布 [天气](http://www.thinkpage.cn/) \n" # } # } class Markdown < Base attr_accessor :title, :text def initialize(title='', text='') @title = title @text = text end def msg_type TYPE::MARKDOWN end def body_params super.merge(markdown: { text: @text, title: @title, }) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dingbot-0.1.1 | lib/dingbot/message/markdown.rb |
dingbot-0.1.0 | lib/dingbot/message/markdown.rb |