kaltura-client 1.2

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.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/README +21 -0
  3. data/Rakefile +19 -0
  4. data/agpl.txt +674 -0
  5. data/kaltura.yml +7 -0
  6. data/lib/kaltura.rb +31 -0
  7. data/lib/kaltura_client.rb +15649 -0
  8. data/lib/kaltura_client_base.rb +432 -0
  9. data/lib/kaltura_plugins/kaltura_abc_screeners_watermark_access_control_client_plugin.rb +37 -0
  10. data/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +110 -0
  11. data/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +239 -0
  12. data/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +61 -0
  13. data/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +227 -0
  14. data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +349 -0
  15. data/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +116 -0
  16. data/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +55 -0
  17. data/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +58 -0
  18. data/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +40 -0
  19. data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +406 -0
  20. data/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +138 -0
  21. data/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +99 -0
  22. data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +1725 -0
  23. data/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +312 -0
  24. data/lib/kaltura_plugins/kaltura_document_client_plugin.rb +522 -0
  25. data/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +401 -0
  26. data/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +827 -0
  27. data/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +39 -0
  28. data/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +273 -0
  29. data/lib/kaltura_plugins/kaltura_event_cue_point_client_plugin.rb +67 -0
  30. data/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +415 -0
  31. data/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +203 -0
  32. data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +157 -0
  33. data/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +309 -0
  34. data/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +72 -0
  35. data/lib/kaltura_plugins/kaltura_like_client_plugin.rb +82 -0
  36. data/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +785 -0
  37. data/lib/kaltura_plugins/kaltura_multi_centers_client_plugin.rb +45 -0
  38. data/lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb +347 -0
  39. data/lib/kaltura_plugins/kaltura_scheduled_task_client_plugin.rb +347 -0
  40. data/lib/kaltura_plugins/kaltura_scheduled_task_event_notification_client_plugin.rb +45 -0
  41. data/lib/kaltura_plugins/kaltura_scheduled_task_metadata_client_plugin.rb +51 -0
  42. data/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +231 -0
  43. data/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +145 -0
  44. data/lib/kaltura_plugins/kaltura_thumb_cue_point_client_plugin.rb +105 -0
  45. data/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +238 -0
  46. data/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +40 -0
  47. data/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +263 -0
  48. data/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +111 -0
  49. data/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +195 -0
  50. data/test/access_control_service_test.rb +75 -0
  51. data/test/base_entry_service_test.rb +267 -0
  52. data/test/configuration_test.rb +178 -0
  53. data/test/cue_point_service_test.rb +67 -0
  54. data/test/data_service_test.rb +76 -0
  55. data/test/document_service_test.rb +41 -0
  56. data/test/media/test.mov +0 -0
  57. data/test/media/test.pdf +0 -0
  58. data/test/media/test.png +0 -0
  59. data/test/media/test.swf +0 -0
  60. data/test/media/test.wmv +0 -0
  61. data/test/media_service_test.rb +294 -0
  62. data/test/metadata_profile_service_test.rb +63 -0
  63. data/test/test_helper.rb +59 -0
  64. metadata +132 -0
