Skip to content

Commit

Permalink
Fix docstring for menu.add_conditional API
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 17, 2015
1 parent 9654c87 commit d87ce13
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions wechatpy/client/api/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ def get_menu_info(self):
:return: 返回的 JSON 数据包
"""
return self._get('get_current_selfmenu_info')

def add_conditional(self, menu_data):
"""
创建个性化菜单 ::
client = WeChatClient("id", "secret")
client.menu.addconditional({
client.menu.add_conditional({
"button":[
{
"type":"click",
Expand Down Expand Up @@ -156,8 +156,8 @@ def add_conditional(self, menu_data):
return self._post(
'menu/addconditional',
data=menu_data
)
)

def del_conditional(self, menu_id):
"""
删除个性化菜单
Expand All @@ -173,17 +173,17 @@ def del_conditional(self, menu_id):
'menu/delconditional',
data={'menuid': menu_id}
)

def try_match(self, user_id):
"""
测试个性化菜单匹配结果
详情请参考
http://mp.weixin.qq.com/wiki/0/c48ccd12b69ae023159b4bfaa7c39c20.html
:param user_id: 可以是粉丝的OpenID,也可以是粉丝的微信号。
:param user_id: 可以是粉丝的OpenID,也可以是粉丝的微信号。
:return: 该接口将返回菜单配置
:return: 该接口将返回菜单配置
"""
return self._post(
'menu/trymatch',
Expand Down

0 comments on commit d87ce13

Please sign in to comment.