Class: Lhj::Dingtalk
- Inherits:
-
Object
- Object
- Lhj::Dingtalk
- Defined in:
- lib/lhj/helper/dingtalk_helper.rb
Overview
pgyer upload
Class Method Summary collapse
Class Method Details
.post_message(title, message) ⇒ Object
8 9 10 11 12 |
# File 'lib/lhj/helper/dingtalk_helper.rb', line 8 def self.(title, ) robot_url = Lhj::DingTalkConfig.dingtalk_robot http_body = { 'msgtype' => 'markdown', 'markdown' => { 'title' => title, 'text' => } }.to_json Net::HTTP.post(URI(robot_url), http_body, 'Content-Type' => 'application/json') end |