Class: Sproutvideo::CallToAction
Class Method Summary
collapse
Methods inherited from Resource
api_key, base_url, delete, get, post, put, upload
Class Method Details
.create(options = {}) ⇒ Object
3
4
5
|
# File 'lib/sproutvideo/call_to_action.rb', line 3
def self.create(options = {})
post(build_url(options), options)
end
|
.destroy(options = {}) ⇒ Object
25
26
27
|
# File 'lib/sproutvideo/call_to_action.rb', line 25
def self.destroy(options = {})
delete("#{build_url(options)}/#{options[:id]}", options)
end
|
.details(options = {}) ⇒ Object
17
18
19
|
# File 'lib/sproutvideo/call_to_action.rb', line 17
def self.details(options = {})
get("#{build_url(options)}/#{options[:id]}", options)
end
|
.list(options = {}) ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'lib/sproutvideo/call_to_action.rb', line 7
def self.list(options = {})
url = build_url(options)
params = {
:page => options.delete(:page) || 1,
:per_page => options.delete(:per_page) || 25
}
params = params.merge(options)
get(url, params)
end
|
.update(options = {}) ⇒ Object
21
22
23
|
# File 'lib/sproutvideo/call_to_action.rb', line 21
def self.update(options = {})
put("#{build_url(options)}/#{options[:id]}", options)
end
|