Skip to content

Commit 752b431

Browse files
author
Alex Schworer
committed
Add Inputs endpoint support:
https://app.zencoder.com/docs/api/inputs
1 parent cbc9357 commit 752b431

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

zencoder/core.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,27 @@ def details(self, output_id):
286286
"""
287287
return self.get(self.base_url + '/%s' % str(output_id))
288288

289+
class Input(HTTPBackend):
290+
""" Returns information regarding inputs """
291+
def __init__(self, *args, **kwargs):
292+
"""
293+
Contains all API methods relating to Inputs.
294+
"""
295+
kwargs['resource_name'] = 'inputs'
296+
super(Output, self).__init__(*args, **kwargs)
297+
298+
def progress(self, input_id):
299+
"""
300+
Gets the given input id's progress.
301+
"""
302+
return self.get(self.base_url + '/%s/progress' % str(input_id))
303+
304+
def details(self, input_id):
305+
"""
306+
Gets the given input id's details
307+
"""
308+
return self.get(self.base_url + '/%s' % str(input))
309+
289310
class Job(HTTPBackend):
290311
"""
291312
Contains all API methods relating to transcoding Jobs.

0 commit comments

Comments
 (0)