Class: Wechat::ApiBase
- Inherits:
-
Object
- Object
- Wechat::ApiBase
- Defined in:
- lib/wechat/api_base.rb
Constant Summary collapse
- MP_BASE =
'https://mp.weixin.qq.com/cgi-bin/'
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
5 6 7 |
# File 'lib/wechat/api_base.rb', line 5 def access_token @access_token end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/wechat/api_base.rb', line 5 def client @client end |
Instance Method Details
#callbackip ⇒ Object
9 10 11 |
# File 'lib/wechat/api_base.rb', line 9 def callbackip get 'getcallbackip' end |
#qrcode(ticket) ⇒ Object
13 14 15 |
# File 'lib/wechat/api_base.rb', line 13 def qrcode(ticket) client.get 'showqrcode', ticket: CGI.escape(ticket), base: MP_BASE, as: :file end |