Class: Zencoder::Resource
- Inherits:
-
Object
- Object
- Zencoder::Resource
show all
- Includes:
- Serializer
- Defined in:
- lib/zencoder/resource.rb
Class Method Summary
collapse
Methods included from Serializer
#decode, #encode, included
Class Method Details
.api_key ⇒ Object
6
7
8
|
# File 'lib/zencoder/resource.rb', line 6
def self.api_key
Zencoder.api_key
end
|
.base_url ⇒ Object
10
11
12
|
# File 'lib/zencoder/resource.rb', line 10
def self.base_url
Zencoder.base_url
end
|
.delete(path, options = {}) ⇒ Object
37
38
39
40
41
42
|
# File 'lib/zencoder/resource.rb', line 37
def self.delete(path, options={})
options = options.dup
url = url_for(path)
options = (options)
HTTP.delete(url, options)
end
|
.get(path, options = {}) ⇒ Object
30
31
32
33
34
35
|
# File 'lib/zencoder/resource.rb', line 30
def self.get(path, options={})
options = options.dup
url = url_for(path, options)
options = (options)
HTTP.get(url, options)
end
|
.post(path, params = {}, options = {}) ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/zencoder/resource.rb', line 14
def self.post(path, params={}, options={})
options = options.dup
url = url_for(path, options)
body = encode(params)
options = (options)
HTTP.post(url, body, options)
end
|
.put(path, params = {}, options = {}) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/zencoder/resource.rb', line 22
def self.put(path, params={}, options={})
options = options.dup
url = url_for(path, options)
body = encode(params)
options = (options)
HTTP.put(url, body, options)
end
|