Skip to content

Commit

Permalink
更新 WeChatUser 文档链接 (#709)
Browse files Browse the repository at this point in the history
Co-authored-by: yaoqiankun <yaoqiankun@datarc.cn>
  • Loading branch information
yqkcn and yaoqiankun committed Mar 18, 2022
1 parent 9e9ccc9 commit feab632
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions wechatpy/work/client/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class WeChatUser(BaseWeChatAPI):
"""
成员管理
https://work.weixin.qq.com/api/doc#90000/90135/90194
https://developer.work.weixin.qq.com/document/path/90195
邀请成员接口位于 `WeChatBatch.invite`
"""
Expand Down Expand Up @@ -54,7 +54,7 @@ def get(self, user_id):
"""
读取成员
https://work.weixin.qq.com/api/doc#90000/90135/90196
https://developer.work.weixin.qq.com/document/path/90196
"""
return self._get("user/get", params={"userid": user_id})

Expand All @@ -76,7 +76,7 @@ def update(
"""
更新成员
https://work.weixin.qq.com/api/doc#90000/90135/90197
https://developer.work.weixin.qq.com/document/path/90197
"""
user_data = optionaldict()
user_data["userid"] = user_id
Expand All @@ -98,24 +98,24 @@ def delete(self, user_id):
"""
删除成员
https://work.weixin.qq.com/api/doc#90000/90135/90198
https://developer.work.weixin.qq.com/document/path/90198
"""
return self._get("user/delete", params={"userid": user_id})

def batch_delete(self, user_ids):
"""
批量删除成员
https://work.weixin.qq.com/api/doc#90000/90135/90199
https://developer.work.weixin.qq.com/document/path/90199
"""
return self._post("user/batchdelete", data={"useridlist": user_ids})

def list(self, department_id, fetch_child=False, status=0, simple=False):
"""
批量获取部门成员 / 批量获取部门成员详情
https://work.weixin.qq.com/api/doc#90000/90135/90200
https://work.weixin.qq.com/api/doc#90000/90135/90201
https://developer.work.weixin.qq.com/document/path/90200
https://developer.work.weixin.qq.com/document/path/90201
此接口和 `WeChatDepartment.get_users` 是同一个接口,区别为 simple 的默认值不同。
"""
Expand All @@ -134,7 +134,7 @@ def convert_to_openid(self, user_id, agent_id=None):
"""
user_id 转成 openid
https://work.weixin.qq.com/api/doc#90000/90135/90202
https://developer.work.weixin.qq.com/document/path/90202
:param user_id: 企业微信内的成员 ID
:param agent_id: 可选,需要发送红包的应用ID,若只是使用微信支付和企业转账,则无需该参数
Expand All @@ -147,7 +147,7 @@ def convert_to_user_id(self, openid):
"""
openid 转成 user_id
https://work.weixin.qq.com/api/doc#90000/90135/90202
https://developer.work.weixin.qq.com/document/path/90202
:param openid: 在使用微信支付、微信红包和企业转账之后,返回结果的openid
:return: 该 openid 在企业微信中对应的成员 user_id
Expand All @@ -159,7 +159,7 @@ def verify(self, user_id):
"""
二次验证
https://work.weixin.qq.com/api/doc#90000/90135/90203
https://developer.work.weixin.qq.com/document/path/90203
:param user_id: 成员UserID。对应管理端的帐号
"""
Expand All @@ -180,7 +180,7 @@ def get_join_qrcode(self, size_type: Optional[int] = None) -> str:
4: 2052 x 2052
:return: 二维码链接
.. _接口文档: https://work.weixin.qq.com/api/doc/90000/90135/91714
.. _接口文档: https://developer.work.weixin.qq.com/document/path/91714
.. warning:: 使用本接口请确保开启了 **通讯录同步** 的API接口同步,并使用
**通讯录同步** 的 ``secret``,否则调用接口时会出现错误。
Expand All @@ -198,7 +198,7 @@ def get_active_stat(self, date: str) -> int:
:param date: 具体某天的活跃人数,最长支持获取30天前数据。格式为: ``YYYY-MM-DD``。
:return: 成员活跃数量
.. _接口文档:: https://work.weixin.qq.com/api/doc/90000/90135/92714
.. _接口文档:: https://developer.work.weixin.qq.com/document/path/92714
.. warning:: 仅通讯录同步助手可调用。
"""
Expand Down

0 comments on commit feab632

Please sign in to comment.