Class: Sproutvideo::AccessGrant

Inherits:
Resource
  • Object
show all
Defined in:
lib/sproutvideo/access_grant.rb

Class Method Summary collapse

Methods inherited from Resource

api_key, base_url, delete, get, post, put, upload

Class Method Details

.create(options = {}) ⇒ Object



4
5
6
# File 'lib/sproutvideo/access_grant.rb', line 4

def self.create(options={})
  post("/access_grants", options)
end

.destroy(access_grant_id, options = {}) ⇒ Object



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

def self.destroy(access_grant_id, options={})
  delete("/access_grants/#{access_grant_id}", options)
end

.details(access_grant_id, options = {}) ⇒ Object



17
18
19
# File 'lib/sproutvideo/access_grant.rb', line 17

def self.details(access_grant_id, options={})
  get("/access_grants/#{access_grant_id}", options)
end

.list(options = {}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/sproutvideo/access_grant.rb', line 8

def self.list(options={})
  params = {
    :page => options.delete(:page) || 1,
    :per_page => options.delete(:per_page) || 25
  }
  params = params.merge(options)
  get("/access_grants", params)
end

.update(access_grant_id, options = {}) ⇒ Object



21
22
23
# File 'lib/sproutvideo/access_grant.rb', line 21

def self.update(access_grant_id, options={})
  put("/access_grants/#{access_grant_id}", options)
end