Module: WxExt::Api::CustomerService
- Extended by:
- CustomerService
- Included in:
- CustomerService
- Defined in:
- lib/wx_ext/api/customer_service.rb
Overview
User api of weixin.
Instance Method Summary collapse
-
#reply_msg(access_token, to_user_openid, msg_type, msg_hash) ⇒ Hash
Reply msg via post.
Instance Method Details
#reply_msg(access_token, to_user_openid, msg_type, msg_hash) ⇒ Hash
Reply msg via post.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/wx_ext/api/customer_service.rb', line 21 def reply_msg(access_token, to_user_openid, msg_type, msg_hash) url = 'https://api.weixin.qq.com/cgi-bin/message/custom/send'\ "?access_token=#{access_token}" msg_hash = { :touser => to_user_openid, :msgtype => msg_type, "#{msg_type}".to_sym => msg_hash } Helper.http_post(url, msg_hash.to_json) end |