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

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


5
6
7
# File 'app/apis/wechat/api/public/menu.rb', line 5

def menu
  get 'menu/get', base: BASE
end


17
18
19
# File 'app/apis/wechat/api/public/menu.rb', line 17

def menu_addconditional(menu)
  post 'menu/addconditional', **menu, base: BASE
end


13
14
15
# File 'app/apis/wechat/api/public/menu.rb', line 13

def menu_create(menu)
  post 'menu/create', **menu, base: BASE
end


25
26
27
# File 'app/apis/wechat/api/public/menu.rb', line 25

def menu_delconditional(menuid)
  post 'menu/delconditional', menuid: menuid, base: BASE
end


9
10
11
# File 'app/apis/wechat/api/public/menu.rb', line 9

def menu_delete
  get 'menu/delete', base: BASE
end


21
22
23
# File 'app/apis/wechat/api/public/menu.rb', line 21

def menu_trymatch(user_id)
  post 'menu/trymatch', user_id: user_id, base: BASE
end

#templatesObject



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