kaltura-client 15.17.0 → 16.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +1 -1
- data/lib/kaltura_client.rb +52 -2
- data/lib/kaltura_enums.rb +19 -0
- data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +1 -0
- data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +13 -0
- data/lib/kaltura_plugins/kaltura_capture_space_client_plugin.rb +36 -0
- data/lib/kaltura_plugins/kaltura_conference_client_plugin.rb +152 -0
- data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +1 -0
- data/lib/kaltura_plugins/kaltura_cross_kaltura_distribution_client_plugin.rb +5 -0
- data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +12 -0
- data/lib/kaltura_plugins/kaltura_interactivity_client_plugin.rb +217 -0
- data/lib/kaltura_plugins/kaltura_live_cluster_client_plugin.rb +60 -0
- data/lib/kaltura_plugins/kaltura_podcast_distribution_client_plugin.rb +140 -0
- data/lib/kaltura_plugins/kaltura_rating_client_plugin.rb +165 -0
- data/lib/kaltura_plugins/kaltura_reach_client_plugin.rb +90 -24
- data/lib/kaltura_plugins/kaltura_registration_client_plugin.rb +51 -0
- data/lib/kaltura_plugins/kaltura_scheduled_task_client_plugin.rb +8 -0
- data/lib/kaltura_plugins/kaltura_sip_client_plugin.rb +160 -0
- data/lib/kaltura_plugins/kaltura_sso_client_plugin.rb +282 -0
- data/lib/kaltura_plugins/kaltura_thumbnail_client_plugin.rb +63 -0
- data/lib/kaltura_plugins/kaltura_vendor_client_plugin.rb +180 -0
- data/lib/kaltura_plugins/kaltura_watch_later_client_plugin.rb +101 -0
- data/lib/kaltura_types.rb +247 -6
- metadata +14 -3
@@ -0,0 +1,217 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2020 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
require File.dirname(__FILE__) + '/kaltura_file_sync_client_plugin.rb'
|
30
|
+
|
31
|
+
module Kaltura
|
32
|
+
|
33
|
+
class KalturaBaseInteractivity < KalturaObjectBase
|
34
|
+
attr_accessor :data
|
35
|
+
attr_accessor :version
|
36
|
+
attr_accessor :entry_id
|
37
|
+
# Interactivity update date as Unix timestamp (In seconds)
|
38
|
+
attr_accessor :updated_at
|
39
|
+
|
40
|
+
def version=(val)
|
41
|
+
@version = val.to_i
|
42
|
+
end
|
43
|
+
def updated_at=(val)
|
44
|
+
@updated_at = val.to_i
|
45
|
+
end
|
46
|
+
|
47
|
+
def from_xml(xml_element)
|
48
|
+
super
|
49
|
+
if xml_element.elements['data'] != nil
|
50
|
+
self.data = xml_element.elements['data'].text
|
51
|
+
end
|
52
|
+
if xml_element.elements['version'] != nil
|
53
|
+
self.version = xml_element.elements['version'].text
|
54
|
+
end
|
55
|
+
if xml_element.elements['entryId'] != nil
|
56
|
+
self.entry_id = xml_element.elements['entryId'].text
|
57
|
+
end
|
58
|
+
if xml_element.elements['updatedAt'] != nil
|
59
|
+
self.updated_at = xml_element.elements['updatedAt'].text
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
class KalturaInteractivity < KalturaBaseInteractivity
|
66
|
+
|
67
|
+
|
68
|
+
def from_xml(xml_element)
|
69
|
+
super
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
class KalturaVolatileInteractivity < KalturaBaseInteractivity
|
75
|
+
|
76
|
+
|
77
|
+
def from_xml(xml_element)
|
78
|
+
super
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
class KalturaInteractivityService < KalturaServiceBase
|
85
|
+
def initialize(client)
|
86
|
+
super(client)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Add a interactivity object
|
90
|
+
# @return [KalturaInteractivity]
|
91
|
+
def add(entry_id, kaltura_interactivity)
|
92
|
+
kparams = {}
|
93
|
+
client.add_param(kparams, 'entryId', entry_id)
|
94
|
+
client.add_param(kparams, 'kalturaInteractivity', kaltura_interactivity)
|
95
|
+
client.queue_service_action_call('interactivity_interactivity', 'add', 'KalturaInteractivity', kparams)
|
96
|
+
if (client.is_multirequest)
|
97
|
+
return nil
|
98
|
+
end
|
99
|
+
return client.do_queue()
|
100
|
+
end
|
101
|
+
|
102
|
+
# Delete a interactivity object by entry id
|
103
|
+
# @return []
|
104
|
+
def delete(entry_id)
|
105
|
+
kparams = {}
|
106
|
+
client.add_param(kparams, 'entryId', entry_id)
|
107
|
+
client.queue_service_action_call('interactivity_interactivity', 'delete', '', kparams)
|
108
|
+
if (client.is_multirequest)
|
109
|
+
return nil
|
110
|
+
end
|
111
|
+
return client.do_queue()
|
112
|
+
end
|
113
|
+
|
114
|
+
# Retrieve a interactivity object by entry id
|
115
|
+
# @return [KalturaInteractivity]
|
116
|
+
def get(entry_id)
|
117
|
+
kparams = {}
|
118
|
+
client.add_param(kparams, 'entryId', entry_id)
|
119
|
+
client.queue_service_action_call('interactivity_interactivity', 'get', 'KalturaInteractivity', kparams)
|
120
|
+
if (client.is_multirequest)
|
121
|
+
return nil
|
122
|
+
end
|
123
|
+
return client.do_queue()
|
124
|
+
end
|
125
|
+
|
126
|
+
# Update an existing interactivity object
|
127
|
+
# @return [KalturaInteractivity]
|
128
|
+
def update(entry_id, version, kaltura_interactivity)
|
129
|
+
kparams = {}
|
130
|
+
client.add_param(kparams, 'entryId', entry_id)
|
131
|
+
client.add_param(kparams, 'version', version)
|
132
|
+
client.add_param(kparams, 'kalturaInteractivity', kaltura_interactivity)
|
133
|
+
client.queue_service_action_call('interactivity_interactivity', 'update', 'KalturaInteractivity', kparams)
|
134
|
+
if (client.is_multirequest)
|
135
|
+
return nil
|
136
|
+
end
|
137
|
+
return client.do_queue()
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
class KalturaVolatileInteractivityService < KalturaServiceBase
|
142
|
+
def initialize(client)
|
143
|
+
super(client)
|
144
|
+
end
|
145
|
+
|
146
|
+
# add a volatile interactivity object
|
147
|
+
# @return [KalturaVolatileInteractivity]
|
148
|
+
def add(entry_id, kaltura_volatile_interactivity)
|
149
|
+
kparams = {}
|
150
|
+
client.add_param(kparams, 'entryId', entry_id)
|
151
|
+
client.add_param(kparams, 'kalturaVolatileInteractivity', kaltura_volatile_interactivity)
|
152
|
+
client.queue_service_action_call('interactivity_volatileinteractivity', 'add', 'KalturaVolatileInteractivity', kparams)
|
153
|
+
if (client.is_multirequest)
|
154
|
+
return nil
|
155
|
+
end
|
156
|
+
return client.do_queue()
|
157
|
+
end
|
158
|
+
|
159
|
+
# Delete a volatile interactivity object by entry id
|
160
|
+
# @return []
|
161
|
+
def delete(entry_id)
|
162
|
+
kparams = {}
|
163
|
+
client.add_param(kparams, 'entryId', entry_id)
|
164
|
+
client.queue_service_action_call('interactivity_volatileinteractivity', 'delete', '', kparams)
|
165
|
+
if (client.is_multirequest)
|
166
|
+
return nil
|
167
|
+
end
|
168
|
+
return client.do_queue()
|
169
|
+
end
|
170
|
+
|
171
|
+
# Retrieve a volatile interactivity object by entry id
|
172
|
+
# @return [KalturaVolatileInteractivity]
|
173
|
+
def get(entry_id)
|
174
|
+
kparams = {}
|
175
|
+
client.add_param(kparams, 'entryId', entry_id)
|
176
|
+
client.queue_service_action_call('interactivity_volatileinteractivity', 'get', 'KalturaVolatileInteractivity', kparams)
|
177
|
+
if (client.is_multirequest)
|
178
|
+
return nil
|
179
|
+
end
|
180
|
+
return client.do_queue()
|
181
|
+
end
|
182
|
+
|
183
|
+
# Update a volatile interactivity object
|
184
|
+
# @return [KalturaVolatileInteractivity]
|
185
|
+
def update(entry_id, version, kaltura_volatile_interactivity)
|
186
|
+
kparams = {}
|
187
|
+
client.add_param(kparams, 'entryId', entry_id)
|
188
|
+
client.add_param(kparams, 'version', version)
|
189
|
+
client.add_param(kparams, 'kalturaVolatileInteractivity', kaltura_volatile_interactivity)
|
190
|
+
client.queue_service_action_call('interactivity_volatileinteractivity', 'update', 'KalturaVolatileInteractivity', kparams)
|
191
|
+
if (client.is_multirequest)
|
192
|
+
return nil
|
193
|
+
end
|
194
|
+
return client.do_queue()
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
class KalturaClient < KalturaClientBase
|
199
|
+
attr_reader :interactivity_service
|
200
|
+
def interactivity_service
|
201
|
+
if (@interactivity_service == nil)
|
202
|
+
@interactivity_service = KalturaInteractivityService.new(self)
|
203
|
+
end
|
204
|
+
return @interactivity_service
|
205
|
+
end
|
206
|
+
|
207
|
+
attr_reader :volatile_interactivity_service
|
208
|
+
def volatile_interactivity_service
|
209
|
+
if (@volatile_interactivity_service == nil)
|
210
|
+
@volatile_interactivity_service = KalturaVolatileInteractivityService.new(self)
|
211
|
+
end
|
212
|
+
return @volatile_interactivity_service
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2020 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
|
30
|
+
module Kaltura
|
31
|
+
|
32
|
+
class KalturaLiveClusterMediaServerNode < KalturaMediaServerNode
|
33
|
+
|
34
|
+
|
35
|
+
def from_xml(xml_element)
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
class KalturaLiveClusterMediaServerNodeBaseFilter < KalturaMediaServerNodeFilter
|
42
|
+
|
43
|
+
|
44
|
+
def from_xml(xml_element)
|
45
|
+
super
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
class KalturaLiveClusterMediaServerNodeFilter < KalturaLiveClusterMediaServerNodeBaseFilter
|
51
|
+
|
52
|
+
|
53
|
+
def from_xml(xml_element)
|
54
|
+
super
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2020 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
require File.dirname(__FILE__) + '/kaltura_content_distribution_client_plugin.rb'
|
30
|
+
|
31
|
+
module Kaltura
|
32
|
+
|
33
|
+
class KalturaPodcastDistributionProfileOrderBy
|
34
|
+
CREATED_AT_ASC = "+createdAt"
|
35
|
+
UPDATED_AT_ASC = "+updatedAt"
|
36
|
+
CREATED_AT_DESC = "-createdAt"
|
37
|
+
UPDATED_AT_DESC = "-updatedAt"
|
38
|
+
end
|
39
|
+
|
40
|
+
class KalturaPodcastDistributionProviderOrderBy
|
41
|
+
end
|
42
|
+
|
43
|
+
class KalturaPodcastDistributionJobProviderData < KalturaDistributionJobProviderData
|
44
|
+
attr_accessor :xml
|
45
|
+
attr_accessor :metadata_profile_id
|
46
|
+
attr_accessor :distribution_profile_id
|
47
|
+
|
48
|
+
def metadata_profile_id=(val)
|
49
|
+
@metadata_profile_id = val.to_i
|
50
|
+
end
|
51
|
+
def distribution_profile_id=(val)
|
52
|
+
@distribution_profile_id = val.to_i
|
53
|
+
end
|
54
|
+
|
55
|
+
def from_xml(xml_element)
|
56
|
+
super
|
57
|
+
if xml_element.elements['xml'] != nil
|
58
|
+
self.xml = xml_element.elements['xml'].text
|
59
|
+
end
|
60
|
+
if xml_element.elements['metadataProfileId'] != nil
|
61
|
+
self.metadata_profile_id = xml_element.elements['metadataProfileId'].text
|
62
|
+
end
|
63
|
+
if xml_element.elements['distributionProfileId'] != nil
|
64
|
+
self.distribution_profile_id = xml_element.elements['distributionProfileId'].text
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
class KalturaPodcastDistributionProfile < KalturaDistributionProfile
|
71
|
+
attr_accessor :xsl
|
72
|
+
attr_accessor :feed_id
|
73
|
+
attr_accessor :metadata_profile_id
|
74
|
+
|
75
|
+
def metadata_profile_id=(val)
|
76
|
+
@metadata_profile_id = val.to_i
|
77
|
+
end
|
78
|
+
|
79
|
+
def from_xml(xml_element)
|
80
|
+
super
|
81
|
+
if xml_element.elements['xsl'] != nil
|
82
|
+
self.xsl = xml_element.elements['xsl'].text
|
83
|
+
end
|
84
|
+
if xml_element.elements['feedId'] != nil
|
85
|
+
self.feed_id = xml_element.elements['feedId'].text
|
86
|
+
end
|
87
|
+
if xml_element.elements['metadataProfileId'] != nil
|
88
|
+
self.metadata_profile_id = xml_element.elements['metadataProfileId'].text
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
class KalturaPodcastDistributionProvider < KalturaDistributionProvider
|
95
|
+
|
96
|
+
|
97
|
+
def from_xml(xml_element)
|
98
|
+
super
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
class KalturaPodcastDistributionProfileBaseFilter < KalturaDistributionProfileFilter
|
104
|
+
|
105
|
+
|
106
|
+
def from_xml(xml_element)
|
107
|
+
super
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
class KalturaPodcastDistributionProviderBaseFilter < KalturaDistributionProviderFilter
|
113
|
+
|
114
|
+
|
115
|
+
def from_xml(xml_element)
|
116
|
+
super
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
class KalturaPodcastDistributionProfileFilter < KalturaPodcastDistributionProfileBaseFilter
|
122
|
+
|
123
|
+
|
124
|
+
def from_xml(xml_element)
|
125
|
+
super
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
class KalturaPodcastDistributionProviderFilter < KalturaPodcastDistributionProviderBaseFilter
|
131
|
+
|
132
|
+
|
133
|
+
def from_xml(xml_element)
|
134
|
+
super
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
end
|
@@ -0,0 +1,165 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2020 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
|
30
|
+
module Kaltura
|
31
|
+
|
32
|
+
class KalturaRatingCountOrderBy
|
33
|
+
end
|
34
|
+
|
35
|
+
class KalturaRatingCount < KalturaObjectBase
|
36
|
+
attr_accessor :entry_id
|
37
|
+
attr_accessor :rank
|
38
|
+
attr_accessor :count
|
39
|
+
|
40
|
+
def rank=(val)
|
41
|
+
@rank = val.to_i
|
42
|
+
end
|
43
|
+
def count=(val)
|
44
|
+
@count = val.to_i
|
45
|
+
end
|
46
|
+
|
47
|
+
def from_xml(xml_element)
|
48
|
+
super
|
49
|
+
if xml_element.elements['entryId'] != nil
|
50
|
+
self.entry_id = xml_element.elements['entryId'].text
|
51
|
+
end
|
52
|
+
if xml_element.elements['rank'] != nil
|
53
|
+
self.rank = xml_element.elements['rank'].text
|
54
|
+
end
|
55
|
+
if xml_element.elements['count'] != nil
|
56
|
+
self.count = xml_element.elements['count'].text
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
class KalturaRatingCountListResponse < KalturaListResponse
|
63
|
+
attr_accessor :objects
|
64
|
+
|
65
|
+
|
66
|
+
def from_xml(xml_element)
|
67
|
+
super
|
68
|
+
if xml_element.elements['objects'] != nil
|
69
|
+
self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaRatingCount')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
class KalturaRatingCountBaseFilter < KalturaRelatedFilter
|
76
|
+
attr_accessor :entry_id_equal
|
77
|
+
attr_accessor :rank_in
|
78
|
+
|
79
|
+
|
80
|
+
def from_xml(xml_element)
|
81
|
+
super
|
82
|
+
if xml_element.elements['entryIdEqual'] != nil
|
83
|
+
self.entry_id_equal = xml_element.elements['entryIdEqual'].text
|
84
|
+
end
|
85
|
+
if xml_element.elements['rankIn'] != nil
|
86
|
+
self.rank_in = xml_element.elements['rankIn'].text
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
class KalturaRatingCountFilter < KalturaRatingCountBaseFilter
|
93
|
+
|
94
|
+
|
95
|
+
def from_xml(xml_element)
|
96
|
+
super
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
# Allows user to manipulate their entry rating
|
103
|
+
class KalturaRatingService < KalturaServiceBase
|
104
|
+
def initialize(client)
|
105
|
+
super(client)
|
106
|
+
end
|
107
|
+
|
108
|
+
# @return [int]
|
109
|
+
def check_rating(entry_id)
|
110
|
+
kparams = {}
|
111
|
+
client.add_param(kparams, 'entryId', entry_id)
|
112
|
+
client.queue_service_action_call('rating_rating', 'checkRating', 'int', kparams)
|
113
|
+
if (client.is_multirequest)
|
114
|
+
return nil
|
115
|
+
end
|
116
|
+
return client.do_queue()
|
117
|
+
end
|
118
|
+
|
119
|
+
# @return [KalturaRatingCountListResponse]
|
120
|
+
def get_rating_counts(filter)
|
121
|
+
kparams = {}
|
122
|
+
client.add_param(kparams, 'filter', filter)
|
123
|
+
client.queue_service_action_call('rating_rating', 'getRatingCounts', 'KalturaRatingCountListResponse', kparams)
|
124
|
+
if (client.is_multirequest)
|
125
|
+
return nil
|
126
|
+
end
|
127
|
+
return client.do_queue()
|
128
|
+
end
|
129
|
+
|
130
|
+
# @return [int]
|
131
|
+
def rate(entry_id, rank)
|
132
|
+
kparams = {}
|
133
|
+
client.add_param(kparams, 'entryId', entry_id)
|
134
|
+
client.add_param(kparams, 'rank', rank)
|
135
|
+
client.queue_service_action_call('rating_rating', 'rate', 'int', kparams)
|
136
|
+
if (client.is_multirequest)
|
137
|
+
return nil
|
138
|
+
end
|
139
|
+
return client.do_queue()
|
140
|
+
end
|
141
|
+
|
142
|
+
# @return [bool]
|
143
|
+
def remove_rating(entry_id)
|
144
|
+
kparams = {}
|
145
|
+
client.add_param(kparams, 'entryId', entry_id)
|
146
|
+
client.queue_service_action_call('rating_rating', 'removeRating', 'bool', kparams)
|
147
|
+
if (client.is_multirequest)
|
148
|
+
return nil
|
149
|
+
end
|
150
|
+
return client.do_queue()
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
class KalturaClient < KalturaClientBase
|
155
|
+
attr_reader :rating_service
|
156
|
+
def rating_service
|
157
|
+
if (@rating_service == nil)
|
158
|
+
@rating_service = KalturaRatingService.new(self)
|
159
|
+
end
|
160
|
+
return @rating_service
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|
165
|
+
end
|