优化工单模块,增加企微模块

This commit is contained in:
mgw
2024-07-10 15:58:47 +08:00
parent e8512b23e4
commit 6b140fe6dd
134 changed files with 12830 additions and 2 deletions

View File

@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from wechatpy.client.api.base import BaseWeChatAPI
class WeChatService(BaseWeChatAPI):
def get_provider_token(self, provider_secret):
"""
获取应用提供商凭证
详情请参考
http://qydev.weixin.qq.com/wiki/index.php?title=获取应用提供商凭证
:param provider_secret: 提供商的secret在提供商管理页面可见
:return: 返回的 JSON 数据包
"""
return self._post(
'service/get_provider_token',
data={
'corpid': self._client.corp_id,
'provider_secret': provider_secret,
}
)
def get_login_info(self, provider_access_token, auth_code):
"""
获取企业号管理员登录信息
详情请参考
http://qydev.weixin.qq.com/wiki/index.php?title=获取企业号管理员登录信息
:param provider_access_token: 服务提供商的 accesstoken
:param auth_code: OAuth 2.0 授权企业号管理员登录产生的 code
:return: 返回的 JSON 数据包
"""
return self._post(
'service/get_login_info',
params={
'provider_access_token': provider_access_token,
},
data={
'auth_code': auth_code,
}
)