File tree Expand file tree Collapse file tree 3 files changed +58
-5
lines changed
kscore/data/offline/2016-09-19 Expand file tree Collapse file tree 3 files changed +58
-5
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ Service 服务
79
79
+-------------------+------------+
80
80
| monitor | |
81
81
+-------------------+------------+
82
+ | offline | |
83
+ +-------------------+------------+
82
84
83
85
----------------
84
86
Method 方法
@@ -164,6 +166,50 @@ Examples 示例
164
166
165
167
print json.dumps(m,sort_keys=True,indent=4)
166
168
169
+ + OFFLINE
170
+
171
+ ::
172
+
173
+ from kscore.session import get_session
174
+ import json
175
+
176
+ if __name__=="__main__":
177
+
178
+ #初始化
179
+ s = get_session()
180
+ client = s.create_client("offline", "cn-beijing-6", use_ssl=False)
181
+
182
+ #创建模板接口调用示例 : preset
183
+ presetname = 'testpreset'
184
+ description = 'just a demo'
185
+ presetType = 'avop'
186
+ param = {
187
+ "preset": presetname,
188
+ "description": description,
189
+ "presettype": presetType,
190
+ "param": {
191
+ "f": "mp4",
192
+ "AUDIO": {
193
+ "acodec": "aac",
194
+ "ar":"44100",
195
+ "ab":"64k"
196
+ },
197
+ "VIDEO": {
198
+ "vr": 25,
199
+ "vb": "500k",
200
+ "vcodec": "h264",
201
+ "width": 640,
202
+ "height": 360
203
+ }
204
+ }
205
+ }
206
+ res = client.preset(**param)
207
+ print json.dumps(res)
208
+
209
+ #获取模板信息接口调用示例 : get_preset_detail
210
+ res = client.get_preset_detail(preset = presetname)
211
+ print json.dumps(res)
212
+
167
213
+ 更多
168
214
169
215
--------------------
Original file line number Diff line number Diff line change 95
95
96
96
#任务置顶接口调用示例 : top_task_by_task_id
97
97
res = client .top_task_by_task_id (taskid = taskid )
98
+ print json .dumps (res )
99
+
100
+ #查询任务META列表接口调用示例 : get_task_meta_info
101
+ res = client .get_task_meta_info (taskid = taskid )
98
102
print json .dumps (res )
Original file line number Diff line number Diff line change @@ -78,6 +78,13 @@ operations:
78
78
requestUri : /
79
79
input :
80
80
shape : TaskIDInstance
81
+ GetTaskMetaInfo :
82
+ name : GetTaskMetaInfo
83
+ http :
84
+ method : GET
85
+ requestUri : /
86
+ input :
87
+ shape : TaskIDInstance
81
88
82
89
shapes :
83
90
Preset :
@@ -90,8 +97,6 @@ shapes:
90
97
max : 45
91
98
PresetInstance :
92
99
type : structure
93
- required :
94
- - preset
95
100
members :
96
101
preset :
97
102
shape : Preset
@@ -102,10 +107,8 @@ shapes:
102
107
shape : WithDetail
103
108
TaskIDInstance :
104
109
type : structure
105
- required :
106
- - taskid
107
110
members :
108
111
taskid :
109
112
shape : TaskID
110
113
111
-
114
+
You can’t perform that action at this time.
0 commit comments