Class: Sproutvideo::Playlist
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/playlist.rb', line 4
def self.create(options={})
post("/playlists", options)
end
|
.destroy(playlist_id, options = {}) ⇒ Object
25
26
27
|
# File 'lib/sproutvideo/playlist.rb', line 25
def self.destroy(playlist_id, options={})
delete("/playlists/#{playlist_id}", options)
end
|
.details(playlist_id, options = {}) ⇒ Object
17
18
19
|
# File 'lib/sproutvideo/playlist.rb', line 17
def self.details(playlist_id, options={})
get("/playlists/#{playlist_id}", options)
end
|
.list(options = {}) ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/sproutvideo/playlist.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("/playlists", params)
end
|
.update(playlist_id, options = {}) ⇒ Object
21
22
23
|
# File 'lib/sproutvideo/playlist.rb', line 21
def self.update(playlist_id, options={})
put("/playlists/#{playlist_id}", options)
end
|