@@ -0,0 +1,45 @@
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
+ require File.dirname(__FILE__) + '/kaltura_scheduled_task_client_plugin.rb'
30
+ require File.dirname(__FILE__) + '/kaltura_event_notification_client_plugin.rb'
31
+
32
+ module Kaltura
33
+
34
+ class KalturaDispatchEventNotificationObjectTask < KalturaObjectTask
35
+ # The event notification template id to dispatch
36
+ #
37
+ attr_accessor :event_notification_template_id
38
+
39
+ def event_notification_template_id=(val)
40
+ @event_notification_template_id = val.to_i
41
+ end
42
+ end
43
+
44
+
45
+ end
@@ -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-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
+ require File.dirname(__FILE__) + '/kaltura_scheduled_task_client_plugin.rb'
30
+ require File.dirname(__FILE__) + '/kaltura_metadata_client_plugin.rb'
31
+
32
+ module Kaltura
33
+
34
+ class KalturaExecuteMetadataXsltObjectTask < KalturaObjectTask
35
+ # Metadata profile id to lookup the metadata object
36
+ #
37
+ attr_accessor :metadata_profile_id
38
+ # Metadata object type to lookup the metadata object
39
+ #
40
+ attr_accessor :metadata_object_type
41
+ # The XSLT to execute
42
+ #
43
+ attr_accessor :xslt
44
+
45
+ def metadata_profile_id=(val)
46
+ @metadata_profile_id = val.to_i
47
+ end
48
+ end
49
+
50
+
51
+ end
@@ -0,0 +1,231 @@
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 Kaltura
31
+
32
+ class KalturaShortLinkStatus
33
+ DISABLED = 1
34
+ ENABLED = 2
35
+ DELETED = 3
36
+ end
37
+
38
+ class KalturaShortLinkOrderBy
39
+ CREATED_AT_ASC = "+createdAt"
40
+ EXPIRES_AT_ASC = "+expiresAt"
41
+ UPDATED_AT_ASC = "+updatedAt"
42
+ CREATED_AT_DESC = "-createdAt"
43
+ EXPIRES_AT_DESC = "-expiresAt"
44
+ UPDATED_AT_DESC = "-updatedAt"
45
+ end
46
+
47
+ class KalturaShortLink < KalturaObjectBase
48
+ attr_accessor :id
49
+ attr_accessor :created_at
50
+ attr_accessor :updated_at
51
+ attr_accessor :expires_at
52
+ attr_accessor :partner_id
53
+ attr_accessor :user_id
54
+ attr_accessor :name
55
+ attr_accessor :system_name
56
+ attr_accessor :full_url
57
+ attr_accessor :status
58
+
59
+ def id=(val)
60
+ @id = val.to_i
61
+ end
62
+ def created_at=(val)
63
+ @created_at = val.to_i
64
+ end
65
+ def updated_at=(val)
66
+ @updated_at = val.to_i
67
+ end
68
+ def expires_at=(val)
69
+ @expires_at = val.to_i
70
+ end
71
+ def partner_id=(val)
72
+ @partner_id = val.to_i
73
+ end
74
+ def status=(val)
75
+ @status = val.to_i
76
+ end
77
+ end
78
+
79
+ class KalturaShortLinkListResponse < KalturaObjectBase
80
+ attr_accessor :objects
81
+ attr_accessor :total_count
82
+
83
+ def total_count=(val)
84
+ @total_count = val.to_i
85
+ end
86
+ end
87
+
88
+ class KalturaShortLinkBaseFilter < KalturaFilter
89
+ attr_accessor :id_equal
90
+ attr_accessor :id_in
91
+ attr_accessor :created_at_greater_than_or_equal
92
+ attr_accessor :created_at_less_than_or_equal
93
+ attr_accessor :updated_at_greater_than_or_equal
94
+ attr_accessor :updated_at_less_than_or_equal
95
+ attr_accessor :expires_at_greater_than_or_equal
96
+ attr_accessor :expires_at_less_than_or_equal
97
+ attr_accessor :partner_id_equal
98
+ attr_accessor :partner_id_in
99
+ attr_accessor :user_id_equal
100
+ attr_accessor :user_id_in
101
+ attr_accessor :system_name_equal
102
+ attr_accessor :system_name_in
103
+ attr_accessor :status_equal
104
+ attr_accessor :status_in
105
+
106
+ def id_equal=(val)
107
+ @id_equal = val.to_i
108
+ end
109
+ def created_at_greater_than_or_equal=(val)
110
+ @created_at_greater_than_or_equal = val.to_i
111
+ end
112
+ def created_at_less_than_or_equal=(val)
113
+ @created_at_less_than_or_equal = val.to_i
114
+ end
115
+ def updated_at_greater_than_or_equal=(val)
116
+ @updated_at_greater_than_or_equal = val.to_i
117
+ end
118
+ def updated_at_less_than_or_equal=(val)
119
+ @updated_at_less_than_or_equal = val.to_i
120
+ end
121
+ def expires_at_greater_than_or_equal=(val)
122
+ @expires_at_greater_than_or_equal = val.to_i
123
+ end
124
+ def expires_at_less_than_or_equal=(val)
125
+ @expires_at_less_than_or_equal = val.to_i
126
+ end
127
+ def partner_id_equal=(val)
128
+ @partner_id_equal = val.to_i
129
+ end
130
+ def status_equal=(val)
131
+ @status_equal = val.to_i
132
+ end
133
+ end
134
+
135
+ class KalturaShortLinkFilter < KalturaShortLinkBaseFilter
136
+
137
+ end
138
+
139
+
140
+ # Short link service
141
+ #
142
+ class KalturaShortLinkService < KalturaServiceBase
143
+ def initialize(client)
144
+ super(client)
145
+ end
146
+
147
+ # List short link objects by filter and pager
148
+ #
149
+ def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
150
+ kparams = {}
151
+ client.add_param(kparams, 'filter', filter);
152
+ client.add_param(kparams, 'pager', pager);
153
+ client.queue_service_action_call('shortlink_shortlink', 'list', kparams);
154
+ if (client.is_multirequest)
155
+ return nil;
156
+ end
157
+ return client.do_queue();
158
+ end
159
+
160
+ # Allows you to add a short link object
161
+ #
162
+ def add(short_link)
163
+ kparams = {}
164
+ client.add_param(kparams, 'shortLink', short_link);
165
+ client.queue_service_action_call('shortlink_shortlink', 'add', kparams);
166
+ if (client.is_multirequest)
167
+ return nil;
168
+ end
169
+ return client.do_queue();
170
+ end
171
+
172
+ # Retrieve an short link object by id
173
+ #
174
+ def get(id)
175
+ kparams = {}
176
+ client.add_param(kparams, 'id', id);
177
+ client.queue_service_action_call('shortlink_shortlink', 'get', kparams);
178
+ if (client.is_multirequest)
179
+ return nil;
180
+ end
181
+ return client.do_queue();
182
+ end
183
+
184
+ # Update exisitng short link
185
+ #
186
+ def update(id, short_link)
187
+ kparams = {}
188
+ client.add_param(kparams, 'id', id);
189
+ client.add_param(kparams, 'shortLink', short_link);
190
+ client.queue_service_action_call('shortlink_shortlink', 'update', kparams);
191
+ if (client.is_multirequest)
192
+ return nil;
193
+ end
194
+ return client.do_queue();
195
+ end
196
+
197
+ # Mark the short link as deleted
198
+ #
199
+ def delete(id)
200
+ kparams = {}
201
+ client.add_param(kparams, 'id', id);
202
+ client.queue_service_action_call('shortlink_shortlink', 'delete', kparams);
203
+ if (client.is_multirequest)
204
+ return nil;
205
+ end
206
+ return client.do_queue();
207
+ end
208
+
209
+ # Serves short link
210
+ #
211
+ def goto(id, proxy=false)
212
+ kparams = {}
213
+ client.add_param(kparams, 'id', id);
214
+ # proxy the response instead of redirect
215
+ client.add_param(kparams, 'proxy', proxy);
216
+ client.queue_service_action_call('shortlink_shortlink', 'goto', kparams);
217
+ return client.get_serve_url();
218
+ end
219
+ end
220
+
221
+ class KalturaClient < KalturaClientBase
222
+ attr_reader :short_link_service
223
+ def short_link_service
224
+ if (@short_link_service == nil)
225
+ @short_link_service = KalturaShortLinkService.new(self)
226
+ end
227
+ return @short_link_service
228
+ end
229
+ end
230
+
231
+ end
@@ -0,0 +1,145 @@
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 Kaltura
31
+
32
+ class KalturaTag < KalturaObjectBase
33
+ attr_accessor :id
34
+ attr_accessor :tag
35
+ attr_accessor :tagged_object_type
36
+ attr_accessor :partner_id
37
+ attr_accessor :instance_count
38
+ attr_accessor :created_at
39
+ attr_accessor :updated_at
40
+
41
+ def id=(val)
42
+ @id = val.to_i
43
+ end
44
+ def partner_id=(val)
45
+ @partner_id = val.to_i
46
+ end
47
+ def instance_count=(val)
48
+ @instance_count = val.to_i
49
+ end
50
+ def created_at=(val)
51
+ @created_at = val.to_i
52
+ end
53
+ def updated_at=(val)
54
+ @updated_at = val.to_i
55
+ end
56
+ end
57
+
58
+ class KalturaTagListResponse < KalturaObjectBase
59
+ attr_accessor :objects
60
+ attr_accessor :total_count
61
+
62
+ def total_count=(val)
63
+ @total_count = val.to_i
64
+ end
65
+ end
66
+
67
+ class KalturaIndexTagsByPrivacyContextJobData < KalturaJobData
68
+ attr_accessor :changed_category_id
69
+ attr_accessor :deleted_privacy_contexts
70
+ attr_accessor :added_privacy_contexts
71
+
72
+ def changed_category_id=(val)
73
+ @changed_category_id = val.to_i
74
+ end
75
+ end
76
+
77
+ class KalturaTagFilter < KalturaFilter
78
+ attr_accessor :object_type_equal
79
+ attr_accessor :tag_equal
80
+ attr_accessor :tag_starts_with
81
+ attr_accessor :instance_count_equal
82
+ attr_accessor :instance_count_in
83
+
84
+ def instance_count_equal=(val)
85
+ @instance_count_equal = val.to_i
86
+ end
87
+ def instance_count_in=(val)
88
+ @instance_count_in = val.to_i
89
+ end
90
+ end
91
+
92
+
93
+ # Search object tags
94
+ #
95
+ class KalturaTagService < KalturaServiceBase
96
+ def initialize(client)
97
+ super(client)
98
+ end
99
+
100
+ def search(tag_filter, pager=KalturaNotImplemented)
101
+ kparams = {}
102
+ client.add_param(kparams, 'tagFilter', tag_filter);
103
+ client.add_param(kparams, 'pager', pager);
104
+ client.queue_service_action_call('tagsearch_tag', 'search', kparams);
105
+ if (client.is_multirequest)
106
+ return nil;
107
+ end
108
+ return client.do_queue();
109
+ end
110
+
111
+ # Action goes over all tags with instanceCount==0 and checks whether they need to be removed from the DB. Returns number of removed tags.
112
+ #
113
+ def delete_pending()
114
+ kparams = {}
115
+ client.queue_service_action_call('tagsearch_tag', 'deletePending', kparams);
116
+ if (client.is_multirequest)
117
+ return nil;
118
+ end
119
+ return client.do_queue();
120
+ end
121
+
122
+ def index_category_entry_tags(category_id, pc_to_decrement, pc_to_increment)
123
+ kparams = {}
124
+ client.add_param(kparams, 'categoryId', category_id);
125
+ client.add_param(kparams, 'pcToDecrement', pc_to_decrement);
126
+ client.add_param(kparams, 'pcToIncrement', pc_to_increment);
127
+ client.queue_service_action_call('tagsearch_tag', 'indexCategoryEntryTags', kparams);
128
+ if (client.is_multirequest)
129
+ return nil;
130
+ end
131
+ return client.do_queue();
132
+ end
133
+ end
134
+
135
+ class KalturaClient < KalturaClientBase
136
+ attr_reader :tag_service
137
+ def tag_service
138
+ if (@tag_service == nil)
139
+ @tag_service = KalturaTagService.new(self)
140
+ end
141
+ return @tag_service
142
+ end
143
+ end
144
+
145
+ end