public class MenuProxy extends MPlatformProxy
Description:
tokenManagerweixinRequestClient| 构造器和说明 |
|---|
MenuProxy(TokenManager tokenManager) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
createCustomMenu(List<Button> buttons,
MenuMatchRule matchRule)
创建个性化菜单
|
ApiResult |
createMenu(List<Button> buttons)
自定义菜单
|
ApiResult |
deleteCustomMenu(String menuId)
删除个性化菜单
|
ApiResult |
deleteMenu()
删除菜单
|
List<Menu> |
getAllMenu()
查询全部菜单(包含个性化菜单)
|
List<Button> |
getMenu()
查询菜单
|
List<Button> |
matchCustomMenu(String userId)
测试个性化菜单匹配结果
|
getTokenManagerpublic MenuProxy(TokenManager tokenManager)
public ApiResult createMenu(List<Button> buttons) throws WeixinException
buttons - 菜单列表WeixinExceptionButtonpublic List<Button> getMenu() throws WeixinException
WeixinExceptionButtonpublic List<Menu> getAllMenu() throws WeixinException
WeixinExceptionButton,
Menupublic ApiResult deleteMenu() throws WeixinException
WeixinExceptionpublic String createCustomMenu(List<Button> buttons, MenuMatchRule matchRule) throws WeixinException
buttons - 菜单列表matchRule - 匹配规则 至少要有一个匹配信息是不为空WeixinExceptionButtonpublic ApiResult deleteCustomMenu(String menuId) throws WeixinException
WeixinExceptionpublic List<Button> matchCustomMenu(String userId) throws WeixinException
userId - 可以是粉丝的OpenID,也可以是粉丝的微信号。WeixinExceptionButtonCopyright © 2020. All rights reserved.