kaltura-client 15.20.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -94,7 +94,9 @@ module Kaltura
94
94
  EIGHT_HOURS = 28800
95
95
  TWELVE_HOURS = 43200
96
96
  TWENTY_FOUR_HOURS = 86400
97
+ ONE_BUSINESS_DAY = 129600
97
98
  FORTY_EIGHT_HOURS = 172800
99
+ TWO_BUSINESS_DAYS = 216000
98
100
  FOUR_DAYS = 345600
99
101
  FIVE_DAYS = 432000
100
102
  TEN_DAYS = 864000
@@ -0,0 +1,51 @@
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 KalturaRegistrationUserEntry < KalturaUserEntry
33
+
34
+
35
+ def from_xml(xml_element)
36
+ super
37
+ end
38
+
39
+ end
40
+
41
+ class KalturaRegistrationUserEntryFilter < KalturaUserEntryFilter
42
+
43
+
44
+ def from_xml(xml_element)
45
+ super
46
+ end
47
+
48
+ end
49
+
50
+
51
+ end
@@ -0,0 +1,160 @@
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 KalturaSipServerNodeOrderBy
33
+ CREATED_AT_ASC = "+createdAt"
34
+ HEARTBEAT_TIME_ASC = "+heartbeatTime"
35
+ UPDATED_AT_ASC = "+updatedAt"
36
+ CREATED_AT_DESC = "-createdAt"
37
+ HEARTBEAT_TIME_DESC = "-heartbeatTime"
38
+ UPDATED_AT_DESC = "-updatedAt"
39
+ end
40
+
41
+ class KalturaSipEntryServerNode < KalturaEntryServerNode
42
+ attr_accessor :sip_room_id
43
+ attr_accessor :sip_primary_adp_id
44
+ attr_accessor :sip_secondary_adp_id
45
+
46
+
47
+ def from_xml(xml_element)
48
+ super
49
+ if xml_element.elements['sipRoomId'] != nil
50
+ self.sip_room_id = xml_element.elements['sipRoomId'].text
51
+ end
52
+ if xml_element.elements['sipPrimaryAdpId'] != nil
53
+ self.sip_primary_adp_id = xml_element.elements['sipPrimaryAdpId'].text
54
+ end
55
+ if xml_element.elements['sipSecondaryAdpId'] != nil
56
+ self.sip_secondary_adp_id = xml_element.elements['sipSecondaryAdpId'].text
57
+ end
58
+ end
59
+
60
+ end
61
+
62
+ class KalturaSipServerNode < KalturaServerNode
63
+
64
+
65
+ def from_xml(xml_element)
66
+ super
67
+ end
68
+
69
+ end
70
+
71
+ class KalturaSipEntryServerNodeBaseFilter < KalturaEntryServerNodeFilter
72
+
73
+
74
+ def from_xml(xml_element)
75
+ super
76
+ end
77
+
78
+ end
79
+
80
+ class KalturaSipServerNodeBaseFilter < KalturaServerNodeFilter
81
+
82
+
83
+ def from_xml(xml_element)
84
+ super
85
+ end
86
+
87
+ end
88
+
89
+ class KalturaSipEntryServerNodeFilter < KalturaSipEntryServerNodeBaseFilter
90
+
91
+
92
+ def from_xml(xml_element)
93
+ super
94
+ end
95
+
96
+ end
97
+
98
+ class KalturaSipServerNodeFilter < KalturaSipServerNodeBaseFilter
99
+
100
+
101
+ def from_xml(xml_element)
102
+ super
103
+ end
104
+
105
+ end
106
+
107
+
108
+ class KalturaPexipService < KalturaServiceBase
109
+ def initialize(client)
110
+ super(client)
111
+ end
112
+
113
+ # @return [string]
114
+ def generate_sip_url(entry_id, regenerate=false)
115
+ kparams = {}
116
+ client.add_param(kparams, 'entryId', entry_id)
117
+ client.add_param(kparams, 'regenerate', regenerate)
118
+ client.queue_service_action_call('sip_pexip', 'generateSipUrl', 'string', kparams)
119
+ if (client.is_multirequest)
120
+ return nil
121
+ end
122
+ return client.do_queue()
123
+ end
124
+
125
+ # @return [bool]
126
+ def handle_incoming_call()
127
+ kparams = {}
128
+ client.queue_service_action_call('sip_pexip', 'handleIncomingCall', 'bool', kparams)
129
+ if (client.is_multirequest)
130
+ return nil
131
+ end
132
+ return client.do_queue()
133
+ end
134
+
135
+ # @return [array]
136
+ def list_rooms(offset=0, page_size=500, active_only=false)
137
+ kparams = {}
138
+ client.add_param(kparams, 'offset', offset)
139
+ client.add_param(kparams, 'pageSize', page_size)
140
+ client.add_param(kparams, 'activeOnly', active_only)
141
+ client.queue_service_action_call('sip_pexip', 'listRooms', 'KalturaStringValue', kparams)
142
+ if (client.is_multirequest)
143
+ return nil
144
+ end
145
+ return client.do_queue()
146
+ end
147
+ end
148
+
149
+ class KalturaClient < KalturaClientBase
150
+ attr_reader :pexip_service
151
+ def pexip_service
152
+ if (@pexip_service == nil)
153
+ @pexip_service = KalturaPexipService.new(self)
154
+ end
155
+ return @pexip_service
156
+ end
157
+
158
+ end
159
+
160
+ end
@@ -0,0 +1,282 @@
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 KalturaSsoStatus
33
+ DISABLED = 1
34
+ ACTIVE = 2
35
+ DELETED = 3
36
+ end
37
+
38
+ class KalturaSso < KalturaObjectBase
39
+ attr_accessor :id
40
+ attr_accessor :application_type
41
+ attr_accessor :partner_id
42
+ attr_accessor :domain
43
+ attr_accessor :status
44
+ # Creation date as Unix timestamp (In seconds)
45
+ attr_accessor :created_at
46
+ # Last update date as Unix timestamp (In seconds)
47
+ attr_accessor :updated_at
48
+ # Redirect URL for a specific application type and (partner id or domain)
49
+ attr_accessor :redirect_url
50
+ attr_accessor :data
51
+
52
+ def id=(val)
53
+ @id = val.to_i
54
+ end
55
+ def partner_id=(val)
56
+ @partner_id = val.to_i
57
+ end
58
+ def status=(val)
59
+ @status = val.to_i
60
+ end
61
+ def created_at=(val)
62
+ @created_at = val.to_i
63
+ end
64
+ def updated_at=(val)
65
+ @updated_at = val.to_i
66
+ end
67
+
68
+ def from_xml(xml_element)
69
+ super
70
+ if xml_element.elements['id'] != nil
71
+ self.id = xml_element.elements['id'].text
72
+ end
73
+ if xml_element.elements['applicationType'] != nil
74
+ self.application_type = xml_element.elements['applicationType'].text
75
+ end
76
+ if xml_element.elements['partnerId'] != nil
77
+ self.partner_id = xml_element.elements['partnerId'].text
78
+ end
79
+ if xml_element.elements['domain'] != nil
80
+ self.domain = xml_element.elements['domain'].text
81
+ end
82
+ if xml_element.elements['status'] != nil
83
+ self.status = xml_element.elements['status'].text
84
+ end
85
+ if xml_element.elements['createdAt'] != nil
86
+ self.created_at = xml_element.elements['createdAt'].text
87
+ end
88
+ if xml_element.elements['updatedAt'] != nil
89
+ self.updated_at = xml_element.elements['updatedAt'].text
90
+ end
91
+ if xml_element.elements['redirectUrl'] != nil
92
+ self.redirect_url = xml_element.elements['redirectUrl'].text
93
+ end
94
+ if xml_element.elements['data'] != nil
95
+ self.data = xml_element.elements['data'].text
96
+ end
97
+ end
98
+
99
+ end
100
+
101
+ class KalturaSsoListResponse < KalturaListResponse
102
+ attr_accessor :objects
103
+
104
+
105
+ def from_xml(xml_element)
106
+ super
107
+ if xml_element.elements['objects'] != nil
108
+ self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaSso')
109
+ end
110
+ end
111
+
112
+ end
113
+
114
+ class KalturaSsoBaseFilter < KalturaRelatedFilter
115
+ attr_accessor :id_equal
116
+ attr_accessor :id_in
117
+ attr_accessor :application_type_equal
118
+ attr_accessor :partner_id_equal
119
+ attr_accessor :domain_equal
120
+ attr_accessor :status_equal
121
+ attr_accessor :status_in
122
+ attr_accessor :created_at_greater_than_or_equal
123
+ attr_accessor :created_at_less_than_or_equal
124
+ attr_accessor :redirect_url_equal
125
+
126
+ def id_equal=(val)
127
+ @id_equal = val.to_i
128
+ end
129
+ def partner_id_equal=(val)
130
+ @partner_id_equal = val.to_i
131
+ end
132
+ def status_equal=(val)
133
+ @status_equal = val.to_i
134
+ end
135
+ def created_at_greater_than_or_equal=(val)
136
+ @created_at_greater_than_or_equal = val.to_i
137
+ end
138
+ def created_at_less_than_or_equal=(val)
139
+ @created_at_less_than_or_equal = val.to_i
140
+ end
141
+
142
+ def from_xml(xml_element)
143
+ super
144
+ if xml_element.elements['idEqual'] != nil
145
+ self.id_equal = xml_element.elements['idEqual'].text
146
+ end
147
+ if xml_element.elements['idIn'] != nil
148
+ self.id_in = xml_element.elements['idIn'].text
149
+ end
150
+ if xml_element.elements['applicationTypeEqual'] != nil
151
+ self.application_type_equal = xml_element.elements['applicationTypeEqual'].text
152
+ end
153
+ if xml_element.elements['partnerIdEqual'] != nil
154
+ self.partner_id_equal = xml_element.elements['partnerIdEqual'].text
155
+ end
156
+ if xml_element.elements['domainEqual'] != nil
157
+ self.domain_equal = xml_element.elements['domainEqual'].text
158
+ end
159
+ if xml_element.elements['statusEqual'] != nil
160
+ self.status_equal = xml_element.elements['statusEqual'].text
161
+ end
162
+ if xml_element.elements['statusIn'] != nil
163
+ self.status_in = xml_element.elements['statusIn'].text
164
+ end
165
+ if xml_element.elements['createdAtGreaterThanOrEqual'] != nil
166
+ self.created_at_greater_than_or_equal = xml_element.elements['createdAtGreaterThanOrEqual'].text
167
+ end
168
+ if xml_element.elements['createdAtLessThanOrEqual'] != nil
169
+ self.created_at_less_than_or_equal = xml_element.elements['createdAtLessThanOrEqual'].text
170
+ end
171
+ if xml_element.elements['redirectUrlEqual'] != nil
172
+ self.redirect_url_equal = xml_element.elements['redirectUrlEqual'].text
173
+ end
174
+ end
175
+
176
+ end
177
+
178
+ class KalturaSsoFilter < KalturaSsoBaseFilter
179
+
180
+
181
+ def from_xml(xml_element)
182
+ super
183
+ end
184
+
185
+ end
186
+
187
+
188
+ class KalturaSsoService < KalturaServiceBase
189
+ def initialize(client)
190
+ super(client)
191
+ end
192
+
193
+ # Adds a new sso configuration.
194
+ # @return [KalturaSso]
195
+ def add(sso)
196
+ kparams = {}
197
+ client.add_param(kparams, 'sso', sso)
198
+ client.queue_service_action_call('sso_sso', 'add', 'KalturaSso', kparams)
199
+ if (client.is_multirequest)
200
+ return nil
201
+ end
202
+ return client.do_queue()
203
+ end
204
+
205
+ # Delete sso by ID
206
+ # @return [KalturaSso]
207
+ def delete(sso_id)
208
+ kparams = {}
209
+ client.add_param(kparams, 'ssoId', sso_id)
210
+ client.queue_service_action_call('sso_sso', 'delete', 'KalturaSso', kparams)
211
+ if (client.is_multirequest)
212
+ return nil
213
+ end
214
+ return client.do_queue()
215
+ end
216
+
217
+ # Retrieves sso object
218
+ # @return [KalturaSso]
219
+ def get(sso_id)
220
+ kparams = {}
221
+ client.add_param(kparams, 'ssoId', sso_id)
222
+ client.queue_service_action_call('sso_sso', 'get', 'KalturaSso', kparams)
223
+ if (client.is_multirequest)
224
+ return nil
225
+ end
226
+ return client.do_queue()
227
+ end
228
+
229
+ # Lists sso objects that are associated with an account.
230
+ # @return [KalturaSsoListResponse]
231
+ def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
232
+ kparams = {}
233
+ client.add_param(kparams, 'filter', filter)
234
+ client.add_param(kparams, 'pager', pager)
235
+ client.queue_service_action_call('sso_sso', 'list', 'KalturaSsoListResponse', kparams)
236
+ if (client.is_multirequest)
237
+ return nil
238
+ end
239
+ return client.do_queue()
240
+ end
241
+
242
+ # Login with SSO, getting redirect url according to application type and partner Id
243
+ # or according to application type and domain
244
+ # @return [string]
245
+ def login(user_id, application_type, partner_id=KalturaNotImplemented)
246
+ kparams = {}
247
+ client.add_param(kparams, 'userId', user_id)
248
+ client.add_param(kparams, 'applicationType', application_type)
249
+ client.add_param(kparams, 'partnerId', partner_id)
250
+ client.queue_service_action_call('sso_sso', 'login', 'string', kparams)
251
+ if (client.is_multirequest)
252
+ return nil
253
+ end
254
+ return client.do_queue()
255
+ end
256
+
257
+ # Update sso by ID
258
+ # @return [KalturaSso]
259
+ def update(sso_id, sso)
260
+ kparams = {}
261
+ client.add_param(kparams, 'ssoId', sso_id)
262
+ client.add_param(kparams, 'sso', sso)
263
+ client.queue_service_action_call('sso_sso', 'update', 'KalturaSso', kparams)
264
+ if (client.is_multirequest)
265
+ return nil
266
+ end
267
+ return client.do_queue()
268
+ end
269
+ end
270
+
271
+ class KalturaClient < KalturaClientBase
272
+ attr_reader :sso_service
273
+ def sso_service
274
+ if (@sso_service == nil)
275
+ @sso_service = KalturaSsoService.new(self)
276
+ end
277
+ return @sso_service
278
+ end
279
+
280
+ end
281
+
282
+ end