From a441fb897716d0169016b6f419a0029ec18a45c6 Mon Sep 17 00:00:00 2001 From: Michael Scharf Date: Wed, 23 Dec 2020 17:17:22 +0100 Subject: [PATCH] Use `job_id` instead 'id' in `job` The code does not work as documented, because there is no `'id'` key in `job`. --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index c2e6f53..61e4a2c 100644 --- a/README.rst +++ b/README.rst @@ -68,11 +68,11 @@ jobs:: job = client.jobs_create(emails) # all state-changing methods return a status object - resp = client.jobs_parse(job['id'], auto_start=False) + resp = client.jobs_parse(job['job_id'], auto_start=False) assert resp['status'] == 'success' - client.jobs_start(job['id']) - progress = client.jobs_status(job['id']) + client.jobs_start(job['job_id']) + progress = client.jobs_status(job['job_id']) print(progress) # dict with keys 'job_status', 'started', 'percent_complete', etc When creating a job, you may attach "metadata" in the form of additional keys