Class: Wxapi
- Inherits:
-
Object
- Object
- Wxapi
- Includes:
- AccessToken, Account, Aes, Attach, Kf, Material, Menu, Misc, Qrcode, Remark, Tag, Tp, User, Utils
- Defined in:
- lib/wxapi/aes.rb,
lib/wxapi.rb,
lib/wxapi/tag.rb,
lib/wxapi/menu.rb,
lib/wxapi/misc.rb,
lib/wxapi/user.rb,
lib/wxapi/utils.rb,
lib/wxapi/attach.rb,
lib/wxapi/qrcode.rb,
lib/wxapi/remark.rb,
lib/wxapi/account.rb,
lib/wxapi/version.rb,
lib/wxapi/material.rb,
lib/wxapi/kf_message.rb,
lib/wxapi/access_token.rb,
lib/wxapi/templet_message.rb
Overview
微信公众号模板消息相关接口 (About templet message of wechat public) Created by zhangmingxin Date: 2018-05-17 Wechat number: zmx119966
Defined Under Namespace
Modules: AccessToken, Account, Aes, Attach, Kf, Material, Menu, Misc, Qrcode, Remark, Tag, Tp, User, Utils
Constant Summary collapse
- VERSION =
"1.0.9"
Instance Attribute Summary collapse
-
#access_token_cache ⇒ Object
默认不缓存 access_token, access_token_cache = True 缓存 => example wechat_api = WechatPublicApi.new appid: ‘xx’, app_secret: ‘xx’, access_token_cache: true wechat_api.app_id – get appid.
-
#app_id ⇒ Object
默认不缓存 access_token, access_token_cache = True 缓存 => example wechat_api = WechatPublicApi.new appid: ‘xx’, app_secret: ‘xx’, access_token_cache: true wechat_api.app_id – get appid.
-
#app_secret ⇒ Object
默认不缓存 access_token, access_token_cache = True 缓存 => example wechat_api = WechatPublicApi.new appid: ‘xx’, app_secret: ‘xx’, access_token_cache: true wechat_api.app_id – get appid.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Wxapi
constructor
A new instance of Wxapi.
Methods included from Qrcode
Methods included from Misc
Methods included from Remark
Methods included from Tag
#delete_tag, #new_tag, #tag_users, #tags, #tags_of_user, #untag_users, #update_tag, #users_of_tags
Methods included from Attach
Methods included from User
#batch_black_list, #batch_user_detail, #batchunblacklist, #get_black_list, #get_userinfo, #user_list
Methods included from Tp
#post_template_message, #tp_delete_template, #tp_general_message, #tp_get_all, #tp_miniprogram_message
Methods included from Menu
#create_menu, #delete_menu, #query_menu
Methods included from Material
#upload_image_material, #upload_image_media
Methods included from Kf
#kf_image_message, #kf_mpnews_message, #kf_news_message, #kf_text_message, #kf_voice_message, #post_customer_message
Methods included from Aes
Methods included from Account
#get_qrscene, #get_qrsrtscene, #get_shorturl, #save_qrcode
Methods included from AccessToken
Constructor Details
#initialize(options = {}) ⇒ Wxapi
Returns a new instance of Wxapi.
47 48 49 50 51 52 53 |
# File 'lib/wxapi.rb', line 47 def initialize(={}) @app_id = [:app_id] @app_secret = [:app_secret] @access_token_cache = [:access_token_cache] @prefix = [:prefix] @prefix="https://api.weixin.qq.com" if @prefix.nil? end |
Instance Attribute Details
#access_token_cache ⇒ Object
默认不缓存 access_token, access_token_cache = True 缓存
> example
wechat_api = WechatPublicApi.new appid: ‘xx’, app_secret: ‘xx’, access_token_cache: true wechat_api.app_id – get appid
api.get_access_token
45 46 47 |
# File 'lib/wxapi.rb', line 45 def access_token_cache @access_token_cache end |
#app_id ⇒ Object
默认不缓存 access_token, access_token_cache = True 缓存
> example
wechat_api = WechatPublicApi.new appid: ‘xx’, app_secret: ‘xx’, access_token_cache: true wechat_api.app_id – get appid
api.get_access_token
45 46 47 |
# File 'lib/wxapi.rb', line 45 def app_id @app_id end |
#app_secret ⇒ Object
默认不缓存 access_token, access_token_cache = True 缓存
> example
wechat_api = WechatPublicApi.new appid: ‘xx’, app_secret: ‘xx’, access_token_cache: true wechat_api.app_id – get appid
api.get_access_token
45 46 47 |
# File 'lib/wxapi.rb', line 45 def app_secret @app_secret end |
#prefix ⇒ Object
Returns the value of attribute prefix.
46 47 48 |
# File 'lib/wxapi.rb', line 46 def prefix @prefix end |