kaltura-client 3.3.0 → 14.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README +23 -23
- data/lib/kaltura_client.rb +2054 -1860
- data/lib/kaltura_client_base.rb +4 -1
- data/lib/kaltura_enums.rb +612 -36
- data/lib/kaltura_plugins/kaltura_activiti_business_process_notification_client_plugin.rb +96 -0
- data/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +46 -17
- data/lib/kaltura_plugins/kaltura_admin_console_client_plugin.rb +61 -251
- data/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +131 -60
- data/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +62 -0
- data/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +83 -55
- data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +613 -0
- data/lib/kaltura_plugins/kaltura_avn_distribution_client_plugin.rb +109 -0
- data/lib/kaltura_plugins/kaltura_bpm_event_notification_integration_client_plugin.rb +61 -0
- data/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +17 -19
- data/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +7 -6
- data/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +33 -13
- data/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +1 -2
- data/lib/kaltura_plugins/kaltura_business_process_notification_client_plugin.rb +545 -0
- data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +235 -114
- data/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +86 -29
- data/lib/kaltura_plugins/kaltura_cielo24client_plugin.rb +39 -17
- data/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +49 -18
- data/lib/kaltura_plugins/kaltura_comcast_mrss_distribution_client_plugin.rb +163 -0
- data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +846 -439
- data/lib/kaltura_plugins/kaltura_cross_kaltura_distribution_client_plugin.rb +232 -0
- data/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +229 -74
- data/lib/kaltura_plugins/kaltura_dailymotion_distribution_client_plugin.rb +199 -0
- data/lib/kaltura_plugins/kaltura_document_client_plugin.rb +140 -97
- data/lib/kaltura_plugins/kaltura_double_click_distribution_client_plugin.rb +142 -0
- data/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +635 -0
- data/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +485 -196
- data/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +19 -1
- data/lib/kaltura_plugins/kaltura_elastic_search_client_plugin.rb +1228 -0
- data/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +178 -89
- data/lib/kaltura_plugins/kaltura_event_cue_point_client_plugin.rb +10 -4
- data/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +205 -95
- data/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +43 -32
- data/lib/kaltura_plugins/kaltura_facebook_distribution_client_plugin.rb +183 -0
- data/lib/kaltura_plugins/kaltura_fairplay_client_plugin.rb +62 -0
- data/lib/kaltura_plugins/kaltura_feed_drop_folder_client_plugin.rb +40 -16
- data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +182 -67
- data/lib/kaltura_plugins/kaltura_freewheel_distribution_client_plugin.rb +157 -0
- data/lib/kaltura_plugins/kaltura_freewheel_generic_distribution_client_plugin.rb +172 -0
- data/lib/kaltura_plugins/kaltura_ftp_distribution_client_plugin.rb +258 -0
- data/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +154 -102
- data/lib/kaltura_plugins/kaltura_hulu_distribution_client_plugin.rb +213 -0
- data/lib/kaltura_plugins/kaltura_idetic_distribution_client_plugin.rb +131 -0
- data/lib/kaltura_plugins/kaltura_integration_client_plugin.rb +19 -10
- data/lib/kaltura_plugins/kaltura_kaltura_internal_tools_client_plugin.rb +1 -87
- data/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +19 -10
- data/lib/kaltura_plugins/kaltura_like_client_plugin.rb +45 -25
- data/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +435 -213
- data/lib/kaltura_plugins/kaltura_metro_pcs_distribution_client_plugin.rb +155 -0
- data/lib/kaltura_plugins/kaltura_msn_distribution_client_plugin.rb +186 -0
- data/lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb +482 -0
- data/lib/kaltura_plugins/kaltura_poll_client_plugin.rb +116 -0
- data/lib/kaltura_plugins/kaltura_push_notification_client_plugin.rb +154 -0
- data/lib/kaltura_plugins/kaltura_quick_play_distribution_client_plugin.rb +187 -0
- data/lib/kaltura_plugins/kaltura_quiz_client_plugin.rb +155 -58
- data/lib/kaltura_plugins/kaltura_schedule_bulk_upload_client_plugin.rb +107 -0
- data/lib/kaltura_plugins/kaltura_schedule_client_plugin.rb +1580 -0
- data/lib/kaltura_plugins/kaltura_schedule_drop_folder_client_plugin.rb +52 -0
- data/lib/kaltura_plugins/kaltura_scheduled_task_client_plugin.rb +277 -71
- data/lib/kaltura_plugins/kaltura_scheduled_task_content_distribution_client_plugin.rb +4 -3
- data/lib/kaltura_plugins/kaltura_scheduled_task_event_notification_client_plugin.rb +4 -3
- data/lib/kaltura_plugins/kaltura_scheduled_task_metadata_client_plugin.rb +10 -7
- data/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +113 -66
- data/lib/kaltura_plugins/kaltura_system_partner_client_plugin.rb +81 -517
- data/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +63 -30
- data/lib/kaltura_plugins/kaltura_thumb_cue_point_client_plugin.rb +40 -16
- data/lib/kaltura_plugins/kaltura_transcript_client_plugin.rb +44 -8
- data/lib/kaltura_plugins/kaltura_unicorn_distribution_client_plugin.rb +212 -0
- data/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +75 -74
- data/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +10 -4
- data/lib/kaltura_plugins/kaltura_view_history_client_plugin.rb +112 -0
- data/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +119 -59
- data/lib/kaltura_plugins/kaltura_voicebase_client_plugin.rb +34 -19
- data/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +207 -0
- data/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +299 -0
- data/lib/kaltura_plugins/kaltura_wowza_client_plugin.rb +22 -13
- data/lib/kaltura_plugins/kaltura_yahoo_distribution_client_plugin.rb +155 -0
- data/lib/kaltura_plugins/kaltura_you_tube_distribution_client_plugin.rb +382 -0
- data/lib/kaltura_plugins/kaltura_youtube_api_distribution_client_plugin.rb +219 -0
- data/lib/kaltura_types.rb +10305 -4858
- data/test/access_control_service_test.rb +43 -20
- data/test/base_entry_service_test.rb +57 -67
- data/test/configuration_test.rb +2 -34
- data/test/cue_point_service_test.rb +1 -1
- data/test/data_service_test.rb +19 -5
- data/test/document_service_test.rb +1 -1
- data/test/media_service_test.rb +296 -296
- data/test/metadata_profile_service_test.rb +1 -1
- metadata +52 -21
@@ -8,7 +8,7 @@
|
|
8
8
|
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
9
|
# text.
|
10
10
|
#
|
11
|
-
# Copyright (C) 2006-
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
12
|
#
|
13
13
|
# This program is free software: you can redistribute it and/or modify
|
14
14
|
# it under the terms of the GNU Affero General Public License as
|
@@ -51,25 +51,18 @@ module Kaltura
|
|
51
51
|
attr_accessor :parent_id
|
52
52
|
attr_accessor :text
|
53
53
|
# End time in milliseconds
|
54
|
-
#
|
55
54
|
attr_accessor :end_time
|
56
55
|
# Duration in milliseconds
|
57
|
-
#
|
58
56
|
attr_accessor :duration
|
59
57
|
# Depth in the tree
|
60
|
-
#
|
61
58
|
attr_accessor :depth
|
62
59
|
# Number of all descendants
|
63
|
-
#
|
64
60
|
attr_accessor :children_count
|
65
61
|
# Number of children, first generation only.
|
66
|
-
#
|
67
62
|
attr_accessor :direct_children_count
|
68
63
|
# Is the annotation public.
|
69
|
-
#
|
70
64
|
attr_accessor :is_public
|
71
65
|
# Should the cue point get indexed on the entry.
|
72
|
-
#
|
73
66
|
attr_accessor :searchable_on_entry
|
74
67
|
|
75
68
|
def end_time=(val)
|
@@ -96,15 +89,33 @@ module Kaltura
|
|
96
89
|
|
97
90
|
def from_xml(xml_element)
|
98
91
|
super
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
92
|
+
if xml_element.elements['parentId'] != nil
|
93
|
+
self.parent_id = xml_element.elements['parentId'].text
|
94
|
+
end
|
95
|
+
if xml_element.elements['text'] != nil
|
96
|
+
self.text = xml_element.elements['text'].text
|
97
|
+
end
|
98
|
+
if xml_element.elements['endTime'] != nil
|
99
|
+
self.end_time = xml_element.elements['endTime'].text
|
100
|
+
end
|
101
|
+
if xml_element.elements['duration'] != nil
|
102
|
+
self.duration = xml_element.elements['duration'].text
|
103
|
+
end
|
104
|
+
if xml_element.elements['depth'] != nil
|
105
|
+
self.depth = xml_element.elements['depth'].text
|
106
|
+
end
|
107
|
+
if xml_element.elements['childrenCount'] != nil
|
108
|
+
self.children_count = xml_element.elements['childrenCount'].text
|
109
|
+
end
|
110
|
+
if xml_element.elements['directChildrenCount'] != nil
|
111
|
+
self.direct_children_count = xml_element.elements['directChildrenCount'].text
|
112
|
+
end
|
113
|
+
if xml_element.elements['isPublic'] != nil
|
114
|
+
self.is_public = xml_element.elements['isPublic'].text
|
115
|
+
end
|
116
|
+
if xml_element.elements['searchableOnEntry'] != nil
|
117
|
+
self.searchable_on_entry = xml_element.elements['searchableOnEntry'].text
|
118
|
+
end
|
108
119
|
end
|
109
120
|
|
110
121
|
end
|
@@ -115,7 +126,9 @@ module Kaltura
|
|
115
126
|
|
116
127
|
def from_xml(xml_element)
|
117
128
|
super
|
118
|
-
|
129
|
+
if xml_element.elements['objects'] != nil
|
130
|
+
self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaAnnotation')
|
131
|
+
end
|
119
132
|
end
|
120
133
|
|
121
134
|
end
|
@@ -150,16 +163,36 @@ module Kaltura
|
|
150
163
|
|
151
164
|
def from_xml(xml_element)
|
152
165
|
super
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
166
|
+
if xml_element.elements['parentIdEqual'] != nil
|
167
|
+
self.parent_id_equal = xml_element.elements['parentIdEqual'].text
|
168
|
+
end
|
169
|
+
if xml_element.elements['parentIdIn'] != nil
|
170
|
+
self.parent_id_in = xml_element.elements['parentIdIn'].text
|
171
|
+
end
|
172
|
+
if xml_element.elements['textLike'] != nil
|
173
|
+
self.text_like = xml_element.elements['textLike'].text
|
174
|
+
end
|
175
|
+
if xml_element.elements['textMultiLikeOr'] != nil
|
176
|
+
self.text_multi_like_or = xml_element.elements['textMultiLikeOr'].text
|
177
|
+
end
|
178
|
+
if xml_element.elements['textMultiLikeAnd'] != nil
|
179
|
+
self.text_multi_like_and = xml_element.elements['textMultiLikeAnd'].text
|
180
|
+
end
|
181
|
+
if xml_element.elements['endTimeGreaterThanOrEqual'] != nil
|
182
|
+
self.end_time_greater_than_or_equal = xml_element.elements['endTimeGreaterThanOrEqual'].text
|
183
|
+
end
|
184
|
+
if xml_element.elements['endTimeLessThanOrEqual'] != nil
|
185
|
+
self.end_time_less_than_or_equal = xml_element.elements['endTimeLessThanOrEqual'].text
|
186
|
+
end
|
187
|
+
if xml_element.elements['durationGreaterThanOrEqual'] != nil
|
188
|
+
self.duration_greater_than_or_equal = xml_element.elements['durationGreaterThanOrEqual'].text
|
189
|
+
end
|
190
|
+
if xml_element.elements['durationLessThanOrEqual'] != nil
|
191
|
+
self.duration_less_than_or_equal = xml_element.elements['durationLessThanOrEqual'].text
|
192
|
+
end
|
193
|
+
if xml_element.elements['isPublicEqual'] != nil
|
194
|
+
self.is_public_equal = xml_element.elements['isPublicEqual'].text
|
195
|
+
end
|
163
196
|
end
|
164
197
|
|
165
198
|
end
|
@@ -175,14 +208,13 @@ module Kaltura
|
|
175
208
|
|
176
209
|
|
177
210
|
# Annotation service - Video Annotation
|
178
|
-
#
|
179
211
|
class KalturaAnnotationService < KalturaServiceBase
|
180
212
|
def initialize(client)
|
181
213
|
super(client)
|
182
214
|
end
|
183
215
|
|
184
216
|
# Allows you to add an annotation object associated with an entry
|
185
|
-
#
|
217
|
+
# @return [KalturaAnnotation]
|
186
218
|
def add(annotation)
|
187
219
|
kparams = {}
|
188
220
|
client.add_param(kparams, 'annotation', annotation)
|
@@ -193,39 +225,75 @@ module Kaltura
|
|
193
225
|
return client.do_queue()
|
194
226
|
end
|
195
227
|
|
196
|
-
#
|
197
|
-
#
|
198
|
-
def
|
228
|
+
# Allows you to add multiple cue points objects by uploading XML that contains multiple cue point definitions
|
229
|
+
# @return [KalturaCuePointListResponse]
|
230
|
+
def add_from_bulk(file_data)
|
231
|
+
kparams = {}
|
232
|
+
kfiles = {}
|
233
|
+
client.add_param(kfiles, 'fileData', file_data)
|
234
|
+
client.queue_service_action_call('annotation_annotation', 'addFromBulk', 'KalturaCuePointListResponse', kparams, kfiles)
|
235
|
+
if (client.is_multirequest)
|
236
|
+
return nil
|
237
|
+
end
|
238
|
+
return client.do_queue()
|
239
|
+
end
|
240
|
+
|
241
|
+
# Clone cuePoint with id to given entry
|
242
|
+
# @return [KalturaCuePoint]
|
243
|
+
def clone(id, entry_id)
|
199
244
|
kparams = {}
|
200
245
|
client.add_param(kparams, 'id', id)
|
201
|
-
client.add_param(kparams, '
|
202
|
-
client.queue_service_action_call('annotation_annotation', '
|
246
|
+
client.add_param(kparams, 'entryId', entry_id)
|
247
|
+
client.queue_service_action_call('annotation_annotation', 'clone', 'KalturaCuePoint', kparams)
|
203
248
|
if (client.is_multirequest)
|
204
249
|
return nil
|
205
250
|
end
|
206
251
|
return client.do_queue()
|
207
252
|
end
|
208
253
|
|
209
|
-
#
|
210
|
-
#
|
211
|
-
def
|
254
|
+
# count cue point objects by filter
|
255
|
+
# @return [int]
|
256
|
+
def count(filter=KalturaNotImplemented)
|
212
257
|
kparams = {}
|
213
258
|
client.add_param(kparams, 'filter', filter)
|
214
|
-
client.
|
215
|
-
client.queue_service_action_call('annotation_annotation', 'list', 'KalturaAnnotationListResponse', kparams)
|
259
|
+
client.queue_service_action_call('annotation_annotation', 'count', 'int', kparams)
|
216
260
|
if (client.is_multirequest)
|
217
261
|
return nil
|
218
262
|
end
|
219
263
|
return client.do_queue()
|
220
264
|
end
|
221
265
|
|
222
|
-
#
|
223
|
-
#
|
224
|
-
def
|
266
|
+
# delete cue point by id, and delete all children cue points
|
267
|
+
# @return []
|
268
|
+
def delete(id)
|
225
269
|
kparams = {}
|
226
|
-
|
227
|
-
client.
|
228
|
-
client.
|
270
|
+
client.add_param(kparams, 'id', id)
|
271
|
+
client.queue_service_action_call('annotation_annotation', 'delete', '', kparams)
|
272
|
+
if (client.is_multirequest)
|
273
|
+
return nil
|
274
|
+
end
|
275
|
+
return client.do_queue()
|
276
|
+
end
|
277
|
+
|
278
|
+
# Retrieve an CuePoint object by id
|
279
|
+
# @return [KalturaCuePoint]
|
280
|
+
def get(id)
|
281
|
+
kparams = {}
|
282
|
+
client.add_param(kparams, 'id', id)
|
283
|
+
client.queue_service_action_call('annotation_annotation', 'get', 'KalturaCuePoint', kparams)
|
284
|
+
if (client.is_multirequest)
|
285
|
+
return nil
|
286
|
+
end
|
287
|
+
return client.do_queue()
|
288
|
+
end
|
289
|
+
|
290
|
+
# List annotation objects by filter and pager
|
291
|
+
# @return [KalturaAnnotationListResponse]
|
292
|
+
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
293
|
+
kparams = {}
|
294
|
+
client.add_param(kparams, 'filter', filter)
|
295
|
+
client.add_param(kparams, 'pager', pager)
|
296
|
+
client.queue_service_action_call('annotation_annotation', 'list', 'KalturaAnnotationListResponse', kparams)
|
229
297
|
if (client.is_multirequest)
|
230
298
|
return nil
|
231
299
|
end
|
@@ -233,7 +301,7 @@ module Kaltura
|
|
233
301
|
end
|
234
302
|
|
235
303
|
# Download multiple cue points objects as XML definitions
|
236
|
-
#
|
304
|
+
# @return [file]
|
237
305
|
def serve_bulk(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
238
306
|
kparams = {}
|
239
307
|
client.add_param(kparams, 'filter', filter)
|
@@ -242,36 +310,39 @@ module Kaltura
|
|
242
310
|
return client.get_serve_url()
|
243
311
|
end
|
244
312
|
|
245
|
-
#
|
246
|
-
#
|
247
|
-
def
|
313
|
+
# Update annotation by id
|
314
|
+
# @return [KalturaAnnotation]
|
315
|
+
def update(id, annotation)
|
248
316
|
kparams = {}
|
249
317
|
client.add_param(kparams, 'id', id)
|
250
|
-
client.
|
318
|
+
client.add_param(kparams, 'annotation', annotation)
|
319
|
+
client.queue_service_action_call('annotation_annotation', 'update', 'KalturaAnnotation', kparams)
|
251
320
|
if (client.is_multirequest)
|
252
321
|
return nil
|
253
322
|
end
|
254
323
|
return client.do_queue()
|
255
324
|
end
|
256
325
|
|
257
|
-
#
|
258
|
-
|
259
|
-
def count(filter=KalturaNotImplemented)
|
326
|
+
# @return [KalturaCuePoint]
|
327
|
+
def update_cue_points_times(id, start_time, end_time=KalturaNotImplemented)
|
260
328
|
kparams = {}
|
261
|
-
client.add_param(kparams, '
|
262
|
-
client.
|
329
|
+
client.add_param(kparams, 'id', id)
|
330
|
+
client.add_param(kparams, 'startTime', start_time)
|
331
|
+
client.add_param(kparams, 'endTime', end_time)
|
332
|
+
client.queue_service_action_call('annotation_annotation', 'updateCuePointsTimes', 'KalturaCuePoint', kparams)
|
263
333
|
if (client.is_multirequest)
|
264
334
|
return nil
|
265
335
|
end
|
266
336
|
return client.do_queue()
|
267
337
|
end
|
268
338
|
|
269
|
-
#
|
270
|
-
#
|
271
|
-
def
|
339
|
+
# Update cuePoint status by id
|
340
|
+
# @return []
|
341
|
+
def update_status(id, status)
|
272
342
|
kparams = {}
|
273
343
|
client.add_param(kparams, 'id', id)
|
274
|
-
client.
|
344
|
+
client.add_param(kparams, 'status', status)
|
345
|
+
client.queue_service_action_call('annotation_annotation', 'updateStatus', '', kparams)
|
275
346
|
if (client.is_multirequest)
|
276
347
|
return nil
|
277
348
|
end
|
@@ -0,0 +1,62 @@
|
|
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-2019 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
|
+
|
33
|
+
# Aspera service
|
34
|
+
class KalturaAsperaService < KalturaServiceBase
|
35
|
+
def initialize(client)
|
36
|
+
super(client)
|
37
|
+
end
|
38
|
+
|
39
|
+
# @return [string]
|
40
|
+
def get_fasp_url(flavor_asset_id)
|
41
|
+
kparams = {}
|
42
|
+
client.add_param(kparams, 'flavorAssetId', flavor_asset_id)
|
43
|
+
client.queue_service_action_call('aspera_aspera', 'getFaspUrl', 'string', kparams)
|
44
|
+
if (client.is_multirequest)
|
45
|
+
return nil
|
46
|
+
end
|
47
|
+
return client.do_queue()
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class KalturaClient < KalturaClientBase
|
52
|
+
attr_reader :aspera_service
|
53
|
+
def aspera_service
|
54
|
+
if (@aspera_service == nil)
|
55
|
+
@aspera_service = KalturaAsperaService.new(self)
|
56
|
+
end
|
57
|
+
return @aspera_service
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
9
|
# text.
|
10
10
|
#
|
11
|
-
# Copyright (C) 2006-
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
12
|
#
|
13
13
|
# This program is free software: you can redistribute it and/or modify
|
14
14
|
# it under the terms of the GNU Affero General Public License as
|
@@ -53,20 +53,17 @@ module Kaltura
|
|
53
53
|
TEXT = "1"
|
54
54
|
MEDIA = "2"
|
55
55
|
DOCUMENT = "3"
|
56
|
+
JSON = "4"
|
56
57
|
end
|
57
58
|
|
58
59
|
class KalturaAttachmentAsset < KalturaAsset
|
59
60
|
# The filename of the attachment asset content
|
60
|
-
#
|
61
61
|
attr_accessor :filename
|
62
62
|
# Attachment asset title
|
63
|
-
#
|
64
63
|
attr_accessor :title
|
65
64
|
# The attachment format
|
66
|
-
#
|
67
65
|
attr_accessor :format
|
68
66
|
# The status of the asset
|
69
|
-
#
|
70
67
|
attr_accessor :status
|
71
68
|
|
72
69
|
def status=(val)
|
@@ -75,10 +72,18 @@ module Kaltura
|
|
75
72
|
|
76
73
|
def from_xml(xml_element)
|
77
74
|
super
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
75
|
+
if xml_element.elements['filename'] != nil
|
76
|
+
self.filename = xml_element.elements['filename'].text
|
77
|
+
end
|
78
|
+
if xml_element.elements['title'] != nil
|
79
|
+
self.title = xml_element.elements['title'].text
|
80
|
+
end
|
81
|
+
if xml_element.elements['format'] != nil
|
82
|
+
self.format = xml_element.elements['format'].text
|
83
|
+
end
|
84
|
+
if xml_element.elements['status'] != nil
|
85
|
+
self.status = xml_element.elements['status'].text
|
86
|
+
end
|
82
87
|
end
|
83
88
|
|
84
89
|
end
|
@@ -89,7 +94,18 @@ module Kaltura
|
|
89
94
|
|
90
95
|
def from_xml(xml_element)
|
91
96
|
super
|
92
|
-
|
97
|
+
if xml_element.elements['objects'] != nil
|
98
|
+
self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaAttachmentAsset')
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
class KalturaAttachmentServeOptions < KalturaAssetServeOptions
|
105
|
+
|
106
|
+
|
107
|
+
def from_xml(xml_element)
|
108
|
+
super
|
93
109
|
end
|
94
110
|
|
95
111
|
end
|
@@ -107,11 +123,21 @@ module Kaltura
|
|
107
123
|
|
108
124
|
def from_xml(xml_element)
|
109
125
|
super
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
126
|
+
if xml_element.elements['formatEqual'] != nil
|
127
|
+
self.format_equal = xml_element.elements['formatEqual'].text
|
128
|
+
end
|
129
|
+
if xml_element.elements['formatIn'] != nil
|
130
|
+
self.format_in = xml_element.elements['formatIn'].text
|
131
|
+
end
|
132
|
+
if xml_element.elements['statusEqual'] != nil
|
133
|
+
self.status_equal = xml_element.elements['statusEqual'].text
|
134
|
+
end
|
135
|
+
if xml_element.elements['statusIn'] != nil
|
136
|
+
self.status_in = xml_element.elements['statusIn'].text
|
137
|
+
end
|
138
|
+
if xml_element.elements['statusNotIn'] != nil
|
139
|
+
self.status_not_in = xml_element.elements['statusNotIn'].text
|
140
|
+
end
|
115
141
|
end
|
116
142
|
|
117
143
|
end
|
@@ -127,14 +153,13 @@ module Kaltura
|
|
127
153
|
|
128
154
|
|
129
155
|
# Retrieve information and invoke actions on attachment Asset
|
130
|
-
#
|
131
156
|
class KalturaAttachmentAssetService < KalturaServiceBase
|
132
157
|
def initialize(client)
|
133
158
|
super(client)
|
134
159
|
end
|
135
160
|
|
136
161
|
# Add attachment asset
|
137
|
-
#
|
162
|
+
# @return [KalturaAttachmentAsset]
|
138
163
|
def add(entry_id, attachment_asset)
|
139
164
|
kparams = {}
|
140
165
|
client.add_param(kparams, 'entryId', entry_id)
|
@@ -146,26 +171,34 @@ module Kaltura
|
|
146
171
|
return client.do_queue()
|
147
172
|
end
|
148
173
|
|
149
|
-
#
|
150
|
-
|
151
|
-
def set_content(id, content_resource)
|
174
|
+
# @return []
|
175
|
+
def delete(attachment_asset_id)
|
152
176
|
kparams = {}
|
153
|
-
client.add_param(kparams, '
|
154
|
-
client.
|
155
|
-
client.queue_service_action_call('attachment_attachmentasset', 'setContent', 'KalturaAttachmentAsset', kparams)
|
177
|
+
client.add_param(kparams, 'attachmentAssetId', attachment_asset_id)
|
178
|
+
client.queue_service_action_call('attachment_attachmentasset', 'delete', '', kparams)
|
156
179
|
if (client.is_multirequest)
|
157
180
|
return nil
|
158
181
|
end
|
159
182
|
return client.do_queue()
|
160
183
|
end
|
161
184
|
|
162
|
-
#
|
163
|
-
|
164
|
-
|
185
|
+
# @return [KalturaAttachmentAsset]
|
186
|
+
def get(attachment_asset_id)
|
187
|
+
kparams = {}
|
188
|
+
client.add_param(kparams, 'attachmentAssetId', attachment_asset_id)
|
189
|
+
client.queue_service_action_call('attachment_attachmentasset', 'get', 'KalturaAttachmentAsset', kparams)
|
190
|
+
if (client.is_multirequest)
|
191
|
+
return nil
|
192
|
+
end
|
193
|
+
return client.do_queue()
|
194
|
+
end
|
195
|
+
|
196
|
+
# Get remote storage existing paths for the asset
|
197
|
+
# @return [KalturaRemotePathListResponse]
|
198
|
+
def get_remote_paths(id)
|
165
199
|
kparams = {}
|
166
200
|
client.add_param(kparams, 'id', id)
|
167
|
-
client.
|
168
|
-
client.queue_service_action_call('attachment_attachmentasset', 'update', 'KalturaAttachmentAsset', kparams)
|
201
|
+
client.queue_service_action_call('attachment_attachmentasset', 'getRemotePaths', 'KalturaRemotePathListResponse', kparams)
|
169
202
|
if (client.is_multirequest)
|
170
203
|
return nil
|
171
204
|
end
|
@@ -173,7 +206,7 @@ module Kaltura
|
|
173
206
|
end
|
174
207
|
|
175
208
|
# Get download URL for the asset
|
176
|
-
#
|
209
|
+
# @return [string]
|
177
210
|
def get_url(id, storage_id=KalturaNotImplemented)
|
178
211
|
kparams = {}
|
179
212
|
client.add_param(kparams, 'id', id)
|
@@ -185,12 +218,13 @@ module Kaltura
|
|
185
218
|
return client.do_queue()
|
186
219
|
end
|
187
220
|
|
188
|
-
#
|
189
|
-
#
|
190
|
-
def
|
221
|
+
# List attachment Assets by filter and pager
|
222
|
+
# @return [KalturaAttachmentAssetListResponse]
|
223
|
+
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
191
224
|
kparams = {}
|
192
|
-
client.add_param(kparams, '
|
193
|
-
client.
|
225
|
+
client.add_param(kparams, 'filter', filter)
|
226
|
+
client.add_param(kparams, 'pager', pager)
|
227
|
+
client.queue_service_action_call('attachment_attachmentasset', 'list', 'KalturaAttachmentAssetListResponse', kparams)
|
194
228
|
if (client.is_multirequest)
|
195
229
|
return nil
|
196
230
|
end
|
@@ -198,41 +232,35 @@ module Kaltura
|
|
198
232
|
end
|
199
233
|
|
200
234
|
# Serves attachment by its id
|
201
|
-
#
|
202
|
-
def serve(attachment_asset_id)
|
235
|
+
# @return [file]
|
236
|
+
def serve(attachment_asset_id, serve_options=KalturaNotImplemented)
|
203
237
|
kparams = {}
|
204
238
|
client.add_param(kparams, 'attachmentAssetId', attachment_asset_id)
|
239
|
+
client.add_param(kparams, 'serveOptions', serve_options)
|
205
240
|
client.queue_service_action_call('attachment_attachmentasset', 'serve', 'file', kparams)
|
206
241
|
return client.get_serve_url()
|
207
242
|
end
|
208
243
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
client.queue_service_action_call('attachment_attachmentasset', 'get', 'KalturaAttachmentAsset', kparams)
|
213
|
-
if (client.is_multirequest)
|
214
|
-
return nil
|
215
|
-
end
|
216
|
-
return client.do_queue()
|
217
|
-
end
|
218
|
-
|
219
|
-
# List attachment Assets by filter and pager
|
220
|
-
#
|
221
|
-
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
244
|
+
# Update content of attachment asset
|
245
|
+
# @return [KalturaAttachmentAsset]
|
246
|
+
def set_content(id, content_resource)
|
222
247
|
kparams = {}
|
223
|
-
client.add_param(kparams, '
|
224
|
-
client.add_param(kparams, '
|
225
|
-
client.queue_service_action_call('attachment_attachmentasset', '
|
248
|
+
client.add_param(kparams, 'id', id)
|
249
|
+
client.add_param(kparams, 'contentResource', content_resource)
|
250
|
+
client.queue_service_action_call('attachment_attachmentasset', 'setContent', 'KalturaAttachmentAsset', kparams)
|
226
251
|
if (client.is_multirequest)
|
227
252
|
return nil
|
228
253
|
end
|
229
254
|
return client.do_queue()
|
230
255
|
end
|
231
256
|
|
232
|
-
|
257
|
+
# Update attachment asset
|
258
|
+
# @return [KalturaAttachmentAsset]
|
259
|
+
def update(id, attachment_asset)
|
233
260
|
kparams = {}
|
234
|
-
client.add_param(kparams, '
|
235
|
-
client.
|
261
|
+
client.add_param(kparams, 'id', id)
|
262
|
+
client.add_param(kparams, 'attachmentAsset', attachment_asset)
|
263
|
+
client.queue_service_action_call('attachment_attachmentasset', 'update', 'KalturaAttachmentAsset', kparams)
|
236
264
|
if (client.is_multirequest)
|
237
265
|
return nil
|
238
266
|
end
|