kaltura-client 15.20.0 → 16.8.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,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
@@ -0,0 +1,63 @@
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
+
34
+ class KalturaThumbnailService < KalturaServiceBase
35
+ def initialize(client)
36
+ super(client)
37
+ end
38
+
39
+ # Retrieves a thumbnail according to the required transformation
40
+ # @return []
41
+ def transform(transform_string)
42
+ kparams = {}
43
+ client.add_param(kparams, 'transformString', transform_string)
44
+ client.queue_service_action_call('thumbnail_thumbnail', 'transform', '', kparams)
45
+ if (client.is_multirequest)
46
+ return nil
47
+ end
48
+ return client.do_queue()
49
+ end
50
+ end
51
+
52
+ class KalturaClient < KalturaClientBase
53
+ attr_reader :thumbnail_service
54
+ def thumbnail_service
55
+ if (@thumbnail_service == nil)
56
+ @thumbnail_service = KalturaThumbnailService.new(self)
57
+ end
58
+ return @thumbnail_service
59
+ end
60
+
61
+ end
62
+
63
+ end
@@ -0,0 +1,180 @@
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 KalturaHandleParticipantsMode
33
+ ADD_AS_CO_PUBLISHERS = 0
34
+ ADD_AS_CO_VIEWERS = 1
35
+ IGNORE = 2
36
+ end
37
+
38
+ class KalturaZoomUsersMatching
39
+ DO_NOT_MODIFY = 0
40
+ ADD_POSTFIX = 1
41
+ REMOVE_POSTFIX = 2
42
+ end
43
+
44
+ class KalturaZoomIntegrationSetting < KalturaObjectBase
45
+ attr_accessor :default_user_id
46
+ attr_accessor :zoom_category
47
+ attr_accessor :account_id
48
+ attr_accessor :enable_recording_upload
49
+ attr_accessor :create_user_if_not_exist
50
+ attr_accessor :handle_participant_mode
51
+ attr_accessor :zoom_user_matching_mode
52
+ attr_accessor :zoom_user_postfix
53
+ attr_accessor :zoom_webinar_category
54
+ attr_accessor :enable_webinar_uploads
55
+
56
+ def enable_recording_upload=(val)
57
+ @enable_recording_upload = val.to_i
58
+ end
59
+ def create_user_if_not_exist=(val)
60
+ @create_user_if_not_exist = val.to_i
61
+ end
62
+ def handle_participant_mode=(val)
63
+ @handle_participant_mode = val.to_i
64
+ end
65
+ def zoom_user_matching_mode=(val)
66
+ @zoom_user_matching_mode = val.to_i
67
+ end
68
+ def enable_webinar_uploads=(val)
69
+ @enable_webinar_uploads = val.to_i
70
+ end
71
+
72
+ def from_xml(xml_element)
73
+ super
74
+ if xml_element.elements['defaultUserId'] != nil
75
+ self.default_user_id = xml_element.elements['defaultUserId'].text
76
+ end
77
+ if xml_element.elements['zoomCategory'] != nil
78
+ self.zoom_category = xml_element.elements['zoomCategory'].text
79
+ end
80
+ if xml_element.elements['accountId'] != nil
81
+ self.account_id = xml_element.elements['accountId'].text
82
+ end
83
+ if xml_element.elements['enableRecordingUpload'] != nil
84
+ self.enable_recording_upload = xml_element.elements['enableRecordingUpload'].text
85
+ end
86
+ if xml_element.elements['createUserIfNotExist'] != nil
87
+ self.create_user_if_not_exist = xml_element.elements['createUserIfNotExist'].text
88
+ end
89
+ if xml_element.elements['handleParticipantMode'] != nil
90
+ self.handle_participant_mode = xml_element.elements['handleParticipantMode'].text
91
+ end
92
+ if xml_element.elements['zoomUserMatchingMode'] != nil
93
+ self.zoom_user_matching_mode = xml_element.elements['zoomUserMatchingMode'].text
94
+ end
95
+ if xml_element.elements['zoomUserPostfix'] != nil
96
+ self.zoom_user_postfix = xml_element.elements['zoomUserPostfix'].text
97
+ end
98
+ if xml_element.elements['zoomWebinarCategory'] != nil
99
+ self.zoom_webinar_category = xml_element.elements['zoomWebinarCategory'].text
100
+ end
101
+ if xml_element.elements['enableWebinarUploads'] != nil
102
+ self.enable_webinar_uploads = xml_element.elements['enableWebinarUploads'].text
103
+ end
104
+ end
105
+
106
+ end
107
+
108
+
109
+ class KalturaZoomVendorService < KalturaServiceBase
110
+ def initialize(client)
111
+ super(client)
112
+ end
113
+
114
+ # @return [string]
115
+ def de_authorization()
116
+ kparams = {}
117
+ client.queue_service_action_call('vendor_zoomvendor', 'deAuthorization', 'string', kparams)
118
+ if (client.is_multirequest)
119
+ return nil
120
+ end
121
+ return client.do_queue()
122
+ end
123
+
124
+ # @return []
125
+ def fetch_registration_page(tokens_data, iv)
126
+ kparams = {}
127
+ client.add_param(kparams, 'tokensData', tokens_data)
128
+ client.add_param(kparams, 'iv', iv)
129
+ client.queue_service_action_call('vendor_zoomvendor', 'fetchRegistrationPage', '', kparams)
130
+ if (client.is_multirequest)
131
+ return nil
132
+ end
133
+ return client.do_queue()
134
+ end
135
+
136
+ # @return [string]
137
+ def oauth_validation()
138
+ kparams = {}
139
+ client.queue_service_action_call('vendor_zoomvendor', 'oauthValidation', 'string', kparams)
140
+ if (client.is_multirequest)
141
+ return nil
142
+ end
143
+ return client.do_queue()
144
+ end
145
+
146
+ # @return []
147
+ def recording_complete()
148
+ kparams = {}
149
+ client.queue_service_action_call('vendor_zoomvendor', 'recordingComplete', '', kparams)
150
+ if (client.is_multirequest)
151
+ return nil
152
+ end
153
+ return client.do_queue()
154
+ end
155
+
156
+ # @return [string]
157
+ def submit_registration(account_id, integration_setting)
158
+ kparams = {}
159
+ client.add_param(kparams, 'accountId', account_id)
160
+ client.add_param(kparams, 'integrationSetting', integration_setting)
161
+ client.queue_service_action_call('vendor_zoomvendor', 'submitRegistration', 'string', kparams)
162
+ if (client.is_multirequest)
163
+ return nil
164
+ end
165
+ return client.do_queue()
166
+ end
167
+ end
168
+
169
+ class KalturaClient < KalturaClientBase
170
+ attr_reader :zoom_vendor_service
171
+ def zoom_vendor_service
172
+ if (@zoom_vendor_service == nil)
173
+ @zoom_vendor_service = KalturaZoomVendorService.new(self)
174
+ end
175
+ return @zoom_vendor_service
176
+ end
177
+
178
+ end
179
+
180
+ end