Skip to content

Commit 82dc429

Browse files
committed
publish jdcloud-sdk-python 1.6.58
1 parent 29d93a3 commit 82dc429

13 files changed

Lines changed: 329 additions & 8 deletions

jdcloud_sdk/services/vod/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# 更新历史 #
2-
API版本:1.1.6
2+
API版本:1.1.7
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2020-04-30|1.1.7|增加接口|* 增加视频审核接口;<br> * 增加视频状态封禁状态;<br> * 增加直播转点播接口|
67
|2020-01-06|1.1.6|增加接口|* 优化上传,获取上传地址返回结果中增加authToken字段|
78
|2019-08-28|1.1.5|增加接口|* 增加质量检测相关接口|
89
|2019-08-15|1.1.4|修改、新增接口|* 水印支持宽高/偏移分别支持像素/百分比单位等;<br> * 添加域名SSL设置相关接口|

jdcloud_sdk/services/vod/apis/CreateImageUploadTaskRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, fileName, ):
4343

4444
def setHttpMethod(self, httpMethod):
4545
"""
46-
:param httpMethod: (Optional) HTTP 请求方法,取值范围:GET、POST、PUT、DELETE、HEAD、PATCH,默认值为 PUT
46+
:param httpMethod: (Optional) HTTP 请求方法,上传只支持 PUT 方法,默认值为 PUT
4747
"""
4848
self.httpMethod = httpMethod
4949

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
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 CreateLiveToVodTaskRequest(JDCloudRequest):
23+
"""
24+
创建直播转点播任务
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateLiveToVodTaskRequest, self).__init__(
29+
'/createLiveToVodTask', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateLiveToVodTaskParameters(object):
34+
35+
def __init__(self, title, fileName, publishDomain, appName, streamName, recordTimes, recordFileType, ):
36+
"""
37+
:param title: 视频标题
38+
:param fileName: 文件名称
39+
:param publishDomain: 推流域名
40+
:param appName: 应用名称
41+
:param streamName: 流名称
42+
:param recordTimes: 录制时间段集合
43+
- 支持自定义1-10个时间段,拼接成一个文件
44+
- 每个时间段不小于10s
45+
- 总跨度不超过12小时
46+
- 时间段按升序排列且无重叠
47+
48+
:param recordFileType: 录制文件类型:
49+
- 取值: ts, flv, mp4
50+
- 不区分大小写
51+
52+
"""
53+
54+
self.title = title
55+
self.fileName = fileName
56+
self.fileSize = None
57+
self.coverUrl = None
58+
self.description = None
59+
self.categoryId = None
60+
self.tags = None
61+
self.transcodeTemplateIds = None
62+
self.watermarkIds = None
63+
self.publishDomain = publishDomain
64+
self.appName = appName
65+
self.streamName = streamName
66+
self.recordTimes = recordTimes
67+
self.recordFileType = recordFileType
68+
self.taskExternalId = None
69+
self.priority = None
70+
71+
def setFileSize(self, fileSize):
72+
"""
73+
:param fileSize: (Optional) 文件大小
74+
"""
75+
self.fileSize = fileSize
76+
77+
def setCoverUrl(self, coverUrl):
78+
"""
79+
:param coverUrl: (Optional) 封面地址
80+
"""
81+
self.coverUrl = coverUrl
82+
83+
def setDescription(self, description):
84+
"""
85+
:param description: (Optional) 视频描述
86+
"""
87+
self.description = description
88+
89+
def setCategoryId(self, categoryId):
90+
"""
91+
:param categoryId: (Optional) 分类ID
92+
"""
93+
self.categoryId = categoryId
94+
95+
def setTags(self, tags):
96+
"""
97+
:param tags: (Optional) 视频标签集合
98+
"""
99+
self.tags = tags
100+
101+
def setTranscodeTemplateIds(self, transcodeTemplateIds):
102+
"""
103+
:param transcodeTemplateIds: (Optional) 转码模板ID集合
104+
"""
105+
self.transcodeTemplateIds = transcodeTemplateIds
106+
107+
def setWatermarkIds(self, watermarkIds):
108+
"""
109+
:param watermarkIds: (Optional) 水印ID集合
110+
"""
111+
self.watermarkIds = watermarkIds
112+
113+
def setTaskExternalId(self, taskExternalId):
114+
"""
115+
:param taskExternalId: (Optional) 直播录制任务外键
116+
"""
117+
self.taskExternalId = taskExternalId
118+
119+
def setPriority(self, priority):
120+
"""
121+
:param priority: (Optional) 任务优先级:
122+
- 取值: low, medium, high
123+
- 不区分大小写
124+
125+
"""
126+
self.priority = priority
127+

jdcloud_sdk/services/vod/apis/CreateVideoUploadTaskRequest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ def __init__(self, title, fileName, ):
4848
self.tags = None
4949
self.transcodeTemplateIds = None
5050
self.watermarkIds = None
51+
self.userData = None
5152

5253
def setHttpMethod(self, httpMethod):
5354
"""
54-
:param httpMethod: (Optional) HTTP 请求方法,取值范围:GET、POST、PUT、DELETE、HEAD、PATCH,默认值为 PUT
55+
:param httpMethod: (Optional) HTTP 请求方法,上传只支持 PUT 方法,默认值为 PUT
5556
"""
5657
self.httpMethod = httpMethod
5758

@@ -97,3 +98,9 @@ def setWatermarkIds(self, watermarkIds):
9798
"""
9899
self.watermarkIds = watermarkIds
99100

