mirror of
https://github.com/capricornxl/ad-password-self-service.git
synced 2025-08-11 16:20:10 +08:00
### 本次升级、修复,请使用最新版:
+ 升级Python版本为3.8 + 升级Django到3.2 + 修复用户名中使用\被转义的问题 + 重写了dingding模块,因为dingding开发者平台接口鉴权的一些变动,之前的一些接口不能再使用,本次重写。 + 重写了ad模块,修改账号的一些判断逻辑。 + 重写了用户账号的格式兼容,现在用户账号可以兼容:username、DOMAIN\username、username@abc.com这三种格式。 + 优化了整体的代码逻辑,去掉一些冗余重复的代码。
This commit is contained in:
213
utils/ad_ops.py
Normal file
213
utils/ad_ops.py
Normal file
@@ -0,0 +1,213 @@
|
||||
from ldap3 import *
|
||||
from ldap3.core.exceptions import LDAPInvalidCredentialsResult, LDAPOperationResult
|
||||
from ldap3.core.results import *
|
||||
from ldap3.utils.dn import safe_dn
|
||||
|
||||
from pwdselfservice.local_settings import *
|
||||
|
||||
"""
|
||||
根据以下网站的说明:
|
||||
https://docs.microsoft.com/zh-cn/troubleshoot/windows/win32/change-windows-active-directory-user-password
|
||||
密码存储在 unicodePwd 属性中的用户对象的 AD 和 LDS 数据库中。 此属性可以在受限条件下写入,但无法读取。 只能修改属性;无法在对象创建时或由搜索查询时添加它。
|
||||
为了修改此属性,客户端必须具有到服务器的 128 位传输层安全性 (TLS) /Secure Socket Layer (SSL) 连接。
|
||||
使用 SSP 创建的会话密钥(使用 NTLM 或 Kerberos)的加密会话也可接受,只要达到最小密钥长度。
|
||||
若要使用 TLS/SSL 实现此连接:
|
||||
服务器必须拥有 128 位 RSA 连接的服务器证书。
|
||||
客户端必须信任生成服务器证书 (CA) 证书颁发机构。
|
||||
客户端和服务器都必须能够进行 128 位加密。
|
||||
|
||||
unicodePwd 属性的语法为 octet-string;但是,目录服务预期八进制字符串将包含 UNICODE 字符串 (,因为属性的名称指示) 。
|
||||
这意味着在 LDAP 中传递的此属性的任何值都必须是 BER 编码的 UNICODE 字符串 (基本编码规则) 八进制字符串。
|
||||
此外,UNICODE 字符串必须以引号开头和结尾,这些引号不是所需密码的一部分。
|
||||
|
||||
可通过两种方法修改 unicodePwd 属性。 第一种操作类似于正常的 用户更改密码 操作。
|
||||
在这种情况下,修改请求必须同时包含删除和添加操作。 删除操作必须包含当前密码,并包含其周围的引号。
|
||||
添加操作必须包含所需的新密码,其周围必须有引号。
|
||||
|
||||
修改此属性的第二种方法类似于管理员重置用户密码。 为此,客户端必须以具有修改其他用户密码的足够权限的用户进行绑定。
|
||||
此修改请求应包含单个替换操作,其中包含用引号括起的新所需密码。 如果客户端具有足够的权限,则无论旧密码是什么,此密码都将变为新密码。
|
||||
"""
|
||||
|
||||
|
||||
class AdOps(object):
|
||||
|
||||
def __init__(self, auto_bind=True, use_ssl=AD_USE_SSL, port=AD_CONN_PORT, domain=AD_DOMAIN, user=AD_LOGIN_USER, password=AD_LOGIN_USER_PWD,
|
||||
authentication=NTLM):
|
||||
"""
|
||||
AD连接器 authentication [SIMPLE, ANONYMOUS, SASL, NTLM]
|
||||
:return:
|
||||
|
||||
"""
|
||||
self.use_ssl = use_ssl
|
||||
self.port = port
|
||||
self.domain = domain
|
||||
self.user = user
|
||||
self.password = password
|
||||
self.authentication = authentication
|
||||
self.auto_bind = auto_bind
|
||||
|
||||
server = Server(host='%s' % AD_HOST, use_ssl=self.use_ssl, port=port, get_info=ALL)
|
||||
try:
|
||||
self.conn = Connection(server, auto_bind=self.auto_bind, user=r'{}\{}'.format(self.domain, self.user), password=self.password,
|
||||
authentication=self.authentication, raise_exceptions=True)
|
||||
except LDAPOperationResult as e:
|
||||
raise LDAPOperationResult("LDAPOperationResult: " + str(e))
|
||||
except Exception:
|
||||
raise Exception('出现错误:无法连接到AD控制器。')
|
||||
|
||||
def ad_auth_user(self, username, password):
|
||||
"""
|
||||
验证账号
|
||||
:param username:
|
||||
:param password:
|
||||
:return: True or False
|
||||
"""
|
||||
try:
|
||||
server = Server(host='%s' % AD_HOST, use_ssl=self.use_ssl, port=self.port, get_info=ALL)
|
||||
c_auth = Connection(server=server, user=r'{}\{}'.format(self.domain, username), password=password, auto_bind=True, raise_exceptions=True)
|
||||
c_auth.unbind()
|
||||
return True, '旧密码验证通过。'
|
||||
except LDAPInvalidCredentialsResult as e:
|
||||
if '52e' in e.message:
|
||||
return False, u'账号或旧密码不正确!'
|
||||
elif '775' in e.message:
|
||||
return False, u'账号已锁定,请自行扫码解锁!'
|
||||
elif '533' in e.message:
|
||||
return False, u'账号已禁用!'
|
||||
elif '525' in e.message:
|
||||
return False, u'账号不存在!'
|
||||
elif '532' in e.message:
|
||||
return False, u'密码己过期!'
|
||||
elif '701' in e.message:
|
||||
return False, u'账号己过期!'
|
||||
elif '773' in e.message:
|
||||
# 如果仅仅使用普通凭据来绑定ldap用途,请返回False, 让用户通过其他途径修改密码后再来验证登陆
|
||||
# return False, '用户登陆前必须修改密码!'
|
||||
# 设置该账号下次登陆不需要更改密码,再验证一次
|
||||
self.conn.search(search_base=BASE_DN, search_filter='(sAMAccountName={}))'.format(username), attributes=['pwdLastSet'])
|
||||
self.conn.modify(self.conn.entries[0].entry_dn, {'pwdLastSet': [(MODIFY_REPLACE, ['-1'])]})
|
||||
return self.ad_auth_user(username, password)
|
||||
else:
|
||||
return False, u'旧密码认证失败,请确认账号的旧密码是否正确或使用重置密码功能。'
|
||||
|
||||
def ad_ensure_user_by_account(self, username):
|
||||
"""
|
||||
通过username查询某个用户是否在AD中
|
||||
:param username:
|
||||
:return: True or False
|
||||
"""
|
||||
base_dn = BASE_DN
|
||||
condition = '(&(objectclass=user)(sAMAccountName={}))'.format(username)
|
||||
attributes = ['sAMAccountName']
|
||||
return self.conn.search(base_dn, condition, attributes=attributes)
|
||||
|
||||
def ad_get_user_displayname_by_account(self, username):
|
||||
"""
|
||||
通过username查询某个用户的显示名
|
||||
:param username:
|
||||
:return: user_displayname
|
||||
"""
|
||||
self.conn.search(BASE_DN, '(&(objectclass=user)(sAMAccountName={}))'.format(username), attributes=['name'])
|
||||
try:
|
||||
return True, self.conn.entries[0]['name']
|
||||
except Exception as e:
|
||||
return False, str(e)
|
||||
|
||||
def ad_get_user_dn_by_account(self, username):
|
||||
"""
|
||||
通过mail查询某个用户的完整DN
|
||||
:param username:
|
||||
:return: DN
|
||||
"""
|
||||
self.conn.search(BASE_DN, '(&(objectclass=user)(sAMAccountName={}))'.format(username), attributes=['distinguishedName'])
|
||||
return str(self.conn.entries[0]['distinguishedName'])
|
||||
|
||||
def ad_get_user_status_by_account(self, username):
|
||||
"""
|
||||
通过username查询某个用户的账号状态
|
||||
:param username:
|
||||
:return: user_account_control code
|
||||
"""
|
||||
self.conn.search(BASE_DN, '(&(objectclass=user)(sAMAccountName={}))'.format(username), attributes=['userAccountControl'])
|
||||
return self.conn.entries[0]['userAccountControl']
|
||||
|
||||
def ad_unlock_user_by_account(self, username):
|
||||
"""
|
||||
通过username解锁某个用户
|
||||
:param username:
|
||||
:return:
|
||||
"""
|
||||
user_dn = self.ad_get_user_dn_by_account(username)
|
||||
try:
|
||||
return True, self.conn.extend.microsoft.unlock_account(user='%s' % user_dn)
|
||||
except Exception as e:
|
||||
return False, str(e)
|
||||
|
||||
def ad_reset_user_pwd_by_account(self, username, new_password):
|
||||
"""
|
||||
重置某个用户的密码
|
||||
:param username:
|
||||
:return:
|
||||
"""
|
||||
user_dn = self.ad_get_user_dn_by_account(username)
|
||||
if self.conn.check_names:
|
||||
user_dn = safe_dn(user_dn)
|
||||
encoded_new_password = ('"%s"' % new_password).encode('utf-16-le')
|
||||
result = self.conn.modify(user_dn,
|
||||
{'unicodePwd': [(MODIFY_REPLACE, [encoded_new_password])]},
|
||||
)
|
||||
|
||||
if not self.conn.strategy.sync:
|
||||
_, result = self.conn.get_response(result)
|
||||
else:
|
||||
if self.conn.strategy.thread_safe:
|
||||
_, result, _, _ = result
|
||||
else:
|
||||
result = self.conn.result
|
||||
|
||||
# change successful, returns True
|
||||
if result['result'] == RESULT_SUCCESS:
|
||||
return True, '密码己修改成功,请妥善保管!'
|
||||
|
||||
# change was not successful, raises exception if raise_exception = True in connection or returns the operation result, error code is in result['result']
|
||||
if self.conn.raise_exceptions:
|
||||
from ldap3.core.exceptions import LDAPOperationResult
|
||||
_msg = LDAPOperationResult(result=result['result'], description=result['description'], dn=result['dn'], message=result['message'],
|
||||
response_type=result['type'])
|
||||
return False, _msg
|
||||
return False, result['result']
|
||||
|
||||
def ad_get_user_locked_status_by_account(self, username):
|
||||
"""
|
||||
通过mail获取某个用户账号是否被锁定
|
||||
:param username:
|
||||
:return: 如果结果是1601-01-01说明账号未锁定,返回0
|
||||
"""
|
||||
self.conn.search(BASE_DN, '(&(objectclass=user)(sAMAccountName={}))'.format(username), attributes=['lockoutTime'])
|
||||
locked_status = self.conn.entries[0]['lockoutTime']
|
||||
if '1601-01-01' in str(locked_status):
|
||||
return 0
|
||||
else:
|
||||
return locked_status
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# server = Server(host='%s' % AD_HOST, use_ssl=AD_USE_SSL, port=AD_CONN_PORT, get_info=ALL)
|
||||
# conn = Connection(server, auto_bind=True, user=str(AD_LOGIN_USER).lower(), password=AD_LOGIN_USER_PWD, authentication=SIMPLE)
|
||||
# # conn.bind()
|
||||
# # conn.search(BASE_DN, '(&(objectclass=user)(sAMAccountName=xiangle))', attributes=['name'])
|
||||
# # print(conn.entries[0])
|
||||
# print(conn.result)
|
||||
|
||||
# conn = _ad_connect()
|
||||
user = 'zhangsan'
|
||||
old_password = 'K2dhhuT1Zf11111cnJ1ollC3y'
|
||||
# old_password = 'L1qyrmZDUFeYW1OIualjlNhr4'
|
||||
new_password = 'K2dhhuT1Zf11111cnJ1ollC3y'
|
||||
ad_ops = AdOps()
|
||||
# ad_ops = AdOps(user=user, password=old_password)
|
||||
status, msg = ad_ops.ad_auth_user(username=user, password=old_password)
|
||||
print(msg)
|
||||
if status:
|
||||
res = ad_ops.ad_reset_user_pwd_by_account(user, new_password)
|
||||
print(res)
|
29
utils/crypto.py
Normal file
29
utils/crypto.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
import random
|
||||
|
||||
try:
|
||||
from cryptography.fernet import Fernet
|
||||
except ImportError:
|
||||
os.system('pip3 install cryptography')
|
||||
from cryptography.fernet import Fernet
|
||||
|
||||
|
||||
class Crypto(object):
|
||||
"""docstring for ClassName"""
|
||||
def __init__(self, key):
|
||||
self.factory = Fernet(key)
|
||||
|
||||
# 加密
|
||||
def encrypt(self, string):
|
||||
token = str(self.factory.encrypt(string.encode('utf-8')), 'utf-8')
|
||||
return token
|
||||
|
||||
# 解密
|
||||
def decrypt(self, token):
|
||||
string = self.factory.decrypt(bytes(token.encode('utf-8'))).decode('utf-8')
|
||||
return string
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
key = Fernet.generate_key()
|
||||
print(key)
|
114
utils/dingding_ops.py
Normal file
114
utils/dingding_ops.py
Normal file
@@ -0,0 +1,114 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import base64
|
||||
import hmac
|
||||
import time
|
||||
from hashlib import sha256
|
||||
from urllib.parse import quote
|
||||
|
||||
import requests
|
||||
from dingtalk.client import AppKeyClient
|
||||
|
||||
from pwdselfservice.local_settings import DING_APP_KEY, DING_APP_SECRET, DING_CORP_ID, DING_URL, DING_MO_APP_ID, DING_MO_APP_SECRET
|
||||
|
||||
|
||||
class DingDingOps(object):
|
||||
def __init__(self, corp_id=DING_CORP_ID, app_key=DING_APP_KEY, app_secret=DING_APP_SECRET, mo_app_id=DING_MO_APP_ID, mo_app_secret=DING_MO_APP_SECRET):
|
||||
self.corp_id = corp_id
|
||||
self.app_key = app_key
|
||||
self.app_secret = app_secret
|
||||
self.mo_app_id = mo_app_id
|
||||
self.mo_app_secret = mo_app_secret
|
||||
|
||||
@property
|
||||
def ding_client_connect(self):
|
||||
"""
|
||||
钉钉连接器
|
||||
:return:
|
||||
"""
|
||||
return AppKeyClient(corp_id=self.corp_id, app_key=self.app_key, app_secret=self.app_secret)
|
||||
|
||||
@property
|
||||
def ding_get_access_token(self):
|
||||
"""
|
||||
获取企业内部应用的access_token
|
||||
:return:
|
||||
"""
|
||||
return self.ding_client_connect.access_token
|
||||
|
||||
def ding_get_dept_user_list_detail(self, dept_id, offset, size):
|
||||
"""
|
||||
获取部门中的用户列表详细清单
|
||||
:param dept_id: 部门ID
|
||||
:param offset: 偏移量(可理解为步进量)
|
||||
:param size: 一次查询多少个
|
||||
:return:
|
||||
"""
|
||||
return self.ding_client_connect.user.list(department_id=dept_id, offset=offset, size=size)
|
||||
|
||||
def ding_get_union_id_by_code(self, code):
|
||||
"""
|
||||
通过移动应用接入扫码返回的临时授权码,获取用户的unionid
|
||||
:param code:
|
||||
:return:
|
||||
"""
|
||||
# token = self.ding_get_access_token
|
||||
time_stamp = int(round(time.time() * 1000))
|
||||
# 时间戳
|
||||
# 通过appSecret计算出来的签名值,该参数值在HTTP请求参数中需要urlEncode(因为签名中可能包含特殊字符+)。
|
||||
signature = quote(base64.b64encode(hmac.new(
|
||||
self.mo_app_secret.encode('utf-8'),
|
||||
str(time_stamp).encode('utf-8'),
|
||||
digestmod=sha256).digest()).decode("utf-8"))
|
||||
# accessKey 是 登录开发者后台,选择应用开发 > 移动接入应用 > 登录所看到应用的appId。
|
||||
url = '{}/sns/getuserinfo_bycode?accessKey={}&signature={}×tamp={}'.format(DING_URL, self.mo_app_id, signature, time_stamp)
|
||||
resp = requests.post(
|
||||
url=url,
|
||||
json=dict(tmp_auth_code=code),
|
||||
)
|
||||
resp = resp.json()
|
||||
try:
|
||||
return True, resp["user_info"]["unionid"]
|
||||
except Exception as e:
|
||||
return False, 'ding_get_union_id_by_code: {}' .format(e)
|
||||
|
||||
def ding_get_userid_by_union_id(self, union_id):
|
||||
"""
|
||||
通过unionid获取用户的userid
|
||||
:param union_id: 用户在当前钉钉开放平台账号范围内的唯一标识
|
||||
:return:
|
||||
"""
|
||||
try:
|
||||
return True, self.ding_client_connect.user.get_userid_by_unionid(union_id)['userid']
|
||||
except Exception as e:
|
||||
return False, 'ding_get_userid_by_union_id: {}' .format(e)
|
||||
|
||||
@property
|
||||
def ding_get_org_user_count(self):
|
||||
"""
|
||||
企业员工数量
|
||||
only_active – 是否包含未激活钉钉的人员数量
|
||||
:return:
|
||||
"""
|
||||
return self.ding_client_connect.user.get_org_user_count('only_active')
|
||||
|
||||
def ding_get_userinfo_detail(self, user_id):
|
||||
"""
|
||||
通过user_id 获取用户详细信息
|
||||
user_id – 用户ID
|
||||
:return:
|
||||
"""
|
||||
try:
|
||||
return True, self.ding_client_connect.user.get(user_id)
|
||||
except Exception as e:
|
||||
return False, 'ding_get_userinfo_detail: {}' .format(e)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
start = time.time()
|
||||
d = DingDingOps()
|
||||
print(d.ding_get_access_token)
|
||||
# print(d.user.getuserinfo('2ecebee187863a8ea2863a7a2fa17b49'))
|
||||
end = time.time()
|
||||
print("running:" + str(round((end - start), 3)))
|
21
utils/dingtalk_sdk/__init__.py
Normal file
21
utils/dingtalk_sdk/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
Created on 2018-9-17
|
||||
|
||||
@author: xiaoxuan.lp
|
||||
"""
|
||||
|
||||
|
||||
class appinfo(object):
|
||||
def __init__(self, appkey, secret):
|
||||
self.appkey = appkey
|
||||
self.secret = secret
|
||||
|
||||
|
||||
def getDefaultAppInfo():
|
||||
pass
|
||||
|
||||
|
||||
def setDefaultAppInfo(appkey, secret):
|
||||
default = appinfo(appkey, secret)
|
||||
global getDefaultAppInfo
|
||||
getDefaultAppInfo = lambda: default
|
2
utils/dingtalk_sdk/api/__init__.py
Normal file
2
utils/dingtalk_sdk/api/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from api.rest import *
|
||||
from api.base import FileItem
|
332
utils/dingtalk_sdk/api/base.py
Normal file
332
utils/dingtalk_sdk/api/base.py
Normal file
@@ -0,0 +1,332 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Created on 2018-9-17
|
||||
|
||||
@author: xiaoxuan.lp
|
||||
"""
|
||||
|
||||
try:
|
||||
import http.client
|
||||
except ImportError:
|
||||
import http.client as httplib
|
||||
import base64
|
||||
import hashlib
|
||||
import hmac
|
||||
import itertools
|
||||
import json
|
||||
import mimetypes
|
||||
import time
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
'''
|
||||
定义一些系统变量
|
||||
'''
|
||||
|
||||
SYSTEM_GENERATE_VERSION = "taobao-sdk-python-dynamicVersionNo"
|
||||
|
||||
P_APPKEY = "app_key"
|
||||
P_API = "method"
|
||||
P_ACCESS_TOKEN = "access_token"
|
||||
P_VERSION = "v"
|
||||
P_FORMAT = "format"
|
||||
P_TIMESTAMP = "timestamp"
|
||||
P_SIGN = "sign"
|
||||
P_SIGN_METHOD = "sign_method"
|
||||
P_PARTNER_ID = "partner_id"
|
||||
|
||||
P_CODE = 'errcode'
|
||||
P_MSG = 'errmsg'
|
||||
|
||||
|
||||
def sign(secret, parameters):
|
||||
# ===========================================================================
|
||||
# '''签名方法
|
||||
# @param secret: 签名需要的密钥
|
||||
# @param parameters: 支持字典和string两种
|
||||
# '''
|
||||
# ===========================================================================
|
||||
# 如果parameters 是字典类的话
|
||||
if hasattr(parameters, "items"):
|
||||
keys = list(parameters.keys())
|
||||
keys.sort()
|
||||
|
||||
parameters = "%s%s%s" % (secret,
|
||||
str().join('%s%s' % (key, parameters[key]) for key in keys),
|
||||
secret)
|
||||
sign = hashlib.md5(parameters.encode("utf-8")).hexdigest().upper()
|
||||
return sign
|
||||
|
||||
|
||||
def mixStr(pstr):
|
||||
if isinstance(pstr, str):
|
||||
return pstr
|
||||
elif isinstance(pstr, str):
|
||||
return pstr.encode('utf-8')
|
||||
else:
|
||||
return str(pstr)
|
||||
|
||||
|
||||
class FileItem(object):
|
||||
def __init__(self, filename=None, content=None):
|
||||
self.filename = filename
|
||||
self.content = content
|
||||
|
||||
|
||||
class MultiPartForm(object):
|
||||
"""Accumulate the data to be used when posting a form."""
|
||||
|
||||
def __init__(self):
|
||||
self.form_fields = []
|
||||
self.files = []
|
||||
self.boundary = "PYTHON_SDK_BOUNDARY"
|
||||
return
|
||||
|
||||
def get_content_type(self):
|
||||
return 'multipart/form-data;charset=UTF-8; boundary=%s' % self.boundary
|
||||
|
||||
def add_field(self, name, value):
|
||||
"""Add a simple field to the form data."""
|
||||
self.form_fields.append((name, str(value)))
|
||||
return
|
||||
|
||||
def add_file(self, fieldname, filename, fileHandle, mimetype=None):
|
||||
"""Add a file to be uploaded."""
|
||||
body = fileHandle.read()
|
||||
if mimetype is None:
|
||||
mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
|
||||
self.files.append((mixStr(fieldname), mixStr(filename), mixStr(mimetype), mixStr(body)))
|
||||
return
|
||||
|
||||
def __str__(self):
|
||||
"""Return a string representing the form data, including attached files."""
|
||||
# Build a list of lists, each containing "lines" of the
|
||||
# request. Each part is separated by a boundary string.
|
||||
# Once the list is built, return a string where each
|
||||
# line is separated by '\r\n'.
|
||||
parts = []
|
||||
part_boundary = '--' + self.boundary
|
||||
|
||||
# Add the form fields
|
||||
parts.extend(
|
||||
[part_boundary,
|
||||
'Content-Disposition: form-data; name="%s"' % name,
|
||||
'Content-Type: text/plain; charset=UTF-8',
|
||||
'',
|
||||
value,
|
||||
]
|
||||
for name, value in self.form_fields
|
||||
)
|
||||
|
||||
# Add the files to upload
|
||||
parts.extend(
|
||||
[part_boundary,
|
||||
'Content-Disposition: form-data; name="%s"; filename="%s"' % (field_name, filename),
|
||||
'Content-Type: %s' % content_type,
|
||||
'Content-Transfer-Encoding: binary',
|
||||
'',
|
||||
body,
|
||||
]
|
||||
for field_name, filename, content_type, body in self.files
|
||||
)
|
||||
|
||||
# Flatten the list and add closing boundary marker,
|
||||
# then return CR+LF separated data
|
||||
flattened = list(itertools.chain(*parts))
|
||||
flattened.append('--' + self.boundary + '--')
|
||||
flattened.append('')
|
||||
return '\r\n'.join(flattened)
|
||||
|
||||
|
||||
class TopException(Exception):
|
||||
# ===========================================================================
|
||||
# 业务异常类
|
||||
# ===========================================================================
|
||||
def __init__(self):
|
||||
self.errcode = None
|
||||
self.errmsg = None
|
||||
self.application_host = None
|
||||
self.service_host = None
|
||||
|
||||
def __str__(self, *args, **kwargs):
|
||||
sb = "errcode=" + mixStr(self.errcode) + \
|
||||
" errmsg=" + mixStr(self.errmsg) + \
|
||||
" application_host=" + mixStr(self.application_host) + \
|
||||
" service_host=" + mixStr(self.service_host)
|
||||
return sb
|
||||
|
||||
|
||||
class RequestException(Exception):
|
||||
# ===========================================================================
|
||||
# 请求连接异常类
|
||||
# ===========================================================================
|
||||
pass
|
||||
|
||||
|
||||
class RestApi(object):
|
||||
# ===========================================================================
|
||||
# Rest api的基类
|
||||
# ===========================================================================
|
||||
|
||||
def __init__(self, url=None):
|
||||
# =======================================================================
|
||||
# 初始化基类
|
||||
# Args @param domain: 请求的域名或者ip
|
||||
# @param port: 请求的端口
|
||||
# =======================================================================
|
||||
if url is None:
|
||||
raise RequestException("domain must not be empty.")
|
||||
if url.find('http://') >= 0:
|
||||
self.__port = 80
|
||||
pathUrl = url.replace('http://', '')
|
||||
elif url.find('https://') >= 0:
|
||||
self.__port = 443
|
||||
pathUrl = url.replace('https://', '')
|
||||
else:
|
||||
raise RequestException("http protocol is not validate.")
|
||||
|
||||
index = pathUrl.find('/')
|
||||
if index > 0:
|
||||
self.__domain = pathUrl[0:index]
|
||||
self.__path = pathUrl[index:]
|
||||
else:
|
||||
self.__domain = pathUrl
|
||||
self.__path = ''
|
||||
|
||||
# print("domain:" + self.__domain + ",path:" + self.__path + ",port:" + str(self.__port))
|
||||
|
||||
def get_request_header(self):
|
||||
return {
|
||||
'Content-type': 'application/json;charset=UTF-8',
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "Keep-Alive",
|
||||
}
|
||||
|
||||
def getHttpMethod(self):
|
||||
return "GET"
|
||||
|
||||
def getapiname(self):
|
||||
return ""
|
||||
|
||||
def getMultipartParas(self):
|
||||
return []
|
||||
|
||||
def getTranslateParas(self):
|
||||
return {}
|
||||
|
||||
def _check_requst(self):
|
||||
pass
|
||||
|
||||
def getResponse(self, authrize='', accessKey='', accessSecret='', suiteTicket='', corpId='', timeout=30):
|
||||
# =======================================================================
|
||||
# 获取response结果
|
||||
# =======================================================================
|
||||
if self.__port == 443:
|
||||
connection = http.client.HTTPSConnection(self.__domain, self.__port, None, None, timeout)
|
||||
else:
|
||||
connection = http.client.HTTPConnection(self.__domain, self.__port, timeout)
|
||||
sys_parameters = {
|
||||
P_PARTNER_ID: SYSTEM_GENERATE_VERSION,
|
||||
}
|
||||
if authrize is not None:
|
||||
sys_parameters[P_ACCESS_TOKEN] = authrize
|
||||
application_parameter = self.getApplicationParameters()
|
||||
sign_parameter = sys_parameters.copy()
|
||||
sign_parameter.update(application_parameter)
|
||||
|
||||
header = self.get_request_header()
|
||||
if self.getMultipartParas():
|
||||
form = MultiPartForm()
|
||||
for key, value in list(application_parameter.items()):
|
||||
form.add_field(key, value)
|
||||
for key in self.getMultipartParas():
|
||||
fileitem = getattr(self, key)
|
||||
if fileitem and isinstance(fileitem, FileItem):
|
||||
form.add_file(key, fileitem.filename, fileitem.content)
|
||||
body = str(form)
|
||||
header['Content-type'] = form.get_content_type()
|
||||
else:
|
||||
body = urllib.parse.urlencode(application_parameter)
|
||||
|
||||
if accessKey != '':
|
||||
timestamp = str(int(round(time.time()))) + '000'
|
||||
print(("timestamp:" + timestamp))
|
||||
canonicalString = self.getCanonicalStringForIsv(timestamp, suiteTicket)
|
||||
print(("canonicalString:" + canonicalString))
|
||||
print(("accessSecret:" + accessSecret))
|
||||
signature = self.computeSignature(accessSecret, canonicalString)
|
||||
print(("signature:" + signature))
|
||||
ps = {}
|
||||
ps["accessKey"] = accessKey
|
||||
ps["signature"] = signature
|
||||
ps["timestamp"] = timestamp
|
||||
if suiteTicket != '':
|
||||
ps["suiteTicket"] = suiteTicket
|
||||
if corpId != '':
|
||||
ps["corpId"] = corpId
|
||||
queryStr = urllib.parse.urlencode(ps)
|
||||
if self.__path.find("?") > 0:
|
||||
fullPath = self.__path + "&" + queryStr
|
||||
else:
|
||||
fullPath = self.__path + "?" + queryStr
|
||||
print(("fullPath:" + fullPath))
|
||||
else:
|
||||
if self.__path.find("?") > 0:
|
||||
fullPath = (self.__path + "&access_token=" + str(authrize)) if len(str(authrize)) > 0 else self.__path
|
||||
else:
|
||||
fullPath = (self.__path + "?access_token=" + str(authrize)) if len(str(authrize)) > 0 else self.__path
|
||||
|
||||
if self.getHttpMethod() == "GET":
|
||||
if fullPath.find("?") > 0:
|
||||
fullPath = fullPath + "&" + body
|
||||
else:
|
||||
fullPath = fullPath + "?" + body
|
||||
connection.request(self.getHttpMethod(), fullPath, headers=header)
|
||||
else:
|
||||
if self.getMultipartParas():
|
||||
body = body
|
||||
else:
|
||||
body = json.dumps(application_parameter)
|
||||
connection.request(self.getHttpMethod(), fullPath, body=body, headers=header)
|
||||
response = connection.getresponse()
|
||||
if response.status != 200:
|
||||
raise RequestException('invalid http status ' + str(response.status) + ',detail body:' + str(response.read()))
|
||||
result = response.read()
|
||||
# print("result:" + result)
|
||||
jsonobj = json.loads(result)
|
||||
if P_CODE in jsonobj and jsonobj[P_CODE] != 0:
|
||||
error = TopException()
|
||||
error.errcode = jsonobj[P_CODE]
|
||||
error.errmsg = jsonobj[P_MSG]
|
||||
error.application_host = response.getheader("Application-Host", "")
|
||||
error.service_host = response.getheader("Location-Host", "")
|
||||
raise error
|
||||
return jsonobj
|
||||
|
||||
def getCanonicalStringForIsv(self, timestamp, suiteTicket):
|
||||
if suiteTicket != '':
|
||||
return timestamp + '\n' + suiteTicket
|
||||
else:
|
||||
return timestamp
|
||||
|
||||
def computeSignature(self, secret, canonicalString):
|
||||
message = canonicalString.encode(encoding="utf-8")
|
||||
sec = secret.encode(encoding="utf-8")
|
||||
return str(base64.b64encode(hmac.new(sec, message, digestmod=hashlib.sha256).digest()))
|
||||
|
||||
def getApplicationParameters(self):
|
||||
application_parameter = {}
|
||||
for key, value in self.__dict__.items():
|
||||
if not key.startswith("__") and not key in self.getMultipartParas() and not key.startswith("_RestApi__") and value is not None:
|
||||
if key.startswith("_"):
|
||||
application_parameter[key[1:]] = value
|
||||
else:
|
||||
application_parameter[key] = value
|
||||
# 查询翻译字典来规避一些关键字属性
|
||||
translate_parameter = self.getTranslateParas()
|
||||
for key, value in application_parameter.items():
|
||||
if key in translate_parameter:
|
||||
application_parameter[translate_parameter[key]] = application_parameter[key]
|
||||
del application_parameter[key]
|
||||
return application_parameter
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CcoserviceServicegroupAddmemberRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.open_group_id = None
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.ccoservice.servicegroup.addmember'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CcoserviceServicegroupGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.open_group_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.ccoservice.servicegroup.get'
|
15
utils/dingtalk_sdk/api/rest/CorpBlazersGetbinddataRequest.py
Normal file
15
utils/dingtalk_sdk/api/rest/CorpBlazersGetbinddataRequest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpBlazersGetbinddataRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.blazers.getbinddata'
|
15
utils/dingtalk_sdk/api/rest/CorpBlazersGetbizidRequest.py
Normal file
15
utils/dingtalk_sdk/api/rest/CorpBlazersGetbizidRequest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpBlazersGetbizidRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.blazers.getbizid'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpBlazersRemovemappingRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.biz_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.blazers.removemapping'
|
15
utils/dingtalk_sdk/api/rest/CorpBlazersUnbindRequest.py
Normal file
15
utils/dingtalk_sdk/api/rest/CorpBlazersUnbindRequest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpBlazersUnbindRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.blazers.unbind'
|
16
utils/dingtalk_sdk/api/rest/CorpCalendarCreateRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpCalendarCreateRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpCalendarCreateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.create_vo = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.calendar.create'
|
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.09.18
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotAddchatbotinstanceRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.chatbot_id = None
|
||||
self.icon_media_id = None
|
||||
self.name = None
|
||||
self.open_conversation_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.addchatbotinstance'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotCreateorgbotRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.create_chat_bot_model = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.createorgbot'
|
16
utils/dingtalk_sdk/api/rest/CorpChatbotInstallRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpChatbotInstallRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.08.17
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotInstallRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.chatbot_vo = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.install'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.09.18
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotListbychatbotidsRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.chatbot_ids = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.listbychatbotids'
|
17
utils/dingtalk_sdk/api/rest/CorpChatbotListorgbotRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpChatbotListorgbotRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotListorgbotRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.agent_id = None
|
||||
self.type = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.listorgbot'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.09.18
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotListorgbotbytypeandbottypeRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.bot_type = None
|
||||
self.type = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.listorgbotbytypeandbottype'
|
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotUpdatebychatbotidRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.breif = None
|
||||
self.chatbot_id = None
|
||||
self.description = None
|
||||
self.icon = None
|
||||
self.name = None
|
||||
self.preview_media_id = None
|
||||
self.update_type = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.updatebychatbotid'
|
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpChatbotUpdateorgbotRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.chatbot_id = None
|
||||
self.icon = None
|
||||
self.name = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.chatbot.updateorgbot'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.09.21
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpConversationCorpconversionGetconversationRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.open_conversation_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.conversation.corpconversion.getconversation'
|
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.09.21
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpConversationCorpconversionListmemberRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.count = None
|
||||
self.offset = None
|
||||
self.open_conversation_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.conversation.corpconversion.listmember'
|
17
utils/dingtalk_sdk/api/rest/CorpDeptgroupSyncuserRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpDeptgroupSyncuserRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDeptgroupSyncuserRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.dept_id = None
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.deptgroup.syncuser'
|
17
utils/dingtalk_sdk/api/rest/CorpDeviceManageGetRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpDeviceManageGetRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDeviceManageGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.device_id = None
|
||||
self.device_service_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.device.manage.get'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDeviceManageHasbinddeviceRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.device_service_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.device.manage.hasbinddevice'
|
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.08.14
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDeviceManageQuerylistRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.cursor = None
|
||||
self.device_service_id = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.device.manage.querylist'
|
17
utils/dingtalk_sdk/api/rest/CorpDeviceManageUnbindRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpDeviceManageUnbindRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDeviceManageUnbindRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.device_id = None
|
||||
self.device_service_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.device.manage.unbind'
|
18
utils/dingtalk_sdk/api/rest/CorpDeviceNickUpdateRequest.py
Normal file
18
utils/dingtalk_sdk/api/rest/CorpDeviceNickUpdateRequest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDeviceNickUpdateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.device_id = None
|
||||
self.device_service_id = None
|
||||
self.new_nick = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.device.nick.update'
|
21
utils/dingtalk_sdk/api/rest/CorpDingCreateRequest.py
Normal file
21
utils/dingtalk_sdk/api/rest/CorpDingCreateRequest.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDingCreateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.attachment = None
|
||||
self.creator_userid = None
|
||||
self.receiver_userids = None
|
||||
self.remind_time = None
|
||||
self.remind_type = None
|
||||
self.text_content = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.ding.create'
|
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDingReceiverstatusListRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.confirmed_status = None
|
||||
self.ding_id = None
|
||||
self.page_no = None
|
||||
self.page_size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.ding.receiverstatus.list'
|
16
utils/dingtalk_sdk/api/rest/CorpDingTaskCreateRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpDingTaskCreateRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpDingTaskCreateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.task_send_v_o = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.ding.task.create'
|
18
utils/dingtalk_sdk/api/rest/CorpEmpSearchRequest.py
Normal file
18
utils/dingtalk_sdk/api/rest/CorpEmpSearchRequest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpEmpSearchRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.keyword = None
|
||||
self.offset = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.emp.search'
|
15
utils/dingtalk_sdk/api/rest/CorpEncryptionKeyListRequest.py
Normal file
15
utils/dingtalk_sdk/api/rest/CorpEncryptionKeyListRequest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpEncryptionKeyListRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.encryption.key.list'
|
16
utils/dingtalk_sdk/api/rest/CorpExtAddRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpExtAddRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtAddRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.contact = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.ext.add'
|
17
utils/dingtalk_sdk/api/rest/CorpExtListRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpExtListRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtListRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.ext.list'
|
17
utils/dingtalk_sdk/api/rest/CorpExtListlabelgroupsRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpExtListlabelgroupsRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtListlabelgroupsRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.ext.listlabelgroups'
|
16
utils/dingtalk_sdk/api/rest/CorpExtUpdateRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpExtUpdateRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtUpdateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.contact = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.ext.update'
|
16
utils/dingtalk_sdk/api/rest/CorpExtcontactCreateRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpExtcontactCreateRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtcontactCreateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.contact = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.extcontact.create'
|
16
utils/dingtalk_sdk/api/rest/CorpExtcontactDeleteRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpExtcontactDeleteRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtcontactDeleteRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.extcontact.delete'
|
16
utils/dingtalk_sdk/api/rest/CorpExtcontactGetRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpExtcontactGetRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtcontactGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.user_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.extcontact.get'
|
17
utils/dingtalk_sdk/api/rest/CorpExtcontactListRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpExtcontactListRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtcontactListRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.extcontact.list'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtcontactListlabelgroupsRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.extcontact.listlabelgroups'
|
16
utils/dingtalk_sdk/api/rest/CorpExtcontactUpdateRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpExtcontactUpdateRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpExtcontactUpdateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.contact = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.extcontact.update'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHealthStepinfoGetuserstatusRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.health.stepinfo.getuserstatus'
|
18
utils/dingtalk_sdk/api/rest/CorpHealthStepinfoListRequest.py
Normal file
18
utils/dingtalk_sdk/api/rest/CorpHealthStepinfoListRequest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHealthStepinfoListRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.object_id = None
|
||||
self.stat_dates = None
|
||||
self.type = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.health.stepinfo.list'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHealthStepinfoListbyuseridRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.stat_date = None
|
||||
self.userids = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.health.stepinfo.listbyuserid'
|
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHrmEmployeeAddresumerecordRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.content = None
|
||||
self.k_v_content = None
|
||||
self.pc_url = None
|
||||
self.phone_url = None
|
||||
self.record_time_stamp = None
|
||||
self.title = None
|
||||
self.userid = None
|
||||
self.web_url = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.hrm.employee.addresumerecord'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHrmEmployeeDelemployeedismissionandhandoverRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.dismission_info_with_hand_over = None
|
||||
self.op_userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.hrm.employee.delemployeedismissionandhandover'
|
16
utils/dingtalk_sdk/api/rest/CorpHrmEmployeeGetRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpHrmEmployeeGetRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHrmEmployeeGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.hrm.employee.get'
|
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHrmEmployeeGetdismissionlistRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.current = None
|
||||
self.op_userid = None
|
||||
self.page_size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.hrm.employee.getdismissionlist'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHrmEmployeeModjobinfoRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.hrm_api_job_model = None
|
||||
self.op_userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.hrm.employee.modjobinfo'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpHrmEmployeeSetuserworkdataRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.hrm_api_user_data_model = None
|
||||
self.op_userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.hrm.employee.setuserworkdata'
|
15
utils/dingtalk_sdk/api/rest/CorpInvoiceGettitleRequest.py
Normal file
15
utils/dingtalk_sdk/api/rest/CorpInvoiceGettitleRequest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpInvoiceGettitleRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.invoice.gettitle'
|
15
utils/dingtalk_sdk/api/rest/CorpLivenessGetRequest.py
Normal file
15
utils/dingtalk_sdk/api/rest/CorpLivenessGetRequest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpLivenessGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.liveness.get'
|
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpMessageCorpconversationAsyncsendRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.agent_id = None
|
||||
self.dept_id_list = None
|
||||
self.msgcontent = None
|
||||
self.msgtype = None
|
||||
self.to_all_user = None
|
||||
self.userid_list = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.message.corpconversation.asyncsend'
|
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpMessageCorpconversationAsyncsendbycodeRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.agent_id = None
|
||||
self.code = None
|
||||
self.dept_id_list = None
|
||||
self.msgcontent = None
|
||||
self.msgtype = None
|
||||
self.to_all_user = None
|
||||
self.user_id_list = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.message.corpconversation.asyncsendbycode'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpMessageCorpconversationGetsendprogressRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.agent_id = None
|
||||
self.task_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.message.corpconversation.getsendprogress'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpMessageCorpconversationGetsendresultRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.agent_id = None
|
||||
self.task_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.message.corpconversation.getsendresult'
|
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpMessageCorpconversationSendmockRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.message = None
|
||||
self.message_type = None
|
||||
self.microapp_agent_id = None
|
||||
self.to_party = None
|
||||
self.to_user = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.message.corpconversation.sendmock'
|
21
utils/dingtalk_sdk/api/rest/CorpReportListRequest.py
Normal file
21
utils/dingtalk_sdk/api/rest/CorpReportListRequest.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpReportListRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.cursor = None
|
||||
self.end_time = None
|
||||
self.size = None
|
||||
self.start_time = None
|
||||
self.template_name = None
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.report.list'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpRoleAddrolesforempsRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rolelid_list = None
|
||||
self.userid_list = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.role.addrolesforemps'
|
16
utils/dingtalk_sdk/api/rest/CorpRoleDeleteroleRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpRoleDeleteroleRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpRoleDeleteroleRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.role_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.role.deleterole'
|
16
utils/dingtalk_sdk/api/rest/CorpRoleGetrolegroupRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpRoleGetrolegroupRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpRoleGetrolegroupRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.group_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.role.getrolegroup'
|
17
utils/dingtalk_sdk/api/rest/CorpRoleListRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/CorpRoleListRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpRoleListRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.role.list'
|
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpRoleRemoverolesforempsRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.roleid_list = None
|
||||
self.userid_list = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.role.removerolesforemps'
|
18
utils/dingtalk_sdk/api/rest/CorpRoleSimplelistRequest.py
Normal file
18
utils/dingtalk_sdk/api/rest/CorpRoleSimplelistRequest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpRoleSimplelistRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.role_id = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.role.simplelist'
|
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpSearchCorpcontactBaseinfoRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.query = None
|
||||
self.size = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.search.corpcontact.baseinfo'
|
16
utils/dingtalk_sdk/api/rest/CorpSmartdeviceAddfaceRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpSmartdeviceAddfaceRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpSmartdeviceAddfaceRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.face_vo = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.smartdevice.addface'
|
16
utils/dingtalk_sdk/api/rest/CorpSmartdeviceGetfaceRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpSmartdeviceGetfaceRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.09.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpSmartdeviceGetfaceRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.smartdevice.getface'
|
16
utils/dingtalk_sdk/api/rest/CorpSmartdeviceHasfaceRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpSmartdeviceHasfaceRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.12.17
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpSmartdeviceHasfaceRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.userid_list = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.smartdevice.hasface'
|
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpSmartdeviceReceptionistPushinfoRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.desc_content = None
|
||||
self.desc_template = None
|
||||
self.microapp_agent_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.smartdevice.receptionist.pushinfo'
|
16
utils/dingtalk_sdk/api/rest/CorpUserPersonainfoGetRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/CorpUserPersonainfoGetRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.07.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class CorpUserPersonainfoGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.userid = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.corp.user.personainfo.get'
|
17
utils/dingtalk_sdk/api/rest/IsvBlazersGeneratecodeRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/IsvBlazersGeneratecodeRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class IsvBlazersGeneratecodeRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.biz_id = None
|
||||
self.ext = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.isv.blazers.generatecode'
|
18
utils/dingtalk_sdk/api/rest/IsvCallCalluserRequest.py
Normal file
18
utils/dingtalk_sdk/api/rest/IsvCallCalluserRequest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class IsvCallCalluserRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.authed_corp_id = None
|
||||
self.authed_staff_id = None
|
||||
self.staff_id = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.isv.call.calluser'
|
17
utils/dingtalk_sdk/api/rest/IsvCallGetuserlistRequest.py
Normal file
17
utils/dingtalk_sdk/api/rest/IsvCallGetuserlistRequest.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class IsvCallGetuserlistRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.offset = None
|
||||
self.start = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.isv.call.getuserlist'
|
16
utils/dingtalk_sdk/api/rest/IsvCallRemoveuserlistRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/IsvCallRemoveuserlistRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class IsvCallRemoveuserlistRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.staff_id_list = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.isv.call.removeuserlist'
|
16
utils/dingtalk_sdk/api/rest/IsvCallSetuserlistRequest.py
Normal file
16
utils/dingtalk_sdk/api/rest/IsvCallSetuserlistRequest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class IsvCallSetuserlistRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.staff_id_list = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.isv.call.setuserlist'
|
18
utils/dingtalk_sdk/api/rest/OapiAiMtTranslateRequest.py
Normal file
18
utils/dingtalk_sdk/api/rest/OapiAiMtTranslateRequest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.08.05
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAiMtTranslateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.query = None
|
||||
self.source_language = None
|
||||
self.target_language = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.ai.mt.translate'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2021.02.24
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripAddressGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.request = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.address.get'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.03
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripApplyGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.apply.get'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.09.11
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripApplySearchRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.apply.search'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.04.06
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripApprovalModifyRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.approval.modify'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2021.01.25
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripApprovalNewRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.approval.new'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.07.01
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripApprovalUpdateRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.approval.update'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.02.19
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripBindTaobaoGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.request = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.bind.taobao.get'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCategoryAddressGetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.category.address.get'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterDeleteRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.delete'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterEntityAddRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.entity.add'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterEntityDeleteRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.entity.delete'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterEntitySetRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.entity.set'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterModifyRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.modify'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterNewRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.new'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterQueryRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.query'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripCostCenterTransferRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.cost.center.transfer'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2019.10.24
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripFlightCitySuggestRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.flight.city.suggest'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2021.01.28
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripFlightOrderSearchRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.flight.order.search'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2021.01.28
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripHotelOrderSearchRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.hotel.order.search'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2018.08.07
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripInvoiceSearchRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.invoice.search'
|
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Created by auto_sdk on 2020.11.30
|
||||
"""
|
||||
from api.base import RestApi
|
||||
|
||||
|
||||
class OapiAlitripBtripInvoiceSettingAddRequest(RestApi):
|
||||
def __init__(self, url=None):
|
||||
RestApi.__init__(self, url)
|
||||
self.rq = None
|
||||
|
||||
def getHttpMethod(self):
|
||||
return 'POST'
|
||||
|
||||
def getapiname(self):
|
||||
return 'dingtalk.oapi.alitrip.btrip.invoice.setting.add'
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user