Class: Zencoder::Job
Class Method Summary
collapse
Methods inherited from Resource
api_key, base_url, delete, get, post, put
Methods included from Serializer
#decode, #encode, included
Class Method Details
.cancel(job_id, options = {}) ⇒ Object
29
30
31
|
# File 'lib/zencoder/job.rb', line 29
def self.cancel(job_id, options={})
put("/jobs/#{job_id}/cancel", nil, options)
end
|
.create(params = {}, options = {}) ⇒ Object
4
5
6
|
# File 'lib/zencoder/job.rb', line 4
def self.create(params={}, options={})
post("/jobs", params, options)
end
|
.details(job_id, options = {}) ⇒ Object
17
18
19
|
# File 'lib/zencoder/job.rb', line 17
def self.details(job_id, options={})
get("/jobs/#{job_id}", options)
end
|
.finish(job_id, options = {}) ⇒ Object
33
34
35
|
# File 'lib/zencoder/job.rb', line 33
def self.finish(job_id, options={})
put("/jobs/#{job_id}/finish", nil, options)
end
|
.list(options = {}) ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/zencoder/job.rb', line 8
def self.list(options={})
options = options.dup
params = { :page => options.delete(:page) || 1,
:per_page => options.delete(:per_page) || 50,
:state => options.delete(:state) }
get("/jobs", merge_params(options, params))
end
|
.progress(job_id, options = {}) ⇒ Object
21
22
23
|
# File 'lib/zencoder/job.rb', line 21
def self.progress(job_id, options={})
get("/jobs/#{job_id}/progress", options)
end
|
.resubmit(job_id, options = {}) ⇒ Object
25
26
27
|
# File 'lib/zencoder/job.rb', line 25
def self.resubmit(job_id, options={})
put("/jobs/#{job_id}/resubmit", nil, options)
end
|