Class: WorkWechatBot
- Inherits:
-
LogRecordBot
- Object
- LogRecordBot
- WorkWechatBot
- Defined in:
- app/models/concerns/work_wechat_bot.rb
Instance Attribute Summary
Attributes inherited from LogRecordBot
Instance Method Summary collapse
Methods inherited from LogRecordBot
#add_column, #add_paragraph, #add_section, #initialize, #link_more, #set_content
Constructor Details
This class inherits a constructor from LogRecordBot
Instance Method Details
#body ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/models/concerns/work_wechat_bot.rb', line 9 def body { msgtype: 'markdown', markdown: { content: content } } end |
#send_message ⇒ Object
3 4 5 6 7 |
# File 'app/models/concerns/work_wechat_bot.rb', line 3 def url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=#{RailsCom.config.notify_key}" HTTPX.post(url, json: body) end |