kaltura_api 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/README +40 -0
  3. data/Rakefile +19 -0
  4. data/kaltura_api.yml +7 -0
  5. data/lib/kaltura_api.rb +31 -0
  6. data/lib/kaltura_client.rb +14450 -0
  7. data/lib/kaltura_client_base.rb +432 -0
  8. data/lib/kaltura_plugins/kaltura_abc_screeners_watermark_access_control_client_plugin.rb +37 -0
  9. data/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +108 -0
  10. data/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +237 -0
  11. data/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +61 -0
  12. data/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +227 -0
  13. data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +349 -0
  14. data/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +109 -0
  15. data/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +55 -0
  16. data/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +46 -0
  17. data/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +40 -0
  18. data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +406 -0
  19. data/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +138 -0
  20. data/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +97 -0
  21. data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +1717 -0
  22. data/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +290 -0
  23. data/lib/kaltura_plugins/kaltura_document_client_plugin.rb +522 -0
  24. data/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +204 -0
  25. data/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +810 -0
  26. data/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +39 -0
  27. data/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +276 -0
  28. data/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +405 -0
  29. data/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +203 -0
  30. data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +151 -0
  31. data/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +309 -0
  32. data/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +72 -0
  33. data/lib/kaltura_plugins/kaltura_like_client_plugin.rb +82 -0
  34. data/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +788 -0
  35. data/lib/kaltura_plugins/kaltura_multi_centers_client_plugin.rb +45 -0
  36. data/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +231 -0
  37. data/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +145 -0
  38. data/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +238 -0
  39. data/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +40 -0
  40. data/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +263 -0
  41. data/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +121 -0
  42. data/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +195 -0
  43. data/test/access_control_service_test.rb +75 -0
  44. data/test/base_entry_service_test.rb +267 -0
  45. data/test/configuration_test.rb +178 -0
  46. data/test/cue_point_service_test.rb +67 -0
  47. data/test/data_service_test.rb +76 -0
  48. data/test/document_service_test.rb +41 -0
  49. data/test/media/test.mov +0 -0
  50. data/test/media/test.pdf +0 -0
  51. data/test/media/test.png +0 -0
  52. data/test/media/test.swf +0 -0
  53. data/test/media/test.wmv +0 -0
  54. data/test/media_service_test.rb +294 -0
  55. data/test/metadata_profile_service_test.rb +63 -0
  56. data/test/test_helper.rb +59 -0
  57. metadata +126 -0
