You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+204Lines changed: 204 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,210 @@ zen = Zencoder(api_version='v1')
55
55
# set to the edge version: https://app.zencoder.com/api/
56
56
zen = Zencoder(api_version='edge')
57
57
```
58
+
59
+
## Jobs
60
+
61
+
There's more you can do on jobs than anything else in the API. The following methods are available: `list`, `create`, `details`, `progress`, `resubmit`, `cancel`, `delete`.
62
+
63
+
### create
64
+
65
+
```python
66
+
zen.job.create('s3://bucket/key.mp4')
67
+
zen.job.create('s3://bucket/key.mp4',
68
+
outputs=[{'label': 'vp8 for the web',
69
+
'url': 's3://bucket/key_output.webm'}])
70
+
```
71
+
72
+
This returns a `zencoder.Response` object. The body includes a Job ID, and one or more Output IDs (one for every output file created).
73
+
74
+
```python
75
+
response = zen.job.create('s3://bucket/key.mp4')
76
+
response.code # 201
77
+
response.body['id'] # 12345
78
+
```
79
+
80
+
### list
81
+
82
+
By 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`.
83
+
84
+
```python
85
+
zen.job.list(per_page=10)
86
+
zen.job.list(per_page=10, page=2)
87
+
```
88
+
89
+
### details
90
+
91
+
The number passed to `details` is the ID of a Zencoder job.
92
+
93
+
```python
94
+
zen.job.details(1)
95
+
```
96
+
97
+
### progress
98
+
99
+
The number passed to `progress` is the ID of a Zencoder job.
100
+
101
+
```python
102
+
zen.job.progress(1)
103
+
```
104
+
105
+
### resubmit
106
+
107
+
The number passed to `resubmit` is the ID of a Zencoder job.
108
+
109
+
```python
110
+
zen.job.resubmit(1)
111
+
```
112
+
113
+
### cancel
114
+
115
+
The number passed to `cancel` is the ID of a Zencoder job.
116
+
117
+
```python
118
+
zen.job.cancel(1)
119
+
```
120
+
121
+
### delete
122
+
123
+
The number passed to `delete` is the ID of a Zencoder job.
124
+
125
+
```python
126
+
zen.job.delete(1)
127
+
```
128
+
129
+
## Inputs
130
+
131
+
### details
132
+
133
+
The number passed to `details` is the ID of a Zencoder job.
134
+
135
+
```python
136
+
zen.input.details(1)
137
+
```
138
+
139
+
### progress
140
+
141
+
The number passed to `progress` is the ID of a Zencoder job.
142
+
143
+
```python
144
+
zen.input.progress(1)
145
+
```
146
+
147
+
## Outputs
148
+
149
+
### details
150
+
151
+
The number passed to `details` is the ID of a Zencoder job.
152
+
153
+
```python
154
+
zen.output.details(1)
155
+
```
156
+
157
+
### progress
158
+
159
+
The number passed to `progress` is the ID of a Zencoder job.
160
+
161
+
```python
162
+
zen.output.progress(1)
163
+
```
164
+
165
+
## Accounts
166
+
167
+
### create
168
+
169
+
No API Key is required.
170
+
171
+
```python
172
+
zen.account.create('foo@example.com', tos=1)
173
+
zen.account.create('foo@example.com', tos=1,
174
+
options={'password': 'abcd1234',
175
+
'affiliate_code': 'foo'})
176
+
```
177
+
178
+
### details
179
+
180
+
```python
181
+
zen.account.details()
182
+
```
183
+
184
+
### integration
185
+
186
+
This will put your account into integration mode (site-wide).
187
+
188
+
```python
189
+
zen.account.integration()
190
+
```
191
+
192
+
### live
193
+
194
+
This will put your account into live mode (site-wide).
195
+
196
+
```python
197
+
zen.account.live()
198
+
```
199
+
200
+
## Reports
201
+
202
+
### minutes
203
+
204
+
This will list the minutes used for your account within a certain, configurable range.
0 commit comments