def get_job(self, job_id): resp_dict = self._root.get('%s/job/%d/' % (API_VERSION, job_id), headers=self.headers) if resp_dict['job']: return Job.from_dict(resp_dict['job']) return None
def get_jobs(self): resp_dict = self._root.get('%s/jobs' % API_VERSION, headers=self.headers) jobs = [Job.from_dict(job_dict) for job_dict in resp_dict['jobs']] return jobs