@@ -0,0 +1,290 @@
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-2011 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 KalturaApi
31
+
32
+ class KalturaCuePointStatus
33
+ READY = 1
34
+ DELETED = 2
35
+ end
36
+
37
+ class KalturaCuePointOrderBy
38
+ CREATED_AT_ASC = "+createdAt"
39
+ PARTNER_SORT_VALUE_ASC = "+partnerSortValue"
40
+ START_TIME_ASC = "+startTime"
41
+ UPDATED_AT_ASC = "+updatedAt"
42
+ CREATED_AT_DESC = "-createdAt"
43
+ PARTNER_SORT_VALUE_DESC = "-partnerSortValue"
44
+ START_TIME_DESC = "-startTime"
45
+ UPDATED_AT_DESC = "-updatedAt"
46
+ end
47
+
48
+ class KalturaCuePointType
49
+ AD = "adCuePoint.Ad"
50
+ ANNOTATION = "annotation.Annotation"
51
+ CODE = "codeCuePoint.Code"
52
+ end
53
+
54
+ class KalturaCuePoint < KalturaObjectBase
55
+ attr_accessor :id
56
+ attr_accessor :cue_point_type
57
+ attr_accessor :status
58
+ attr_accessor :entry_id
59
+ attr_accessor :partner_id
60
+ attr_accessor :created_at
61
+ attr_accessor :updated_at
62
+ attr_accessor :tags
63
+ # Start time in milliseconds
64
+ #
65
+ attr_accessor :start_time
66
+ attr_accessor :user_id
67
+ attr_accessor :partner_data
68
+ attr_accessor :partner_sort_value
69
+ attr_accessor :force_stop
70
+ attr_accessor :thumb_offset
71
+ attr_accessor :system_name
72
+
73
+ def status=(val)
74
+ @status = val.to_i
75
+ end
76
+ def partner_id=(val)
77
+ @partner_id = val.to_i
78
+ end
79
+ def created_at=(val)
80
+ @created_at = val.to_i
81
+ end
82
+ def updated_at=(val)
83
+ @updated_at = val.to_i
84
+ end
85
+ def start_time=(val)
86
+ @start_time = val.to_i
87
+ end
88
+ def partner_sort_value=(val)
89
+ @partner_sort_value = val.to_i
90
+ end
91
+ def force_stop=(val)
92
+ @force_stop = val.to_i
93
+ end
94
+ def thumb_offset=(val)
95
+ @thumb_offset = val.to_i
96
+ end
97
+ end
98
+
99
+ class KalturaCuePointListResponse < KalturaObjectBase
100
+ attr_accessor :objects
101
+ attr_accessor :total_count
102
+
103
+ def total_count=(val)
104
+ @total_count = val.to_i
105
+ end
106
+ end
107
+
108
+ class KalturaCuePointBaseFilter < KalturaFilter
109
+ attr_accessor :id_equal
110
+ attr_accessor :id_in
111
+ attr_accessor :cue_point_type_equal
112
+ attr_accessor :cue_point_type_in
113
+ attr_accessor :status_equal
114
+ attr_accessor :status_in
115
+ attr_accessor :entry_id_equal
116
+ attr_accessor :entry_id_in
117
+ attr_accessor :created_at_greater_than_or_equal
118
+ attr_accessor :created_at_less_than_or_equal
119
+ attr_accessor :updated_at_greater_than_or_equal
120
+ attr_accessor :updated_at_less_than_or_equal
121
+ attr_accessor :tags_like
122
+ attr_accessor :tags_multi_like_or
123
+ attr_accessor :tags_multi_like_and
124
+ attr_accessor :start_time_greater_than_or_equal
125
+ attr_accessor :start_time_less_than_or_equal
126
+ attr_accessor :user_id_equal
127
+ attr_accessor :user_id_in
128
+ attr_accessor :partner_sort_value_equal
129
+ attr_accessor :partner_sort_value_in
130
+ attr_accessor :partner_sort_value_greater_than_or_equal
131
+ attr_accessor :partner_sort_value_less_than_or_equal
132
+ attr_accessor :force_stop_equal
133
+ attr_accessor :system_name_equal
134
+ attr_accessor :system_name_in
135
+
136
+ def status_equal=(val)
137
+ @status_equal = val.to_i
138
+ end
139
+ def created_at_greater_than_or_equal=(val)
140
+ @created_at_greater_than_or_equal = val.to_i
141
+ end
142
+ def created_at_less_than_or_equal=(val)
143
+ @created_at_less_than_or_equal = val.to_i
144
+ end
145
+ def updated_at_greater_than_or_equal=(val)
146
+ @updated_at_greater_than_or_equal = val.to_i
147
+ end
148
+ def updated_at_less_than_or_equal=(val)
149
+ @updated_at_less_than_or_equal = val.to_i
150
+ end
151
+ def start_time_greater_than_or_equal=(val)
152
+ @start_time_greater_than_or_equal = val.to_i
153
+ end
154
+ def start_time_less_than_or_equal=(val)
155
+ @start_time_less_than_or_equal = val.to_i
156
+ end
157
+ def partner_sort_value_equal=(val)
158
+ @partner_sort_value_equal = val.to_i
159
+ end
160
+ def partner_sort_value_greater_than_or_equal=(val)
161
+ @partner_sort_value_greater_than_or_equal = val.to_i
162
+ end
163
+ def partner_sort_value_less_than_or_equal=(val)
164
+ @partner_sort_value_less_than_or_equal = val.to_i
165
+ end
166
+ def force_stop_equal=(val)
167
+ @force_stop_equal = val.to_i
168
+ end
169
+ end
170
+
171
+ class KalturaCuePointFilter < KalturaCuePointBaseFilter
172
+
173
+ end
174
+
175
+
176
+ # Cue Point service
177
+ #
178
+ class KalturaCuePointService < KalturaServiceBase
179
+ def initialize(client)
180
+ super(client)
181
+ end
182
+
183
+ # Allows you to add an cue point object associated with an entry
184
+ #
185
+ def add(cue_point)
186
+ kparams = {}
187
+ client.add_param(kparams, 'cuePoint', cue_point);
188
+ client.queue_service_action_call('cuepoint_cuepoint', 'add', kparams);
189
+ if (client.is_multirequest)
190
+ return nil;
191
+ end
192
+ return client.do_queue();
193
+ end
194
+
195
+ # Allows you to add multiple cue points objects by uploading XML that contains multiple cue point definitions
196
+ #
197
+ def add_from_bulk(file_data)
198
+ kparams = {}
199
+ client.add_param(kparams, 'fileData', file_data);
200
+ client.queue_service_action_call('cuepoint_cuepoint', 'addFromBulk', kparams);
201
+ if (client.is_multirequest)
202
+ return nil;
203
+ end
204
+ return client.do_queue();
205
+ end
206
+
207
+ # Download multiple cue points objects as XML definitions
208
+ #
209
+ def serve_bulk(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
210
+ kparams = {}
211
+ client.add_param(kparams, 'filter', filter);
212
+ client.add_param(kparams, 'pager', pager);
213
+ client.queue_service_action_call('cuepoint_cuepoint', 'serveBulk', kparams);
214
+ return client.get_serve_url();
215
+ end
216
+
217
+ # Retrieve an CuePoint object by id
218
+ #
219
+ def get(id)
220
+ kparams = {}
221
+ client.add_param(kparams, 'id', id);
222
+ client.queue_service_action_call('cuepoint_cuepoint', 'get', kparams);
223
+ if (client.is_multirequest)
224
+ return nil;
225
+ end
226
+ return client.do_queue();
227
+ end
228
+
229
+ # List cue point objects by filter and pager
230
+ #
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('cuepoint_cuepoint', 'list', kparams);
236
+ if (client.is_multirequest)
237
+ return nil;
238
+ end
239
+ return client.do_queue();
240
+ end
241
+
242
+ # count cue point objects by filter
243
+ #
244
+ def count(filter=KalturaNotImplemented)
245
+ kparams = {}
246
+ client.add_param(kparams, 'filter', filter);
247
+ client.queue_service_action_call('cuepoint_cuepoint', 'count', kparams);
248
+ if (client.is_multirequest)
249
+ return nil;
250
+ end
251
+ return client.do_queue();
252
+ end
253
+
254
+ # Update cue point by id
255
+ #
256
+ def update(id, cue_point)
257
+ kparams = {}
258
+ client.add_param(kparams, 'id', id);
259
+ client.add_param(kparams, 'cuePoint', cue_point);
260
+ client.queue_service_action_call('cuepoint_cuepoint', 'update', kparams);
261
+ if (client.is_multirequest)
262
+ return nil;
263
+ end
264
+ return client.do_queue();
265
+ end
266
+
267
+ # delete cue point by id, and delete all children cue points
268
+ #
269
+ def delete(id)
270
+ kparams = {}
271
+ client.add_param(kparams, 'id', id);
272
+ client.queue_service_action_call('cuepoint_cuepoint', 'delete', kparams);
273
+ if (client.is_multirequest)
274
+ return nil;
275
+ end
276
+ return client.do_queue();
277
+ end
278
+ end
279
+
280
+ class KalturaClient < KalturaClientBase
281
+ attr_reader :cue_point_service
282
+ def cue_point_service
283
+ if (@cue_point_service == nil)
284
+ @cue_point_service = KalturaCuePointService.new(self)
285
+ end
286
+ return @cue_point_service
287
+ end
288
+ end
289
+
290
+ end