Skip to content

Commit 2a26de8

Browse files
Merge pull request #148 from jdcloud-apigateway/master
publish jdcloud-sdk-python 1.6.124
2 parents da991e4 + 69a1e12 commit 2a26de8

10 files changed

Lines changed: 482 additions & 3 deletions

jdcloud_sdk/services/live/ChangeLog.md

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

44
|发布时间|版本号|更新|说明|
55
|------------|-------|------|-------|
6+
|2021-08-31|1.0.21| 添加接口| 添加直播拉流转推相关接口|
67
|2021-06-29|1.0.20| 添加接口| 添加直播翻译相关接口|
78
|2020-12-31|1.0.19| 添加接口| 添加查询推流、播放信息分页接口|
89
|2020-10-12|1.0.18| 添加接口| 添加oss录制文件删除接口|
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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 CreateLiveForwardTaskRequest(JDCloudRequest):
23+
"""
24+
创建直播拉流转推任务
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(CreateLiveForwardTaskRequest, self).__init__(
30+
'/LiveForwardTask:create', 'POST', header, version)
31+
self.parameters = parameters
32+
33+
34+
class CreateLiveForwardTaskParameters(object):
35+
36+
def __init__(self, sourceUrl, pushUrl, startMode, ):
37+
"""
38+
:param sourceUrl: 拉流地址
39+
- 支持rtmp
40+
41+
:param pushUrl: 转推地址
42+
- 支持rtmp
43+
44+
:param startMode: 执行方式
45+
- StartNow: 立即执行
46+
- StartAsScheduled: 定时执行,根据参数设定的时间
47+
48+
"""
49+
50+
self.sourceUrl = sourceUrl
51+
self.pushUrl = pushUrl
52+
self.startMode = startMode
53+
self.startTime = None
54+
self.endTime = None
55+
self.callbackEvents = None
56+
self.callbackUrl = None
57+
self.name = None
58+
59+
def setStartTime(self, startTime):
60+
"""
61+
:param startTime: (Optional) 开始时间
62+
- UTC时间, ISO8601示例:2021-07-26T08:08:08Z
63+
- 不填表示立即开始
64+
65+
"""
66+
self.startTime = startTime
67+
68+
def setEndTime(self, endTime):
69+
"""
70+
:param endTime: (Optional) 结束时间
71+
- UTC时间, ISO8601示例:2021-07-26T08:08:08Z
72+
- 最大支持365天,与开始时间间隔不超过7天。
73+
- 假设当前时间2021年03月30日11:50:01,则:结束时间不可超过2022年03月30日11:50:01。
74+
- 不填拉不到流10分钟自动结束
75+
76+
"""
77+
self.endTime = endTime
78+
79+
def setCallbackEvents(self, callbackEvents):
80+
"""
81+
:param callbackEvents: (Optional) 回调类型
82+
- 不填发送全部回调
83+
- TaskStart 任务开始
84+
- TaskExit 任务结束
85+
- callbackUrl非空的情况下,callbackEvents有效
86+
87+
"""
88+
self.callbackEvents = callbackEvents
89+
90+
def setCallbackUrl(self, callbackUrl):
91+
"""
92+
:param callbackUrl: (Optional) 事件回调地址
93+
94+
"""
95+
self.callbackUrl = callbackUrl
96+
97+
def setName(self, name):
98+
"""
99+
:param name: (Optional) 任务名称
100+
- 最大255字符
101+
102+
"""
103+
self.name = name
104+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 DeleteLiveForwardTaskRequest(JDCloudRequest):
23+
"""
24+
删除直播拉流转推任务
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(DeleteLiveForwardTaskRequest, self).__init__(
30+
'/LiveForwardTask:delete', 'DELETE', header, version)
31+
self.parameters = parameters
32+
33+
34+
class DeleteLiveForwardTaskParameters(object):
35+
36+
def __init__(self, taskIds):
37+
"""
38+
:param taskIds: 任务ID,批量用,分隔
39+
40+
"""
41+
42+
self.taskIds = taskIds
43+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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 QueryLiveForwardTaskRequest(JDCloudRequest):
23+
"""
24+
查询直播拉流转推任务
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(QueryLiveForwardTaskRequest, self).__init__(
30+
'/LiveForwardTask:query', 'GET', header, version)
31+
self.parameters = parameters
32+
33+
34+
class QueryLiveForwardTaskParameters(object):
35+
36+
def __init__(self, ):
37+
"""
38+
"""
39+
40+
self.pageNum = None
41+
self.pageSize = None
42+
self.filters = None
43+
44+
def setPageNum(self, pageNum):
45+
"""
46+
:param pageNum: (Optional) 页码
47+
- 取值范围 [1, 100000]
48+
49+
"""
50+
self.pageNum = pageNum
51+
52+
def setPageSize(self, pageSize):
53+
"""
54+
:param pageSize: (Optional) 分页大小
55+
- 取值范围 [10, 100]
56+
57+
"""
58+
self.pageSize = pageSize
59+
60+
def setFilters(self, filters):
61+
"""
62+
:param filters: (Optional) 拉流转推任务查询过滤条件:
63+
- name: taskId 任务ID
64+
- value: 如果参数为空,则查询全部
65+
- name: taskName 任务名称
66+
- value: 如果参数为空,则查询全部
67+
68+
"""
69+
self.filters = filters
70+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 StartLiveForwardTaskRequest(JDCloudRequest):
23+
"""
24+
开始直播拉流转推任务
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(StartLiveForwardTaskRequest, self).__init__(
30+
'/LiveForwardTask:start', 'GET', header, version)
31+
self.parameters = parameters
32+
33+
34+
class StartLiveForwardTaskParameters(object):
35+
36+
def __init__(self, taskIds):
37+
"""
38+
:param taskIds: 任务ID,批量用,分隔
39+
40+
"""
41+
42+
self.taskIds = taskIds
43+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 StopLiveForwardTaskRequest(JDCloudRequest):
23+
"""
24+
停止直播拉流转推任务
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(StopLiveForwardTaskRequest, self).__init__(
30+
'/LiveForwardTask:stop', 'GET', header, version)
31+
self.parameters = parameters
32+
33+
34+
class StopLiveForwardTaskParameters(object):
35+
36+
def __init__(self, taskIds):
37+
"""
38+
:param taskIds: 任务ID,批量用,分隔
39+
40+
"""
41+
42+
self.taskIds = taskIds
43+

0 commit comments

Comments
 (0)