Skip to content

Commit 7b5decc

Browse files
publish jdcloud-sdk-python 1.6.102
1 parent da1472e commit 7b5decc

63 files changed

Lines changed: 2194 additions & 6 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# 更新历史 #
2-
API版本:1.0.1
2+
API版本:1.0.2
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2021-07-02|1.0.2|新增新的检测接口||
67
|2020-10-10|1.0.1|支持音视频异步检测||
78
|2019-09-20|1.0.0|初始版本||
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class AsyncAudioScanV2Request(JDCloudRequest):
23+
"""
24+
提交音频异步检测任务V2
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AsyncAudioScanV2Request, self).__init__(
29+
'/audio:asyncscanv2', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AsyncAudioScanV2Parameters(object):
34+
35+
def __init__(self, ):
36+
"""
37+
"""
38+
39+
self.bizType = None
40+
self.url = None
41+
self.version = None
42+
self.title = None
43+
self.ip = None
44+
self.account = None
45+
self.deviceId = None
46+
self.deviceType = None
47+
self.callback = None
48+
self.callbackUrl = None
49+
50+
def setBizType(self, bizType):
51+
"""
52+
:param bizType: (Optional) 业务bizType,请联系客户经理获取
53+
"""
54+
self.bizType = bizType
55+
56+
def setUrl(self, url):
57+
"""
58+
:param url: (Optional) 最大长度512, 语音文件url
59+
"""
60+
self.url = url
61+
62+
def setVersion(self, version):
63+
"""
64+
:param version: (Optional) 最大长度4,接口版本号,可选值 v3.5
65+
"""
66+
self.version = version
67+
68+
def setTitle(self, title):
69+
"""
70+
:param title: (Optional) 最大长度512,文件标题
71+
"""
72+
self.title = title
73+
74+
def setIp(self, ip):
75+
"""
76+
:param ip: (Optional) 最大长度32,用户IP地址
77+
"""
78+
self.ip = ip
79+
80+
def setAccount(self, account):
81+
"""
82+
:param account: (Optional) 最大长度128,用户唯一标识,如果无需登录则为空
83+
"""
84+
self.account = account
85+
86+
def setDeviceId(self, deviceId):
87+
"""
88+
:param deviceId: (Optional) 最大长度128,用户设备 id,与设备画像库匹配,明文请转大写传入;MD5加密请明文转大写后MD5计算,再转大写传入,建议抄送
89+
"""
90+
self.deviceId = deviceId
91+
92+
def setDeviceType(self, deviceType):
93+
"""
94+
:param deviceType: (Optional) 用户设备id的类型,0:其他,10:IMEI,11:AndroidID,12:IDFA,13:IDFV,14:MAC ,20:IMEI_MD5,21:AndroidID_MD5,22:IDFA_MD5,23:IDFV_MD5,24:MAC_MD5
95+
"""
96+
self.deviceType = deviceType
97+
98+
def setCallback(self, callback):
99+
"""
100+
:param callback: (Optional) 最大长度2^16-1,数据回调参数,调用方根据业务情况自行设计,当调用离线结果获取接口时,该接口会原样返回该字段,详细见音频离线检测结果获取。作为数据处理标识,因此该字段应该设计为能唯一定位到该次请求的数据结构,如对用户的昵称进行检测,dataId可设为用户标识(用户ID),用户修改多次,每次请求数据的dataId可能一致,但是callback参数可以设计成定位该次请求的数据结构,比如callback字段设计成json,包含dataId和请求的时间戳等信息,当然如果不想做区分,也可以直接把callback设置成dataId的值。
101+
"""
102+
self.callback = callback
103+
104+
def setCallbackUrl(self, callbackUrl):
105+
"""
106+
:param callbackUrl: (Optional) 最大长度256,离线结果回调通知到客户的URL。主动回调数据接口超时时间设置为2s,为了保证顺利接收数据,需保证接收接口性能稳定并且保证幂等性。
107+
"""
108+
self.callbackUrl = callbackUrl
109+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class AsyncVideoScanV2Request(JDCloudRequest):
23+
"""
24+
提交视频异步检测任务V2
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AsyncVideoScanV2Request, self).__init__(
29+
'/video:asyncscanv2', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AsyncVideoScanV2Parameters(object):
34+
35+
def __init__(self, ):
36+
"""
37+
"""
38+
39+
self.bizType = None
40+
self.url = None
41+
self.dataId = None
42+
self.version = None
43+
self.title = None
44+
self.callback = None
45+
self.callbackUrl = None
46+
self.uniqueKey = None
47+
self.scFrequency = None
48+
self.advancedFrequency = None
49+
50+
def setBizType(self, bizType):
51+
"""
52+
:param bizType: (Optional) 业务bizType,请联系客户经理获取
53+
"""
54+
self.bizType = bizType
55+
56+
def setUrl(self, url):
57+
"""
58+
:param url: (Optional) 最大长度512, 点播视频地址
59+
"""
60+
self.url = url
61+
62+
def setDataId(self, dataId):
63+
"""
64+
:param dataId: (Optional) 最大长度128,点播视频唯一标识
65+
"""
66+
self.dataId = dataId
67+
68+
def setVersion(self, version):
69+
"""
70+
:param version: (Optional) 接口版本号,可选值 v3.2
71+
"""
72+
self.version = version
73+
74+
def setTitle(self, title):
75+
"""
76+
:param title: (Optional) 最大长度512,视频名称
77+
"""
78+
self.title = title
79+
80+
def setCallback(self, callback):
81+
"""
82+
:param callback: (Optional) 最大长度512,数据回调参数,产品根据业务情况自行设计,当获取离线检测结果时,内容安全服务会返回该字段
83+
"""
84+
self.callback = callback
85+
86+
def setCallbackUrl(self, callbackUrl):
87+
"""
88+
:param callbackUrl: (Optional) 最大长度256,离线结果回调通知到客户的URL。主动回调数据接口超时时间设置为2s,为了保证顺利接收数据,需保证接收接口性能稳定并且保证幂等性。
89+
"""
90+
self.callbackUrl = callbackUrl
91+
92+
def setUniqueKey(self, uniqueKey):
93+
"""
94+
:param uniqueKey: (Optional) 最大长度64,客户个性化视频唯一性标识,传入后,将以此值作为重复检测依据,若不传,默认以URL作为查重依据,如果重复提交会被拒绝,返回报错信息请求重复,以及原提交taskID值,具体返回请查看响应示例
95+
"""
96+
self.uniqueKey = uniqueKey
97+
98+
def setScFrequency(self, scFrequency):
99+
"""
100+
:param scFrequency: (Optional) 最大长度64,客户个性化视频唯一性标识,传入后,将以此值作为重复检测依据,若不传,默认以URL作为查重依据,如果重复提交会被拒绝,返回报错信息请求重复,以及原提交taskID值,具体返回请查看响应示例
101+
"""
102+
self.scFrequency = scFrequency
103+
104+
def setAdvancedFrequency(self, advancedFrequency):
105+
"""
106+
:param advancedFrequency: (Optional) 高级截帧设置,此项填写,默认截帧策略失效
107+
"""
108+
self.advancedFrequency = advancedFrequency
109+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class AudioCallbackV2Request(JDCloudRequest):
23+
"""
24+
语音检测结果获取接口,获取离线处理的数据后,下次调用,不会再次返回之前获取过的离线数据。小于10s/20次,请求频率过快服务器会拒绝处理
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AudioCallbackV2Request, self).__init__(
29+
'/audio:callbackv2', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AudioCallbackV2Parameters(object):
34+
35+
def __init__(self, ):
36+
"""
37+
"""
38+
39+
self.bizType = None
40+
self.version = None
41+
42+
def setBizType(self, bizType):
43+
"""
44+
:param bizType: (Optional) 业务bizType,请联系客户经理获取
45+
"""
46+
self.bizType = bizType
47+
48+
def setVersion(self, version):
49+
"""
50+
:param version: (Optional) 接口版本v1
51+
"""
52+
self.version = version
53+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class AudioResultsV2Request(JDCloudRequest):
23+
"""
24+
根据taskid查询语音检测结果,小于10s/20次,请求频率过快服务器会拒绝处理
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AudioResultsV2Request, self).__init__(
29+
'/audio:resultsv2', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AudioResultsV2Parameters(object):
34+
35+
def __init__(self, ):
36+
"""
37+
"""
38+
39+
self.bizType = None
40+
self.version = None
41+
self.taskIds = None
42+
43+
def setBizType(self, bizType):
44+
"""
45+
:param bizType: (Optional) 业务bizType,请联系客户经理获取
46+
"""
47+
self.bizType = bizType
48+
49+
def setVersion(self, version):
50+
"""
51+
:param version: (Optional) 接口版本v1
52+
"""
53+
self.version = version
54+
55+
def setTaskIds(self, taskIds):
56+
"""
57+
:param taskIds: (Optional) 要查询的taskId
58+
"""
59+
self.taskIds = taskIds
60+

0 commit comments

Comments
 (0)