Class: Kaltura::Service::PlaylistService

Inherits:
BaseService show all
Defined in:
lib/kaltura/service/playlist_service.rb

Instance Attribute Summary

Attributes inherited from BaseService

#client

Instance Method Summary collapse

Methods inherited from BaseService

#initialize, #perform_request

Constructor Details

This class inherits a constructor from Kaltura::Service::BaseService

Instance Method Details

#add(playlist, update_stats = false) ⇒ Object



5
6
7
8
9
10
# File 'lib/kaltura/service/playlist_service.rb', line 5

def add(playlist, update_stats=false)
	kparams = {}
	client.add_param(kparams, 'playlist', playlist)
	client.add_param(kparams, 'updateStats', update_stats)
	perform_request('playList','add',kparams,false)
end

#delete(id) ⇒ Object



27
28
29
30
31
# File 'lib/kaltura/service/playlist_service.rb', line 27

def delete(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	perform_request('playList','delete',kparams,false)
end

#execute(id, detailed = '') ⇒ Object



40
41
42
43
44
45
# File 'lib/kaltura/service/playlist_service.rb', line 40

def execute(id, detailed='')
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'detailed', detailed)
	perform_request('playList','execute',kparams,false)
end

#execute_from_content(playlist_type, playlist_content, detailed = '') ⇒ Object



47
48
49
50
51
52
53
# File 'lib/kaltura/service/playlist_service.rb', line 47

def execute_from_content(playlist_type, playlist_content, detailed='')
	kparams = {}
	client.add_param(kparams, 'playlistType', playlist_type)
	client.add_param(kparams, 'playlistContent', playlist_content)
	client.add_param(kparams, 'detailed', detailed)
	perform_request('playList','executeFromContent',kparams,false)
end

#execute_from_filters(filters, total_results, detailed = '') ⇒ Object



55
56
57
58
59
60
61
62
63
# File 'lib/kaltura/service/playlist_service.rb', line 55

def execute_from_filters(filters, total_results, detailed='')
	kparams = {}
	filters.each do |obj|
		client.add_param(kparams, 'filters', obj)
	end
	client.add_param(kparams, 'totalResults', total_results)
	client.add_param(kparams, 'detailed', detailed)
	perform_request('playList','executeFromFilters',kparams)
end

#get(id, version = -1)) ⇒ Object



12
13
14
15
16
17
# File 'lib/kaltura/service/playlist_service.rb', line 12

def get(id, version=-1)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'version', version)
	perform_request('playList','get',kparams,false)
end

#get_stats_from_content(playlist_type, playlist_content) ⇒ Object



65
66
67
68
69
70
# File 'lib/kaltura/service/playlist_service.rb', line 65

def get_stats_from_content(playlist_type, playlist_content)
	kparams = {}
	client.add_param(kparams, 'playlistType', playlist_type)
	client.add_param(kparams, 'playlistContent', playlist_content)
	perform_request('playList','getStatsFromContent',kparams,false)
end

#list(filter = nil, pager = nil) ⇒ Object



33
34
35
36
37
38
# File 'lib/kaltura/service/playlist_service.rb', line 33

def list(filter=nil, pager=nil)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	perform_request('playList','list',kparams,false)
end

#update(id, playlist, update_stats = false) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/kaltura/service/playlist_service.rb', line 19

def update(id, playlist, update_stats=false)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'playlist', playlist)
	client.add_param(kparams, 'updateStats', update_stats)
	perform_request('playList','update',kparams,false)
end