Class: Sproutvideo::Subtitle

Inherits:
Resource show all
Defined in:
lib/sproutvideo/subtitle.rb

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/subtitle.rb', line 3

def self.create(options = {})
  post(build_url(options), options)
end

.destroy(options = {}) ⇒ Object



25
26
27
# File 'lib/sproutvideo/subtitle.rb', line 25

def self.destroy(options = {})
  delete("#{build_url(options)}/#{options[:id]}", options)
end

.details(options = {}) ⇒ Object



17
18
19
# File 'lib/sproutvideo/subtitle.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/subtitle.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/subtitle.rb', line 21

def self.update(options = {})
  put("#{build_url(options)}/#{options[:id]}", options)
end