Skip to content

Commit 7a4478b

Browse files
authored
Merge pull request #87 from Tanc009/master
publish jdcloud-sdk-python 1.6.50
2 parents 258d90b + e2e22b1 commit 7a4478b

122 files changed

Lines changed: 3234 additions & 54 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 更新历史 #
2+
API版本:1.0.0
3+
4+
|发布时间|版本号|更新|说明|
5+
|---|---|---|---|
6+
|2019-09-20|1.0.0|初始版本|* API及分组定义基础接口|

jdcloud_sdk/services/censor/__init__.py

Whitespace-only changes.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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 AsyncImageScanRequest(JDCloudRequest):
23+
"""
24+
提交图片异步检测任务
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AsyncImageScanRequest, self).__init__(
29+
'/image:asyncscan', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AsyncImageScanParameters(object):
34+
35+
def __init__(self, ):
36+
"""
37+
"""
38+
39+
self.scenes = None
40+
self.tasks = None
41+
self.callback = None
42+
self.seed = None
43+
44+
def setScenes(self, scenes):
45+
"""
46+
:param scenes: (Optional) 指定检测场景
47+
"""
48+
self.scenes = scenes
49+
50+
def setTasks(self, tasks):
51+
"""
52+
:param tasks: (Optional) 检测任务列表,包含一个或多个元素。每个元素是个结构体,最多可添加10个元素,每个元素的具体结构描述见ImageTask。
53+
"""
54+
self.tasks = tasks
55+
56+
def setCallback(self, callback):
57+
"""
58+
:param callback: (Optional) 异步检测结果回调通知您的URL,支持HTTP/HTTPS。该字段为空时,您必须定时检索检测结果。
59+
"""
60+
self.callback = callback
61+
62+
def setSeed(self, seed):
63+
"""
64+
:param seed: (Optional) 随机字符串,该值用于回调通知请求中的签名。当使用callback时,该字段必须提供。
65+
"""
66+
self.seed = seed
67+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 ImageResultsRequest(JDCloudRequest):
23+
"""
24+
查看图片异步检测结果
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(ImageResultsRequest, self).__init__(
29+
'/image:results', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class ImageResultsParameters(object):
34+
35+
def __init__(self, taskIds):
36+
"""
37+
:param taskIds:
38+
"""
39+
40+
self.taskIds = taskIds
41+
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 ImageScanRequest(JDCloudRequest):
23+
"""
24+
图片同步检测
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(ImageScanRequest, self).__init__(
29+
'/image:scan', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class ImageScanParameters(object):
34+
35+
def __init__(self, ):
36+
"""
37+
"""
38+
39+
self.scenes = None
40+
self.tasks = None
41+
42+
def setScenes(self, scenes):
43+
"""
44+
:param scenes: (Optional) 指定检测场景
45+
"""
46+
self.scenes = scenes
47+
48+
def setTasks(self, tasks):
49+
"""
50+
:param tasks: (Optional) 检测任务列表,包含一个或多个元素。每个元素是个结构体,最多可添加10个元素,即最多对10段文本进行检测。每个元素的具体结构描述见ImageTask。
51+
"""
52+
self.tasks = tasks
53+
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 TextScanRequest(JDCloudRequest):
23+
"""
24+
文本同步检测-检测文本中是否包含违规信息
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(TextScanRequest, self).__init__(
29+
'/text:scan', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class TextScanParameters(object):
34+
35+
def __init__(self, ):
36+
"""
37+
"""
38+
39+
self.scenes = None
40+
self.tasks = None
41+
42+
def setScenes(self, scenes):
43+
"""
44+
:param scenes: (Optional) 指定检测场景,固定值:antispam
45+
"""
46+
self.scenes = scenes
47+
48+
def setTasks(self, tasks):
49+
"""
50+
:param tasks: (Optional) 检测任务列表,包含一个或多个元素。每个元素是个结构体,最多可添加10个元素,即最多对10段文本进行检测。每个元素的具体结构描述见TextTask。
51+
"""
52+
self.tasks = tasks
53+

jdcloud_sdk/services/censor/apis/__init__.py

Whitespace-only changes.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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.jdcloudclient import JDCloudClient
20+
from jdcloud_sdk.core.config import Config
21+
22+
23+
class CensorClient(JDCloudClient):
24+
25+
def __init__(self, credential, config=None, logger=None):
26+
if config is None:
27+
config = Config('censor.jdcloud-api.com')
28+
29+
super(CensorClient, self).__init__(credential, config, 'censor', '1.0.0', logger)

jdcloud_sdk/services/censor/client/__init__.py

Whitespace-only changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
20+
class AmountStatistics(object):
21+
22+
def __init__(self, free=None, charge=None, total=None):
23+
"""
24+
:param free: (Optional) 体验总数
25+
:param charge: (Optional) 付费总数
26+
:param total: (Optional) 总数
27+
"""
28+
29+
self.free = free
30+
self.charge = charge
31+
self.total = total

0 commit comments

Comments
 (0)