@@ -31,16 +31,16 @@ Create an instance of the Zencoder client. This will accept an API key and versi
3131Create a [ new job] ( https://app.zencoder.com/docs/api/jobs/create ) .
3232
3333``` python
34- zen .job.create(' s3://bucket/key.mp4' )
35- zen .job.create(' s3://bucket/key.mp4' ,
34+ client .job.create(' s3://bucket/key.mp4' )
35+ client .job.create(' s3://bucket/key.mp4' ,
3636 outputs = [{' label' : ' vp8 for the web' ,
3737 ' url' : ' s3://bucket/key_output.webm' }])
3838```
3939
4040This returns a ` zencoder.Response ` object. The body includes a Job ID, and one or more Output IDs (one for every output file created).
4141
4242``` python
43- response = zen .job.create(' s3://bucket/key.mp4' )
43+ response = client .job.create(' s3://bucket/key.mp4' )
4444response.code # 201
4545response.body[' id' ] # 12345
4646```
@@ -50,39 +50,40 @@ response.body['id'] # 12345
5050By default the jobs listing is paginated with 50 jobs per page and sorted by ID in descending order. You can pass two parameters to control the paging: ` page ` and ` per_page ` .
5151
5252``` python
53- zen .job.list(per_page = 10 )
54- zen .job.list(per_page = 10 , page = 2 )
53+ client .job.list(per_page = 10 )
54+ client .job.list(per_page = 10 , page = 2 )
5555```
5656
5757Get [ details] ( https://app.zencoder.com/docs/api/jobs/show ) about a job.
5858
5959The number passed to ` details ` is the ID of a Zencoder job.
6060
6161``` python
62- zen .job.details(1 )
62+ client .job.details(1 )
6363```
6464
6565Get [ progress] ( https://app.zencoder.com/docs/api/jobs/progress ) on a job.
6666
6767The number passed to ` progress ` is the ID of a Zencoder job.
6868
6969``` python
70- zen .job.progress(1 )
70+ client .job.progress(1 )
7171```
7272
7373[ Resubmit] ( https://app.zencoder.com/docs/api/jobs/resubmit ) a job
7474
7575The number passed to ` resubmit ` is the ID of a Zencoder job.
7676
7777``` python
78- zen .job.resubmit(1 )
78+ client .job.resubmit(1 )
7979```
8080
8181[ Cancel] ( https://app.zencoder.com/docs/api/jobs/cancel ) a job
8282
8383The number passed to ` cancel ` is the ID of a Zencoder job.
8484
8585``` python
86+ client.job.cancel(1 )
8687```
8788
8889## [ Inputs] ( https://app.zencoder.com/docs/api/inputs )
@@ -92,15 +93,15 @@ Get [details](https://app.zencoder.com/docs/api/inputs/show) about an input.
9293The number passed to ` details ` is the ID of a Zencoder job.
9394
9495``` python
95- zen .input.details(1 )
96+ client .input.details(1 )
9697```
9798
9899Get [ progress] ( https://app.zencoder.com/docs/api/inputs/progress ) for an input.
99100
100101The number passed to ` progress ` is the ID of a Zencoder job.
101102
102103``` python
103- zen .input.progress(1 )
104+ client .input.progress(1 )
104105```
105106
106107## [ Outputs] ( https://app.zencoder.com/docs/api/outputs )
@@ -110,15 +111,15 @@ Get [details](https://app.zencoder.com/docs/api/outputs/show) about an output.
110111The number passed to ` details ` is the ID of a Zencoder job.
111112
112113``` python
113- zen .output.details(1 )
114+ client .output.details(1 )
114115```
115116
116117Get [ progress] ( https://app.zencoder.com/docs/api/outputs/progress ) for an output.
117118
118119The number passed to ` progress ` is the ID of a Zencoder job.
119120
120121``` python
121- zen .output.progress(1 )
122+ client .output.progress(1 )
122123```
123124
124125## [ Reports] ( https://app.zencoder.com/docs/api/reports )
@@ -129,11 +130,11 @@ Get [all usage](https://app.zencoder.com/docs/api/reports/all) (Live + VOD).
129130
130131``` python
131132import datetime
132- zen .report.all()
133- zen .report.all(grouping = " foo" )
134- zen .report.all(start_date = datetime.date(2011 , 10 , 30 ),
133+ client .report.all()
134+ client .report.all(grouping = " foo" )
135+ client .report.all(start_date = datetime.date(2011 , 10 , 30 ),
135136 end_date = datetime.date(2011 , 11 , 24 ))
136- zen .report.all(start_date = datetime.date(2011 , 10 , 30 ),
137+ client .report.all(start_date = datetime.date(2011 , 10 , 30 ),
137138 end_date = datetime.date(2011 , 11 , 24 ),
138139 grouping = " foo" )
139140```
@@ -142,11 +143,11 @@ Get [VOD usage](https://app.zencoder.com/docs/api/reports/vod).
142143
143144``` python
144145import datetime
145- zen .report.vod()
146- zen .report.vod(grouping = " foo" )
147- zen .report.vod(start_date = datetime.date(2011 , 10 , 30 ),
146+ client .report.vod()
147+ client .report.vod(grouping = " foo" )
148+ client .report.vod(start_date = datetime.date(2011 , 10 , 30 ),
148149 end_date = datetime.date(2011 , 11 , 24 ))
149- zen .report.vod(start_date = datetime.date(2011 , 10 , 30 ),
150+ client .report.vod(start_date = datetime.date(2011 , 10 , 30 ),
150151 end_date = datetime.date(2011 , 11 , 24 ),
151152 grouping = " foo" )
152153```
@@ -155,11 +156,11 @@ Get [Live usage](https://app.zencoder.com/docs/api/reports/live).
155156
156157``` python
157158import datetime
158- zen .report.live()
159- zen .report.live(grouping = " foo" )
160- zen .report.live(start_date = datetime.date(2011 , 10 , 30 ),
159+ client .report.live()
160+ client .report.live(grouping = " foo" )
161+ client .report.live(start_date = datetime.date(2011 , 10 , 30 ),
161162 end_date = datetime.date(2011 , 11 , 24 ))
162- zen .report.live(start_date = datetime.date(2011 , 10 , 30 ),
163+ client .report.live(start_date = datetime.date(2011 , 10 , 30 ),
163164 end_date = datetime.date(2011 , 11 , 24 ),
164165 grouping = " foo" )
165166```
@@ -171,28 +172,28 @@ Create a [new account](https://app.zencoder.com/docs/api/accounts/create). A uni
171172No API Key is required.
172173
173174``` python
174- zen .account.create(' foo@example.com' , tos = 1 )
175- zen .account.create(' foo@example.com' , tos = 1 ,
175+ client .account.create(' foo@example.com' , tos = 1 )
176+ client .account.create(' foo@example.com' , tos = 1 ,
176177 options = {' password' : ' abcd1234' ,
177178 ' affiliate_code' : ' foo' })
178179```
179180
180181Get [ details] ( https://app.zencoder.com/docs/api/accounts/show ) about the current account.
181182
182183``` python
183- zen .account.details()
184+ client .account.details()
184185```
185186
186187Turn [ integration mode] ( https://app.zencoder.com/docs/api/accounts/integration ) on (all jobs are test jobs).
187188
188189``` python
189- zen .account.integration()
190+ client .account.integration()
190191```
191192
192193Turn off integration mode, which means your account is live (and you'll be billed for jobs).
193194
194195``` python
195- zen .account.live()
196+ client .account.live()
196197```
197198## Tests
198199
0 commit comments