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,110 @@
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_cue_point_client_plugin.rb'
30
+
31
+ module Kaltura
32
+
33
+ class KalturaAdCuePointOrderBy
34
+ CREATED_AT_ASC = "+createdAt"
35
+ DURATION_ASC = "+duration"
36
+ END_TIME_ASC = "+endTime"
37
+ PARTNER_SORT_VALUE_ASC = "+partnerSortValue"
38
+ START_TIME_ASC = "+startTime"
39
+ TRIGGERED_AT_ASC = "+triggeredAt"
40
+ UPDATED_AT_ASC = "+updatedAt"
41
+ CREATED_AT_DESC = "-createdAt"
42
+ DURATION_DESC = "-duration"
43
+ END_TIME_DESC = "-endTime"
44
+ PARTNER_SORT_VALUE_DESC = "-partnerSortValue"
45
+ START_TIME_DESC = "-startTime"
46
+ TRIGGERED_AT_DESC = "-triggeredAt"
47
+ UPDATED_AT_DESC = "-updatedAt"
48
+ end
49
+
50
+ class KalturaAdProtocolType
51
+ CUSTOM = "0"
52
+ VAST = "1"
53
+ VAST_2_0 = "2"
54
+ VPAID = "3"
55
+ end
56
+
57
+ class KalturaAdType
58
+ VIDEO = "1"
59
+ OVERLAY = "2"
60
+ end
61
+
62
+ class KalturaAdCuePoint < KalturaCuePoint
63
+ attr_accessor :protocol_type
64
+ attr_accessor :source_url
65
+ attr_accessor :ad_type
66
+ attr_accessor :title
67
+ attr_accessor :end_time
68
+ # Duration in milliseconds
69
+ #
70
+ attr_accessor :duration
71
+
72
+ def end_time=(val)
73
+ @end_time = val.to_i
74
+ end
75
+ def duration=(val)
76
+ @duration = val.to_i
77
+ end
78
+ end
79
+
80
+ class KalturaAdCuePointBaseFilter < KalturaCuePointFilter
81
+ attr_accessor :protocol_type_equal
82
+ attr_accessor :protocol_type_in
83
+ attr_accessor :title_like
84
+ attr_accessor :title_multi_like_or
85
+ attr_accessor :title_multi_like_and
86
+ attr_accessor :end_time_greater_than_or_equal
87
+ attr_accessor :end_time_less_than_or_equal
88
+ attr_accessor :duration_greater_than_or_equal
89
+ attr_accessor :duration_less_than_or_equal
90
+
91
+ def end_time_greater_than_or_equal=(val)
92
+ @end_time_greater_than_or_equal = val.to_i
93
+ end
94
+ def end_time_less_than_or_equal=(val)
95
+ @end_time_less_than_or_equal = val.to_i
96
+ end
97
+ def duration_greater_than_or_equal=(val)
98
+ @duration_greater_than_or_equal = val.to_i
99
+ end
100
+ def duration_less_than_or_equal=(val)
101
+ @duration_less_than_or_equal = val.to_i
102
+ end
103
+ end
104
+
105
+ class KalturaAdCuePointFilter < KalturaAdCuePointBaseFilter
106
+
107
+ end
108
+
109
+
110
+ end
@@ -0,0 +1,239 @@
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_cue_point_client_plugin.rb'
30
+
31
+ module Kaltura
32
+
33
+ class KalturaAnnotationOrderBy
34
+ CREATED_AT_ASC = "+createdAt"
35
+ DURATION_ASC = "+duration"
36
+ END_TIME_ASC = "+endTime"
37
+ PARTNER_SORT_VALUE_ASC = "+partnerSortValue"
38
+ START_TIME_ASC = "+startTime"
39
+ TRIGGERED_AT_ASC = "+triggeredAt"
40
+ UPDATED_AT_ASC = "+updatedAt"
41
+ CREATED_AT_DESC = "-createdAt"
42
+ DURATION_DESC = "-duration"
43
+ END_TIME_DESC = "-endTime"
44
+ PARTNER_SORT_VALUE_DESC = "-partnerSortValue"
45
+ START_TIME_DESC = "-startTime"
46
+ TRIGGERED_AT_DESC = "-triggeredAt"
47
+ UPDATED_AT_DESC = "-updatedAt"
48
+ end
49
+
50
+ class KalturaAnnotation < KalturaCuePoint
51
+ attr_accessor :parent_id
52
+ attr_accessor :text
53
+ # End time in milliseconds
54
+ #
55
+ attr_accessor :end_time
56
+ # Duration in milliseconds
57
+ #
58
+ attr_accessor :duration
59
+ # Depth in the tree
60
+ #
61
+ attr_accessor :depth
62
+ # Number of all descendants
63
+ #
64
+ attr_accessor :children_count
65
+ # Number of children, first generation only.
66
+ #
67
+ attr_accessor :direct_children_count
68
+
69
+ def end_time=(val)
70
+ @end_time = val.to_i
71
+ end
72
+ def duration=(val)
73
+ @duration = val.to_i
74
+ end
75
+ def depth=(val)
76
+ @depth = val.to_i
77
+ end
78
+ def children_count=(val)
79
+ @children_count = val.to_i
80
+ end
81
+ def direct_children_count=(val)
82
+ @direct_children_count = val.to_i
83
+ end
84
+ end
85
+
86
+ class KalturaAnnotationListResponse < KalturaObjectBase
87
+ attr_accessor :objects
88
+ attr_accessor :total_count
89
+
90
+ def total_count=(val)
91
+ @total_count = val.to_i
92
+ end
93
+ end
94
+
95
+ class KalturaAnnotationBaseFilter < KalturaCuePointFilter
96
+ attr_accessor :parent_id_equal
97
+ attr_accessor :parent_id_in
98
+ attr_accessor :text_like
99
+ attr_accessor :text_multi_like_or
100
+ attr_accessor :text_multi_like_and
101
+ attr_accessor :end_time_greater_than_or_equal
102
+ attr_accessor :end_time_less_than_or_equal
103
+ attr_accessor :duration_greater_than_or_equal
104
+ attr_accessor :duration_less_than_or_equal
105
+
106
+ def end_time_greater_than_or_equal=(val)
107
+ @end_time_greater_than_or_equal = val.to_i
108
+ end
109
+ def end_time_less_than_or_equal=(val)
110
+ @end_time_less_than_or_equal = val.to_i
111
+ end
112
+ def duration_greater_than_or_equal=(val)
113
+ @duration_greater_than_or_equal = val.to_i
114
+ end
115
+ def duration_less_than_or_equal=(val)
116
+ @duration_less_than_or_equal = val.to_i
117
+ end
118
+ end
119
+
120
+ class KalturaAnnotationFilter < KalturaAnnotationBaseFilter
121
+
122
+ end
123
+
124
+
125
+ # Annotation service - Video Annotation
126
+ #
127
+ class KalturaAnnotationService < KalturaServiceBase
128
+ def initialize(client)
129
+ super(client)
130
+ end
131
+
132
+ # Allows you to add an annotation object associated with an entry
133
+ #
134
+ def add(annotation)
135
+ kparams = {}
136
+ client.add_param(kparams, 'annotation', annotation);
137
+ client.queue_service_action_call('annotation_annotation', 'add', kparams);
138
+ if (client.is_multirequest)
139
+ return nil;
140
+ end
141
+ return client.do_queue();
142
+ end
143
+
144
+ # Update annotation by id
145
+ #
146
+ def update(id, annotation)
147
+ kparams = {}
148
+ client.add_param(kparams, 'id', id);
149
+ client.add_param(kparams, 'annotation', annotation);
150
+ client.queue_service_action_call('annotation_annotation', 'update', kparams);
151
+ if (client.is_multirequest)
152
+ return nil;
153
+ end
154
+ return client.do_queue();
155
+ end
156
+
157
+ # List annotation objects by filter and pager
158
+ #
159
+ def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
160
+ kparams = {}
161
+ client.add_param(kparams, 'filter', filter);
162
+ client.add_param(kparams, 'pager', pager);
163
+ client.queue_service_action_call('annotation_annotation', 'list', kparams);
164
+ if (client.is_multirequest)
165
+ return nil;
166
+ end
167
+ return client.do_queue();
168
+ end
169
+
170
+ # Allows you to add multiple cue points objects by uploading XML that contains multiple cue point definitions
171
+ #
172
+ def add_from_bulk(file_data)
173
+ kparams = {}
174
+ client.add_param(kparams, 'fileData', file_data);
175
+ client.queue_service_action_call('annotation_annotation', 'addFromBulk', kparams);
176
+ if (client.is_multirequest)
177
+ return nil;
178
+ end
179
+ return client.do_queue();
180
+ end
181
+
182
+ # Download multiple cue points objects as XML definitions
183
+ #
184
+ def serve_bulk(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
185
+ kparams = {}
186
+ client.add_param(kparams, 'filter', filter);
187
+ client.add_param(kparams, 'pager', pager);
188
+ client.queue_service_action_call('annotation_annotation', 'serveBulk', kparams);
189
+ return client.get_serve_url();
190
+ end
191
+
192
+ # Retrieve an CuePoint object by id
193
+ #
194
+ def get(id)
195
+ kparams = {}
196
+ client.add_param(kparams, 'id', id);
197
+ client.queue_service_action_call('annotation_annotation', 'get', kparams);
198
+ if (client.is_multirequest)
199
+ return nil;
200
+ end
201
+ return client.do_queue();
202
+ end
203
+
204
+ # count cue point objects by filter
205
+ #
206
+ def count(filter=KalturaNotImplemented)
207
+ kparams = {}
208
+ client.add_param(kparams, 'filter', filter);
209
+ client.queue_service_action_call('annotation_annotation', 'count', kparams);
210
+ if (client.is_multirequest)
211
+ return nil;
212
+ end
213
+ return client.do_queue();
214
+ end
215
+
216
+ # delete cue point by id, and delete all children cue points
217
+ #
218
+ def delete(id)
219
+ kparams = {}
220
+ client.add_param(kparams, 'id', id);
221
+ client.queue_service_action_call('annotation_annotation', 'delete', kparams);
222
+ if (client.is_multirequest)
223
+ return nil;
224
+ end
225
+ return client.do_queue();
226
+ end
227
+ end
228
+
229
+ class KalturaClient < KalturaClientBase
230
+ attr_reader :annotation_service
231
+ def annotation_service
232
+ if (@annotation_service == nil)
233
+ @annotation_service = KalturaAnnotationService.new(self)
234
+ end
235
+ return @annotation_service
236
+ end
237
+ end
238
+
239
+ end
@@ -0,0 +1,61 @@
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
+
33
+ # Aspera service
34
+ #
35
+ class KalturaAsperaService < KalturaServiceBase
36
+ def initialize(client)
37
+ super(client)
38
+ end
39
+
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', 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
+ end
60
+
61
+ end
@@ -0,0 +1,227 @@
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 KalturaAttachmentAssetStatus
33
+ ERROR = -1
34
+ QUEUED = 0
35
+ READY = 2
36
+ DELETED = 3
37
+ IMPORTING = 7
38
+ EXPORTING = 9
39
+ end
40
+
41
+ class KalturaAttachmentAssetOrderBy
42
+ CREATED_AT_ASC = "+createdAt"
43
+ DELETED_AT_ASC = "+deletedAt"
44
+ SIZE_ASC = "+size"
45
+ UPDATED_AT_ASC = "+updatedAt"
46
+ CREATED_AT_DESC = "-createdAt"
47
+ DELETED_AT_DESC = "-deletedAt"
48
+ SIZE_DESC = "-size"
49
+ UPDATED_AT_DESC = "-updatedAt"
50
+ end
51
+
52
+ class KalturaAttachmentType
53
+ TEXT = "1"
54
+ MEDIA = "2"
55
+ DOCUMENT = "3"
56
+ end
57
+
58
+ class KalturaAttachmentAsset < KalturaAsset
59
+ # The filename of the attachment asset content
60
+ #
61
+ attr_accessor :filename
62
+ # Attachment asset title
63
+ #
64
+ attr_accessor :title
65
+ # The attachment format
66
+ #
67
+ attr_accessor :format
68
+ # The status of the asset
69
+ #
70
+ attr_accessor :status
71
+
72
+ def status=(val)
73
+ @status = val.to_i
74
+ end
75
+ end
76
+
77
+ class KalturaAttachmentAssetListResponse < KalturaObjectBase
78
+ attr_accessor :objects
79
+ attr_accessor :total_count
80
+
81
+ def total_count=(val)
82
+ @total_count = val.to_i
83
+ end
84
+ end
85
+
86
+ class KalturaAttachmentAssetBaseFilter < KalturaAssetFilter
87
+ attr_accessor :format_equal
88
+ attr_accessor :format_in
89
+ attr_accessor :status_equal
90
+ attr_accessor :status_in
91
+ attr_accessor :status_not_in
92
+
93
+ def status_equal=(val)
94
+ @status_equal = val.to_i
95
+ end
96
+ end
97
+
98
+ class KalturaAttachmentAssetFilter < KalturaAttachmentAssetBaseFilter
99
+
100
+ end
101
+
102
+
103
+ # Retrieve information and invoke actions on attachment Asset
104
+ #
105
+ class KalturaAttachmentAssetService < KalturaServiceBase
106
+ def initialize(client)
107
+ super(client)
108
+ end
109
+
110
+ # Add attachment asset
111
+ #
112
+ def add(entry_id, attachment_asset)
113
+ kparams = {}
114
+ client.add_param(kparams, 'entryId', entry_id);
115
+ client.add_param(kparams, 'attachmentAsset', attachment_asset);
116
+ client.queue_service_action_call('attachment_attachmentasset', 'add', kparams);
117
+ if (client.is_multirequest)
118
+ return nil;
119
+ end
120
+ return client.do_queue();
121
+ end
122
+
123
+ # Update content of attachment asset
124
+ #
125
+ def set_content(id, content_resource)
126
+ kparams = {}
127
+ client.add_param(kparams, 'id', id);
128
+ client.add_param(kparams, 'contentResource', content_resource);
129
+ client.queue_service_action_call('attachment_attachmentasset', 'setContent', kparams);
130
+ if (client.is_multirequest)
131
+ return nil;
132
+ end
133
+ return client.do_queue();
134
+ end
135
+
136
+ # Update attachment asset
137
+ #
138
+ def update(id, attachment_asset)
139
+ kparams = {}
140
+ client.add_param(kparams, 'id', id);
141
+ client.add_param(kparams, 'attachmentAsset', attachment_asset);
142
+ client.queue_service_action_call('attachment_attachmentasset', 'update', kparams);
143
+ if (client.is_multirequest)
144
+ return nil;
145
+ end
146
+ return client.do_queue();
147
+ end
148
+
149
+ # Get download URL for the asset
150
+ #
151
+ def get_url(id, storage_id=KalturaNotImplemented)
152
+ kparams = {}
153
+ client.add_param(kparams, 'id', id);
154
+ client.add_param(kparams, 'storageId', storage_id);
155
+ client.queue_service_action_call('attachment_attachmentasset', 'getUrl', kparams);
156
+ if (client.is_multirequest)
157
+ return nil;
158
+ end
159
+ return client.do_queue();
160
+ end
161
+
162
+ # Get remote storage existing paths for the asset
163
+ #
164
+ def get_remote_paths(id)
165
+ kparams = {}
166
+ client.add_param(kparams, 'id', id);
167
+ client.queue_service_action_call('attachment_attachmentasset', 'getRemotePaths', kparams);
168
+ if (client.is_multirequest)
169
+ return nil;
170
+ end
171
+ return client.do_queue();
172
+ end
173
+
174
+ # Serves attachment by its id
175
+ #
176
+ def serve(attachment_asset_id)
177
+ kparams = {}
178
+ client.add_param(kparams, 'attachmentAssetId', attachment_asset_id);
179
+ client.queue_service_action_call('attachment_attachmentasset', 'serve', kparams);
180
+ return client.get_serve_url();
181
+ end
182
+
183
+ def get(attachment_asset_id)
184
+ kparams = {}
185
+ client.add_param(kparams, 'attachmentAssetId', attachment_asset_id);
186
+ client.queue_service_action_call('attachment_attachmentasset', 'get', kparams);
187
+ if (client.is_multirequest)
188
+ return nil;
189
+ end
190
+ return client.do_queue();
191
+ end
192
+
193
+ # List attachment Assets by filter and pager
194
+ #
195
+ def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
196
+ kparams = {}
197
+ client.add_param(kparams, 'filter', filter);
198
+ client.add_param(kparams, 'pager', pager);
199
+ client.queue_service_action_call('attachment_attachmentasset', 'list', kparams);
200
+ if (client.is_multirequest)
201
+ return nil;
202
+ end
203
+ return client.do_queue();
204
+ end
205
+
206
+ def delete(attachment_asset_id)
207
+ kparams = {}
208
+ client.add_param(kparams, 'attachmentAssetId', attachment_asset_id);
209
+ client.queue_service_action_call('attachment_attachmentasset', 'delete', kparams);
210
+ if (client.is_multirequest)
211
+ return nil;
212
+ end
213
+ return client.do_queue();
214
+ end
215
+ end
216
+
217
+ class KalturaClient < KalturaClientBase
218
+ attr_reader :attachment_asset_service
219
+ def attachment_asset_service
220
+ if (@attachment_asset_service == nil)
221
+ @attachment_asset_service = KalturaAttachmentAssetService.new(self)
222
+ end
223
+ return @attachment_asset_service
224
+ end
225
+ end
226
+
227
+ end