Module: Wechat::Api::Public::Menu
- Included in:
- Wechat::Api::Public
- Defined in:
- app/apis/wechat/api/public/menu.rb
Constant Summary collapse
- BASE =
'https://api.weixin.qq.com/cgi-bin/'
Instance Method Summary collapse
- #add_template(template_id_short, _ = nil) ⇒ Object
- #del_template(template_id) ⇒ Object
- #menu ⇒ Object
- #menu_addconditional(menu) ⇒ Object
- #menu_create(menu) ⇒ Object
- #menu_delconditional(menuid) ⇒ Object
- #menu_delete ⇒ Object
- #menu_trymatch(user_id) ⇒ Object
- #templates ⇒ Object
Instance Method Details
#add_template(template_id_short, _ = nil) ⇒ Object
34 35 36 |
# File 'app/apis/wechat/api/public/menu.rb', line 34 def add_template(template_id_short, _ = nil) post 'template/api_add_template', template_id_short: template_id_short, base: BASE end |
#del_template(template_id) ⇒ Object
38 39 40 |
# File 'app/apis/wechat/api/public/menu.rb', line 38 def del_template(template_id) post 'template/del_private_template', template_id: template_id, base: BASE end |
#menu ⇒ Object
5 6 7 |
# File 'app/apis/wechat/api/public/menu.rb', line 5 def get 'menu/get', base: BASE end |
#menu_addconditional(menu) ⇒ Object
17 18 19 |
# File 'app/apis/wechat/api/public/menu.rb', line 17 def () post 'menu/addconditional', **, base: BASE end |
#menu_create(menu) ⇒ Object
13 14 15 |
# File 'app/apis/wechat/api/public/menu.rb', line 13 def () post 'menu/create', **, base: BASE end |
#menu_delconditional(menuid) ⇒ Object
25 26 27 |
# File 'app/apis/wechat/api/public/menu.rb', line 25 def () post 'menu/delconditional', menuid: , base: BASE end |
#menu_delete ⇒ Object
9 10 11 |
# File 'app/apis/wechat/api/public/menu.rb', line 9 def get 'menu/delete', base: BASE end |
#menu_trymatch(user_id) ⇒ Object
21 22 23 |
# File 'app/apis/wechat/api/public/menu.rb', line 21 def (user_id) post 'menu/trymatch', user_id: user_id, base: BASE end |
#templates ⇒ Object
29 30 31 32 |
# File 'app/apis/wechat/api/public/menu.rb', line 29 def templates r = get 'template/get_all_private_template', base: BASE r['template_list'] end |