101+
def setUserData(self, userData):
102+
"""
103+
:param userData: (Optional) 自定义数据
104+
"""
105+
self.userData = userData
106+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 VideoAuditRequest(JDCloudRequest):
23+
"""
24+
视频审核
25+
视频在上传中或者转码中不允许更改视频审核状态,即视频只有在正常或屏蔽状态下才可以调用此接口设置审核状态
26+
27+
"""
28+
29+
def __init__(self, parameters, header=None, version="v1"):
30+
super(VideoAuditRequest, self).__init__(
31+
'/videos/{videoId}:audit', 'POST', header, version)
32+
self.parameters = parameters
33+
34+
35+
class VideoAuditParameters(object):
36+
37+
def __init__(self, videoId, auditResult):
38+
"""
39+
:param videoId: 视频ID
40+
:param auditResult: 审核结果,取值范围:
41+
block(封禁)
42+
unblock(解封)
43+
44+
"""
45+
46+
self.videoId = videoId
47+
self.auditResult = auditResult
48+

jdcloud_sdk/services/vod/client/VodClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ def __init__(self, credential, config=None, logger=None):
2626
if config is None:
2727
config = Config('vod.jdcloud-api.com')
2828

29-
super(VodClient, self).__init__(credential, config, 'vod', '1.1.6', logger)
29+
super(VodClient, self).__init__(credential, config, 'vod', '1.1.7', logger)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 AuditVideoRequestObject(object):
21+
22+
def __init__(self, auditResult, ):
23+
"""
24+
:param auditResult: 审核结果,取值范围:
25+
block(封禁)
26+
unblock(解封)
27+
28+
"""
29+
30+
self.auditResult = auditResult

jdcloud_sdk/services/vod/models/CreateImageUploadTaskRequestObject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CreateImageUploadTaskRequestObject(object):
2121

