Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details method to Output object. #9

Merged
merged 2 commits into from
Apr 23, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions zencoder/core.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ def progress(self, output_id):
return self.get(self.base_url + '/%s/progress' % str(output_id), return self.get(self.base_url + '/%s/progress' % str(output_id),
data=data) data=data)


def details(self, output_id):
"""
Gets the given output id's details
"""
data = {'api_key': self.api_key}
return self.get(self.base_url + '/%s' % str(output_id),
data=data)

class Job(HTTPBackend): class Job(HTTPBackend):
""" """
Contains all API methods relating to transcoding Jobs. Contains all API methods relating to transcoding Jobs.
Expand Down Expand Up @@ -281,6 +289,10 @@ def details(self, job_id):
data = {'api_key': self.api_key} data = {'api_key': self.api_key}
return self.get(self.base_url + '/%s' % str(job_id), data=data) return self.get(self.base_url + '/%s' % str(job_id), data=data)


def progress(self, job_id):
data = {'api_key': self.api_key}
return self.get(self.base_url + '/%s/progress' % str(job_id), data=data)

def resubmit(self, job_id): def resubmit(self, job_id):
""" """
Resubmits a job Resubmits a job
Expand Down