class Qywechat::Notifier::QyAPI::API::Message
Attributes
client[R]
Public Class Methods
new()
click to toggle source
# File lib/qywechat/notifier/qy_api/api/message.rb, line 6 def initialize @client = Client.new end
Public Instance Methods
send_groupchat(message)
click to toggle source
# File lib/qywechat/notifier/qy_api/api/message.rb, line 10 def send_groupchat(message) client.post('/cgi-bin/appchat/send', params: { access_token: Qywechat::Notifier::QyAPI.api_token.get_access_token }, json: { chatid: Qywechat::Notifier::QyAPI.chatid, msgtype: 'text', text: { content: message }, safe: 0 }) end