2222
def __init__(self, fileName, httpMethod=None, fileSize=None):
2323
"""
24-
:param httpMethod: (Optional) HTTP 请求方法,取值范围:GET、POST、PUT、DELETE、HEAD、PATCH,默认值为 PUT
24+
:param httpMethod: (Optional) HTTP 请求方法,上传只支持 PUT 方法,默认值为 PUT
2525
:param fileName: 文件名称
2626
:param fileSize: (Optional) 文件大小
2727
"""
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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 CreateLiveToVodTaskRequestObject(object):
21+
22+
def __init__(self, title, fileName, publishDomain, appName, streamName, recordTimes, recordFileType, fileSize=None, coverUrl=None, description=None, categoryId=None, tags=None, transcodeTemplateIds=None, watermarkIds=None, taskExternalId=None, priority=None):
23+
"""
24+
:param title: 视频标题
25+
:param fileName: 文件名称
26+
:param fileSize: (Optional) 文件大小
27+
:param coverUrl: (Optional) 封面地址
28+
:param description: (Optional) 视频描述
29+
:param categoryId: (Optional) 分类ID
30+
:param tags: (Optional) 视频标签集合
31+
:param transcodeTemplateIds: (Optional) 转码模板ID集合
32+
:param watermarkIds: (Optional) 水印ID集合
33+
:param publishDomain: 推流域名
34+
:param appName: 应用名称
35+
:param streamName: 流名称
36+
:param recordTimes: 录制时间段集合
37+
- 支持自定义1-10个时间段,拼接成一个文件
38+
- 每个时间段不小于10s
39+
- 总跨度不超过12小时
40+
- 时间段按升序排列且无重叠
41+
42+
:param recordFileType: 录制文件类型:
43+
- 取值: ts, flv, mp4
44+
- 不区分大小写
45+
46+
:param taskExternalId: (Optional) 直播录制任务外键
47+
:param priority: (Optional) 任务优先级:
48+
- 取值: low, medium, high
49+
- 不区分大小写
50+
51+
"""
52+
53+
self.title = title
54+
self.fileName = fileName
55+
self.fileSize = fileSize
56+
self.coverUrl = coverUrl
57+
self.description = description
58+
self.categoryId = categoryId
59+
self.tags = tags
60+
self.transcodeTemplateIds = transcodeTemplateIds
61+
self.watermarkIds = watermarkIds
62+
self.publishDomain = publishDomain
63+
self.appName = appName
64+
self.streamName = streamName
65+
self.recordTimes = recordTimes
66+
self.recordFileType = recordFileType
67+
self.taskExternalId = taskExternalId
68+
self.priority = priority

jdcloud_sdk/services/vod/models/CreateVideoUploadTaskRequestObject.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
class CreateVideoUploadTaskRequestObject(object):
2121

22-
def __init__(self, title, fileName, httpMethod=None, fileSize=None, coverUrl=None, description=None, categoryId=None, tags=None, transcodeTemplateIds=None, watermarkIds=None):
22+
def __init__(self, title, fileName, httpMethod=None, fileSize=None, coverUrl=None, description=None, categoryId=None, tags=None, transcodeTemplateIds=None, watermarkIds=None, userData=None):
2323
"""
24-
:param httpMethod: (Optional) HTTP 请求方法,取值范围:GET、POST、PUT、DELETE、HEAD、PATCH,默认值为 PUT
24+
:param httpMethod: (Optional) HTTP 请求方法,上传只支持 PUT 方法,默认值为 PUT
2525
:param title: 视频标题
2626
:param fileName: 文件名称
2727
:param fileSize: (Optional) 文件大小
@@ -31,6 +31,7 @@ def __init__(self, title, fileName, httpMethod=None, fileSize=None, coverUrl=Non
3131
:param tags: (Optional) 视频标签集合
3232
:param transcodeTemplateIds: (Optional) 转码模板ID集合
3333
:param watermarkIds: (Optional) 水印ID集合
34+
:param userData: (Optional) 自定义数据
3435
"""
3536

3637
self.httpMethod = httpMethod
@@ -43,3 +44,4 @@ def __init__(self, title, fileName, httpMethod=None, fileSize=None, coverUrl=Non
4344
self.tags = tags
4445
self.transcodeTemplateIds = transcodeTemplateIds
4546
self.watermarkIds = watermarkIds
47+
self.userData = userData

0 commit comments

Comments
 (0)