kaltura-ruby-client 1.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.
- checksums.yaml +7 -0
- data/README +20 -0
- data/Rakefile +19 -0
- data/agpl.txt +674 -0
- data/kaltura.yml +7 -0
- data/lib/kaltura.rb +31 -0
- data/lib/kaltura_client.rb +14450 -0
- data/lib/kaltura_client_base.rb +432 -0
- data/lib/kaltura_plugins/kaltura_abc_screeners_watermark_access_control_client_plugin.rb +37 -0
- data/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +108 -0
- data/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +237 -0
- data/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +61 -0
- data/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +227 -0
- data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +349 -0
- data/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +109 -0
- data/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +55 -0
- data/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +46 -0
- data/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +40 -0
- data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +406 -0
- data/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +138 -0
- data/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +97 -0
- data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +1717 -0
- data/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +290 -0
- data/lib/kaltura_plugins/kaltura_document_client_plugin.rb +522 -0
- data/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +204 -0
- data/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +810 -0
- data/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +39 -0
- data/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +276 -0
- data/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +405 -0
- data/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +203 -0
- data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +151 -0
- data/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +309 -0
- data/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +72 -0
- data/lib/kaltura_plugins/kaltura_like_client_plugin.rb +82 -0
- data/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +788 -0
- data/lib/kaltura_plugins/kaltura_multi_centers_client_plugin.rb +45 -0
- data/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +231 -0
- data/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +145 -0
- data/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +238 -0
- data/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +40 -0
- data/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +263 -0
- data/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +121 -0
- data/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +195 -0
- data/license.txt +674 -0
- data/test/access_control_service_test.rb +75 -0
- data/test/base_entry_service_test.rb +267 -0
- data/test/configuration_test.rb +178 -0
- data/test/cue_point_service_test.rb +67 -0
- data/test/data_service_test.rb +76 -0
- data/test/document_service_test.rb +41 -0
- data/test/media/test.mov +0 -0
- data/test/media/test.pdf +0 -0
- data/test/media/test.png +0 -0
- data/test/media/test.swf +0 -0
- data/test/media/test.wmv +0 -0
- data/test/media_service_test.rb +294 -0
- data/test/metadata_profile_service_test.rb +63 -0
- data/test/test_helper.rb +59 -0
- metadata +127 -0
@@ -0,0 +1,72 @@
|
|
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 KalturaKontikiStorageProfileOrderBy
|
33
|
+
CREATED_AT_ASC = "+createdAt"
|
34
|
+
UPDATED_AT_ASC = "+updatedAt"
|
35
|
+
CREATED_AT_DESC = "-createdAt"
|
36
|
+
UPDATED_AT_DESC = "-updatedAt"
|
37
|
+
end
|
38
|
+
|
39
|
+
class KalturaKontikiStorageProfile < KalturaStorageProfile
|
40
|
+
attr_accessor :service_token
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
class KalturaKontikiStorageDeleteJobData < KalturaStorageDeleteJobData
|
45
|
+
# Unique Kontiki MOID for the content uploaded to Kontiki
|
46
|
+
#
|
47
|
+
attr_accessor :content_moid
|
48
|
+
attr_accessor :service_token
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
class KalturaKontikiStorageExportJobData < KalturaStorageExportJobData
|
53
|
+
# Holds the id of the exported asset
|
54
|
+
#
|
55
|
+
attr_accessor :flavor_asset_id
|
56
|
+
# Unique Kontiki MOID for the content uploaded to Kontiki
|
57
|
+
#
|
58
|
+
attr_accessor :content_moid
|
59
|
+
attr_accessor :service_token
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
class KalturaKontikiStorageProfileBaseFilter < KalturaStorageProfileFilter
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
class KalturaKontikiStorageProfileFilter < KalturaKontikiStorageProfileBaseFilter
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
end
|
@@ -0,0 +1,82 @@
|
|
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
|
+
# Allows user to 'like' or 'unlike' and entry
|
34
|
+
#
|
35
|
+
class KalturaLikeService < KalturaServiceBase
|
36
|
+
def initialize(client)
|
37
|
+
super(client)
|
38
|
+
end
|
39
|
+
|
40
|
+
def like(entry_id)
|
41
|
+
kparams = {}
|
42
|
+
client.add_param(kparams, 'entryId', entry_id);
|
43
|
+
client.queue_service_action_call('like_like', 'like', kparams);
|
44
|
+
if (client.is_multirequest)
|
45
|
+
return nil;
|
46
|
+
end
|
47
|
+
return client.do_queue();
|
48
|
+
end
|
49
|
+
|
50
|
+
def unlike(entry_id)
|
51
|
+
kparams = {}
|
52
|
+
client.add_param(kparams, 'entryId', entry_id);
|
53
|
+
client.queue_service_action_call('like_like', 'unlike', kparams);
|
54
|
+
if (client.is_multirequest)
|
55
|
+
return nil;
|
56
|
+
end
|
57
|
+
return client.do_queue();
|
58
|
+
end
|
59
|
+
|
60
|
+
def check_like_exists(entry_id, user_id=KalturaNotImplemented)
|
61
|
+
kparams = {}
|
62
|
+
client.add_param(kparams, 'entryId', entry_id);
|
63
|
+
client.add_param(kparams, 'userId', user_id);
|
64
|
+
client.queue_service_action_call('like_like', 'checkLikeExists', kparams);
|
65
|
+
if (client.is_multirequest)
|
66
|
+
return nil;
|
67
|
+
end
|
68
|
+
return client.do_queue();
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class KalturaClient < KalturaClientBase
|
73
|
+
attr_reader :like_service
|
74
|
+
def like_service
|
75
|
+
if (@like_service == nil)
|
76
|
+
@like_service = KalturaLikeService.new(self)
|
77
|
+
end
|
78
|
+
return @like_service
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
@@ -0,0 +1,788 @@
|
|
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 KalturaMetadataProfileCreateMode
|
33
|
+
API = 1
|
34
|
+
KMC = 2
|
35
|
+
APP = 3
|
36
|
+
end
|
37
|
+
|
38
|
+
class KalturaMetadataProfileStatus
|
39
|
+
ACTIVE = 1
|
40
|
+
DEPRECATED = 2
|
41
|
+
TRANSFORMING = 3
|
42
|
+
end
|
43
|
+
|
44
|
+
class KalturaMetadataStatus
|
45
|
+
VALID = 1
|
46
|
+
INVALID = 2
|
47
|
+
DELETED = 3
|
48
|
+
end
|
49
|
+
|
50
|
+
class KalturaMetadataObjectType
|
51
|
+
AD_CUE_POINT = "adCuePointMetadata.AdCuePoint"
|
52
|
+
ANNOTATION = "annotationMetadata.Annotation"
|
53
|
+
CODE_CUE_POINT = "codeCuePointMetadata.CodeCuePoint"
|
54
|
+
ENTRY = "1"
|
55
|
+
CATEGORY = "2"
|
56
|
+
USER = "3"
|
57
|
+
PARTNER = "4"
|
58
|
+
end
|
59
|
+
|
60
|
+
class KalturaMetadataOrderBy
|
61
|
+
CREATED_AT_ASC = "+createdAt"
|
62
|
+
METADATA_PROFILE_VERSION_ASC = "+metadataProfileVersion"
|
63
|
+
UPDATED_AT_ASC = "+updatedAt"
|
64
|
+
VERSION_ASC = "+version"
|
65
|
+
CREATED_AT_DESC = "-createdAt"
|
66
|
+
METADATA_PROFILE_VERSION_DESC = "-metadataProfileVersion"
|
67
|
+
UPDATED_AT_DESC = "-updatedAt"
|
68
|
+
VERSION_DESC = "-version"
|
69
|
+
end
|
70
|
+
|
71
|
+
class KalturaMetadataProfileOrderBy
|
72
|
+
CREATED_AT_ASC = "+createdAt"
|
73
|
+
UPDATED_AT_ASC = "+updatedAt"
|
74
|
+
CREATED_AT_DESC = "-createdAt"
|
75
|
+
UPDATED_AT_DESC = "-updatedAt"
|
76
|
+
end
|
77
|
+
|
78
|
+
class KalturaMetadata < KalturaObjectBase
|
79
|
+
attr_accessor :id
|
80
|
+
attr_accessor :partner_id
|
81
|
+
attr_accessor :metadata_profile_id
|
82
|
+
attr_accessor :metadata_profile_version
|
83
|
+
attr_accessor :metadata_object_type
|
84
|
+
attr_accessor :object_id
|
85
|
+
attr_accessor :version
|
86
|
+
attr_accessor :created_at
|
87
|
+
attr_accessor :updated_at
|
88
|
+
attr_accessor :status
|
89
|
+
attr_accessor :xml
|
90
|
+
|
91
|
+
def id=(val)
|
92
|
+
@id = val.to_i
|
93
|
+
end
|
94
|
+
def partner_id=(val)
|
95
|
+
@partner_id = val.to_i
|
96
|
+
end
|
97
|
+
def metadata_profile_id=(val)
|
98
|
+
@metadata_profile_id = val.to_i
|
99
|
+
end
|
100
|
+
def metadata_profile_version=(val)
|
101
|
+
@metadata_profile_version = val.to_i
|
102
|
+
end
|
103
|
+
def version=(val)
|
104
|
+
@version = val.to_i
|
105
|
+
end
|
106
|
+
def created_at=(val)
|
107
|
+
@created_at = val.to_i
|
108
|
+
end
|
109
|
+
def updated_at=(val)
|
110
|
+
@updated_at = val.to_i
|
111
|
+
end
|
112
|
+
def status=(val)
|
113
|
+
@status = val.to_i
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
class KalturaMetadataListResponse < KalturaObjectBase
|
118
|
+
attr_accessor :objects
|
119
|
+
attr_accessor :total_count
|
120
|
+
|
121
|
+
def total_count=(val)
|
122
|
+
@total_count = val.to_i
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
class KalturaMetadataProfile < KalturaObjectBase
|
127
|
+
attr_accessor :id
|
128
|
+
attr_accessor :partner_id
|
129
|
+
attr_accessor :metadata_object_type
|
130
|
+
attr_accessor :version
|
131
|
+
attr_accessor :name
|
132
|
+
attr_accessor :system_name
|
133
|
+
attr_accessor :description
|
134
|
+
attr_accessor :created_at
|
135
|
+
attr_accessor :updated_at
|
136
|
+
attr_accessor :status
|
137
|
+
attr_accessor :xsd
|
138
|
+
attr_accessor :views
|
139
|
+
attr_accessor :xslt
|
140
|
+
attr_accessor :create_mode
|
141
|
+
|
142
|
+
def id=(val)
|
143
|
+
@id = val.to_i
|
144
|
+
end
|
145
|
+
def partner_id=(val)
|
146
|
+
@partner_id = val.to_i
|
147
|
+
end
|
148
|
+
def version=(val)
|
149
|
+
@version = val.to_i
|
150
|
+
end
|
151
|
+
def created_at=(val)
|
152
|
+
@created_at = val.to_i
|
153
|
+
end
|
154
|
+
def updated_at=(val)
|
155
|
+
@updated_at = val.to_i
|
156
|
+
end
|
157
|
+
def status=(val)
|
158
|
+
@status = val.to_i
|
159
|
+
end
|
160
|
+
def create_mode=(val)
|
161
|
+
@create_mode = val.to_i
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
class KalturaMetadataProfileField < KalturaObjectBase
|
166
|
+
attr_accessor :id
|
167
|
+
attr_accessor :x_path
|
168
|
+
attr_accessor :key
|
169
|
+
attr_accessor :label
|
170
|
+
|
171
|
+
def id=(val)
|
172
|
+
@id = val.to_i
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
class KalturaMetadataProfileFieldListResponse < KalturaObjectBase
|
177
|
+
attr_accessor :objects
|
178
|
+
attr_accessor :total_count
|
179
|
+
|
180
|
+
def total_count=(val)
|
181
|
+
@total_count = val.to_i
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
class KalturaMetadataProfileListResponse < KalturaObjectBase
|
186
|
+
attr_accessor :objects
|
187
|
+
attr_accessor :total_count
|
188
|
+
|
189
|
+
def total_count=(val)
|
190
|
+
@total_count = val.to_i
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
class KalturaImportMetadataJobData < KalturaJobData
|
195
|
+
attr_accessor :src_file_url
|
196
|
+
attr_accessor :dest_file_local_path
|
197
|
+
attr_accessor :metadata_id
|
198
|
+
|
199
|
+
def metadata_id=(val)
|
200
|
+
@metadata_id = val.to_i
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
class KalturaMetadataBaseFilter < KalturaFilter
|
205
|
+
attr_accessor :partner_id_equal
|
206
|
+
attr_accessor :metadata_profile_id_equal
|
207
|
+
attr_accessor :metadata_profile_version_equal
|
208
|
+
attr_accessor :metadata_profile_version_greater_than_or_equal
|
209
|
+
attr_accessor :metadata_profile_version_less_than_or_equal
|
210
|
+
attr_accessor :metadata_object_type_equal
|
211
|
+
attr_accessor :object_id_equal
|
212
|
+
attr_accessor :object_id_in
|
213
|
+
attr_accessor :version_equal
|
214
|
+
attr_accessor :version_greater_than_or_equal
|
215
|
+
attr_accessor :version_less_than_or_equal
|
216
|
+
attr_accessor :created_at_greater_than_or_equal
|
217
|
+
attr_accessor :created_at_less_than_or_equal
|
218
|
+
attr_accessor :updated_at_greater_than_or_equal
|
219
|
+
attr_accessor :updated_at_less_than_or_equal
|
220
|
+
attr_accessor :status_equal
|
221
|
+
attr_accessor :status_in
|
222
|
+
|
223
|
+
def partner_id_equal=(val)
|
224
|
+
@partner_id_equal = val.to_i
|
225
|
+
end
|
226
|
+
def metadata_profile_id_equal=(val)
|
227
|
+
@metadata_profile_id_equal = val.to_i
|
228
|
+
end
|
229
|
+
def metadata_profile_version_equal=(val)
|
230
|
+
@metadata_profile_version_equal = val.to_i
|
231
|
+
end
|
232
|
+
def metadata_profile_version_greater_than_or_equal=(val)
|
233
|
+
@metadata_profile_version_greater_than_or_equal = val.to_i
|
234
|
+
end
|
235
|
+
def metadata_profile_version_less_than_or_equal=(val)
|
236
|
+
@metadata_profile_version_less_than_or_equal = val.to_i
|
237
|
+
end
|
238
|
+
def version_equal=(val)
|
239
|
+
@version_equal = val.to_i
|
240
|
+
end
|
241
|
+
def version_greater_than_or_equal=(val)
|
242
|
+
@version_greater_than_or_equal = val.to_i
|
243
|
+
end
|
244
|
+
def version_less_than_or_equal=(val)
|
245
|
+
@version_less_than_or_equal = val.to_i
|
246
|
+
end
|
247
|
+
def created_at_greater_than_or_equal=(val)
|
248
|
+
@created_at_greater_than_or_equal = val.to_i
|
249
|
+
end
|
250
|
+
def created_at_less_than_or_equal=(val)
|
251
|
+
@created_at_less_than_or_equal = val.to_i
|
252
|
+
end
|
253
|
+
def updated_at_greater_than_or_equal=(val)
|
254
|
+
@updated_at_greater_than_or_equal = val.to_i
|
255
|
+
end
|
256
|
+
def updated_at_less_than_or_equal=(val)
|
257
|
+
@updated_at_less_than_or_equal = val.to_i
|
258
|
+
end
|
259
|
+
def status_equal=(val)
|
260
|
+
@status_equal = val.to_i
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
class KalturaMetadataProfileBaseFilter < KalturaFilter
|
265
|
+
attr_accessor :id_equal
|
266
|
+
attr_accessor :partner_id_equal
|
267
|
+
attr_accessor :metadata_object_type_equal
|
268
|
+
attr_accessor :metadata_object_type_in
|
269
|
+
attr_accessor :version_equal
|
270
|
+
attr_accessor :name_equal
|
271
|
+
attr_accessor :system_name_equal
|
272
|
+
attr_accessor :system_name_in
|
273
|
+
attr_accessor :created_at_greater_than_or_equal
|
274
|
+
attr_accessor :created_at_less_than_or_equal
|
275
|
+
attr_accessor :updated_at_greater_than_or_equal
|
276
|
+
attr_accessor :updated_at_less_than_or_equal
|
277
|
+
attr_accessor :status_equal
|
278
|
+
attr_accessor :status_in
|
279
|
+
attr_accessor :create_mode_equal
|
280
|
+
attr_accessor :create_mode_not_equal
|
281
|
+
attr_accessor :create_mode_in
|
282
|
+
attr_accessor :create_mode_not_in
|
283
|
+
|
284
|
+
def id_equal=(val)
|
285
|
+
@id_equal = val.to_i
|
286
|
+
end
|
287
|
+
def partner_id_equal=(val)
|
288
|
+
@partner_id_equal = val.to_i
|
289
|
+
end
|
290
|
+
def version_equal=(val)
|
291
|
+
@version_equal = val.to_i
|
292
|
+
end
|
293
|
+
def created_at_greater_than_or_equal=(val)
|
294
|
+
@created_at_greater_than_or_equal = val.to_i
|
295
|
+
end
|
296
|
+
def created_at_less_than_or_equal=(val)
|
297
|
+
@created_at_less_than_or_equal = val.to_i
|
298
|
+
end
|
299
|
+
def updated_at_greater_than_or_equal=(val)
|
300
|
+
@updated_at_greater_than_or_equal = val.to_i
|
301
|
+
end
|
302
|
+
def updated_at_less_than_or_equal=(val)
|
303
|
+
@updated_at_less_than_or_equal = val.to_i
|
304
|
+
end
|
305
|
+
def status_equal=(val)
|
306
|
+
@status_equal = val.to_i
|
307
|
+
end
|
308
|
+
def create_mode_equal=(val)
|
309
|
+
@create_mode_equal = val.to_i
|
310
|
+
end
|
311
|
+
def create_mode_not_equal=(val)
|
312
|
+
@create_mode_not_equal = val.to_i
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
316
|
+
class KalturaTransformMetadataJobData < KalturaJobData
|
317
|
+
attr_accessor :src_xsl_path
|
318
|
+
attr_accessor :src_version
|
319
|
+
attr_accessor :dest_version
|
320
|
+
attr_accessor :dest_xsd_path
|
321
|
+
attr_accessor :metadata_profile_id
|
322
|
+
|
323
|
+
def src_version=(val)
|
324
|
+
@src_version = val.to_i
|
325
|
+
end
|
326
|
+
def dest_version=(val)
|
327
|
+
@dest_version = val.to_i
|
328
|
+
end
|
329
|
+
def metadata_profile_id=(val)
|
330
|
+
@metadata_profile_id = val.to_i
|
331
|
+
end
|
332
|
+
end
|
333
|
+
|
334
|
+
class KalturaCompareMetadataCondition < KalturaCompareCondition
|
335
|
+
# May contain the full xpath to the field in three formats
|
336
|
+
# 1. Slashed xPath, e.g. /metadata/myElementName
|
337
|
+
# 2. Using local-name function, e.g. /[local-name()='metadata']/[local-name()='myElementName']
|
338
|
+
# 3. Using only the field name, e.g. myElementName, it will be searched as //myElementName
|
339
|
+
#
|
340
|
+
attr_accessor :x_path
|
341
|
+
# Metadata profile id
|
342
|
+
#
|
343
|
+
attr_accessor :profile_id
|
344
|
+
# Metadata profile system name
|
345
|
+
#
|
346
|
+
attr_accessor :profile_system_name
|
347
|
+
|
348
|
+
def profile_id=(val)
|
349
|
+
@profile_id = val.to_i
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
class KalturaFileAssetFilter < KalturaFileAssetBaseFilter
|
354
|
+
|
355
|
+
end
|
356
|
+
|
357
|
+
class KalturaMatchMetadataCondition < KalturaMatchCondition
|
358
|
+
# May contain the full xpath to the field in three formats
|
359
|
+
# 1. Slashed xPath, e.g. /metadata/myElementName
|
360
|
+
# 2. Using local-name function, e.g. /[local-name()='metadata']/[local-name()='myElementName']
|
361
|
+
# 3. Using only the field name, e.g. myElementName, it will be searched as //myElementName
|
362
|
+
#
|
363
|
+
attr_accessor :x_path
|
364
|
+
# Metadata profile id
|
365
|
+
#
|
366
|
+
attr_accessor :profile_id
|
367
|
+
# Metadata profile system name
|
368
|
+
#
|
369
|
+
attr_accessor :profile_system_name
|
370
|
+
|
371
|
+
def profile_id=(val)
|
372
|
+
@profile_id = val.to_i
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
376
|
+
class KalturaMetadataFieldChangedCondition < KalturaMatchCondition
|
377
|
+
# May contain the full xpath to the field in three formats
|
378
|
+
# 1. Slashed xPath, e.g. /metadata/myElementName
|
379
|
+
# 2. Using local-name function, e.g. /[local-name()='metadata']/[local-name()='myElementName']
|
380
|
+
# 3. Using only the field name, e.g. myElementName, it will be searched as //myElementName
|
381
|
+
#
|
382
|
+
attr_accessor :x_path
|
383
|
+
# Metadata profile id
|
384
|
+
#
|
385
|
+
attr_accessor :profile_id
|
386
|
+
# Metadata profile system name
|
387
|
+
#
|
388
|
+
attr_accessor :profile_system_name
|
389
|
+
attr_accessor :version_a
|
390
|
+
attr_accessor :version_b
|
391
|
+
|
392
|
+
def profile_id=(val)
|
393
|
+
@profile_id = val.to_i
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
class KalturaMetadataFilter < KalturaMetadataBaseFilter
|
398
|
+
|
399
|
+
end
|
400
|
+
|
401
|
+
class KalturaMetadataProfileFilter < KalturaMetadataProfileBaseFilter
|
402
|
+
|
403
|
+
end
|
404
|
+
|
405
|
+
class KalturaMetadataSearchItem < KalturaSearchOperator
|
406
|
+
attr_accessor :metadata_profile_id
|
407
|
+
attr_accessor :order_by
|
408
|
+
|
409
|
+
def metadata_profile_id=(val)
|
410
|
+
@metadata_profile_id = val.to_i
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
|
415
|
+
# Metadata service
|
416
|
+
#
|
417
|
+
class KalturaMetadataService < KalturaServiceBase
|
418
|
+
def initialize(client)
|
419
|
+
super(client)
|
420
|
+
end
|
421
|
+
|
422
|
+
# Allows you to add a metadata object and metadata content associated with Kaltura object
|
423
|
+
#
|
424
|
+
def add(metadata_profile_id, object_type, object_id, xml_data)
|
425
|
+
kparams = {}
|
426
|
+
client.add_param(kparams, 'metadataProfileId', metadata_profile_id);
|
427
|
+
client.add_param(kparams, 'objectType', object_type);
|
428
|
+
client.add_param(kparams, 'objectId', object_id);
|
429
|
+
# XML metadata
|
430
|
+
client.add_param(kparams, 'xmlData', xml_data);
|
431
|
+
client.queue_service_action_call('metadata_metadata', 'add', kparams);
|
432
|
+
if (client.is_multirequest)
|
433
|
+
return nil;
|
434
|
+
end
|
435
|
+
return client.do_queue();
|
436
|
+
end
|
437
|
+
|
438
|
+
# Allows you to add a metadata object and metadata file associated with Kaltura object
|
439
|
+
#
|
440
|
+
def add_from_file(metadata_profile_id, object_type, object_id, xml_file)
|
441
|
+
kparams = {}
|
442
|
+
client.add_param(kparams, 'metadataProfileId', metadata_profile_id);
|
443
|
+
client.add_param(kparams, 'objectType', object_type);
|
444
|
+
client.add_param(kparams, 'objectId', object_id);
|
445
|
+
# XML metadata
|
446
|
+
client.add_param(kparams, 'xmlFile', xml_file);
|
447
|
+
client.queue_service_action_call('metadata_metadata', 'addFromFile', kparams);
|
448
|
+
if (client.is_multirequest)
|
449
|
+
return nil;
|
450
|
+
end
|
451
|
+
return client.do_queue();
|
452
|
+
end
|
453
|
+
|
454
|
+
# Allows you to add a metadata xml data from remote URL
|
455
|
+
#
|
456
|
+
def add_from_url(metadata_profile_id, object_type, object_id, url)
|
457
|
+
kparams = {}
|
458
|
+
client.add_param(kparams, 'metadataProfileId', metadata_profile_id);
|
459
|
+
client.add_param(kparams, 'objectType', object_type);
|
460
|
+
client.add_param(kparams, 'objectId', object_id);
|
461
|
+
# XML metadata remote url
|
462
|
+
client.add_param(kparams, 'url', url);
|
463
|
+
client.queue_service_action_call('metadata_metadata', 'addFromUrl', kparams);
|
464
|
+
if (client.is_multirequest)
|
465
|
+
return nil;
|
466
|
+
end
|
467
|
+
return client.do_queue();
|
468
|
+
end
|
469
|
+
|
470
|
+
# Allows you to add a metadata xml data from remote URL.
|
471
|
+
# Enables different permissions than addFromUrl action.
|
472
|
+
#
|
473
|
+
def add_from_bulk(metadata_profile_id, object_type, object_id, url)
|
474
|
+
kparams = {}
|
475
|
+
client.add_param(kparams, 'metadataProfileId', metadata_profile_id);
|
476
|
+
client.add_param(kparams, 'objectType', object_type);
|
477
|
+
client.add_param(kparams, 'objectId', object_id);
|
478
|
+
# XML metadata remote url
|
479
|
+
client.add_param(kparams, 'url', url);
|
480
|
+
client.queue_service_action_call('metadata_metadata', 'addFromBulk', kparams);
|
481
|
+
if (client.is_multirequest)
|
482
|
+
return nil;
|
483
|
+
end
|
484
|
+
return client.do_queue();
|
485
|
+
end
|
486
|
+
|
487
|
+
# Retrieve a metadata object by id
|
488
|
+
#
|
489
|
+
def get(id)
|
490
|
+
kparams = {}
|
491
|
+
client.add_param(kparams, 'id', id);
|
492
|
+
client.queue_service_action_call('metadata_metadata', 'get', kparams);
|
493
|
+
if (client.is_multirequest)
|
494
|
+
return nil;
|
495
|
+
end
|
496
|
+
return client.do_queue();
|
497
|
+
end
|
498
|
+
|
499
|
+
# Update an existing metadata object with new XML content
|
500
|
+
#
|
501
|
+
def update(id, xml_data=KalturaNotImplemented, version=KalturaNotImplemented)
|
502
|
+
kparams = {}
|
503
|
+
client.add_param(kparams, 'id', id);
|
504
|
+
# XML metadata
|
505
|
+
client.add_param(kparams, 'xmlData', xml_data);
|
506
|
+
# Enable update only if the metadata object version did not change by other process
|
507
|
+
client.add_param(kparams, 'version', version);
|
508
|
+
client.queue_service_action_call('metadata_metadata', 'update', kparams);
|
509
|
+
if (client.is_multirequest)
|
510
|
+
return nil;
|
511
|
+
end
|
512
|
+
return client.do_queue();
|
513
|
+
end
|
514
|
+
|
515
|
+
# Update an existing metadata object with new XML file
|
516
|
+
#
|
517
|
+
def update_from_file(id, xml_file=KalturaNotImplemented)
|
518
|
+
kparams = {}
|
519
|
+
client.add_param(kparams, 'id', id);
|
520
|
+
# XML metadata
|
521
|
+
client.add_param(kparams, 'xmlFile', xml_file);
|
522
|
+
client.queue_service_action_call('metadata_metadata', 'updateFromFile', kparams);
|
523
|
+
if (client.is_multirequest)
|
524
|
+
return nil;
|
525
|
+
end
|
526
|
+
return client.do_queue();
|
527
|
+
end
|
528
|
+
|
529
|
+
# List metadata objects by filter and pager
|
530
|
+
#
|
531
|
+
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
532
|
+
kparams = {}
|
533
|
+
client.add_param(kparams, 'filter', filter);
|
534
|
+
client.add_param(kparams, 'pager', pager);
|
535
|
+
client.queue_service_action_call('metadata_metadata', 'list', kparams);
|
536
|
+
if (client.is_multirequest)
|
537
|
+
return nil;
|
538
|
+
end
|
539
|
+
return client.do_queue();
|
540
|
+
end
|
541
|
+
|
542
|
+
# Delete an existing metadata
|
543
|
+
#
|
544
|
+
def delete(id)
|
545
|
+
kparams = {}
|
546
|
+
client.add_param(kparams, 'id', id);
|
547
|
+
client.queue_service_action_call('metadata_metadata', 'delete', kparams);
|
548
|
+
if (client.is_multirequest)
|
549
|
+
return nil;
|
550
|
+
end
|
551
|
+
return client.do_queue();
|
552
|
+
end
|
553
|
+
|
554
|
+
# Mark existing metadata as invalid
|
555
|
+
# Used by batch metadata transform
|
556
|
+
#
|
557
|
+
def invalidate(id, version=KalturaNotImplemented)
|
558
|
+
kparams = {}
|
559
|
+
client.add_param(kparams, 'id', id);
|
560
|
+
# Enable update only if the metadata object version did not change by other process
|
561
|
+
client.add_param(kparams, 'version', version);
|
562
|
+
client.queue_service_action_call('metadata_metadata', 'invalidate', kparams);
|
563
|
+
if (client.is_multirequest)
|
564
|
+
return nil;
|
565
|
+
end
|
566
|
+
return client.do_queue();
|
567
|
+
end
|
568
|
+
|
569
|
+
# Serves metadata XML file
|
570
|
+
#
|
571
|
+
def serve(id)
|
572
|
+
kparams = {}
|
573
|
+
client.add_param(kparams, 'id', id);
|
574
|
+
client.queue_service_action_call('metadata_metadata', 'serve', kparams);
|
575
|
+
return client.get_serve_url();
|
576
|
+
end
|
577
|
+
|
578
|
+
# Action transforms current metadata object XML using a provided XSL.
|
579
|
+
#
|
580
|
+
def update_from_xsl(id, xsl_file)
|
581
|
+
kparams = {}
|
582
|
+
client.add_param(kparams, 'id', id);
|
583
|
+
client.add_param(kparams, 'xslFile', xsl_file);
|
584
|
+
client.queue_service_action_call('metadata_metadata', 'updateFromXSL', kparams);
|
585
|
+
if (client.is_multirequest)
|
586
|
+
return nil;
|
587
|
+
end
|
588
|
+
return client.do_queue();
|
589
|
+
end
|
590
|
+
end
|
591
|
+
|
592
|
+
# Metadata Profile service
|
593
|
+
#
|
594
|
+
class KalturaMetadataProfileService < KalturaServiceBase
|
595
|
+
def initialize(client)
|
596
|
+
super(client)
|
597
|
+
end
|
598
|
+
|
599
|
+
# Allows you to add a metadata profile object and metadata profile content associated with Kaltura object type
|
600
|
+
#
|
601
|
+
def add(metadata_profile, xsd_data, views_data=KalturaNotImplemented)
|
602
|
+
kparams = {}
|
603
|
+
client.add_param(kparams, 'metadataProfile', metadata_profile);
|
604
|
+
# XSD metadata definition
|
605
|
+
client.add_param(kparams, 'xsdData', xsd_data);
|
606
|
+
# UI views definition
|
607
|
+
client.add_param(kparams, 'viewsData', views_data);
|
608
|
+
client.queue_service_action_call('metadata_metadataprofile', 'add', kparams);
|
609
|
+
if (client.is_multirequest)
|
610
|
+
return nil;
|
611
|
+
end
|
612
|
+
return client.do_queue();
|
613
|
+
end
|
614
|
+
|
615
|
+
# Allows you to add a metadata profile object and metadata profile file associated with Kaltura object type
|
616
|
+
#
|
617
|
+
def add_from_file(metadata_profile, xsd_file, views_file=KalturaNotImplemented)
|
618
|
+
kparams = {}
|
619
|
+
client.add_param(kparams, 'metadataProfile', metadata_profile);
|
620
|
+
# XSD metadata definition
|
621
|
+
client.add_param(kparams, 'xsdFile', xsd_file);
|
622
|
+
# UI views definition
|
623
|
+
client.add_param(kparams, 'viewsFile', views_file);
|
624
|
+
client.queue_service_action_call('metadata_metadataprofile', 'addFromFile', kparams);
|
625
|
+
if (client.is_multirequest)
|
626
|
+
return nil;
|
627
|
+
end
|
628
|
+
return client.do_queue();
|
629
|
+
end
|
630
|
+
|
631
|
+
# Retrieve a metadata profile object by id
|
632
|
+
#
|
633
|
+
def get(id)
|
634
|
+
kparams = {}
|
635
|
+
client.add_param(kparams, 'id', id);
|
636
|
+
client.queue_service_action_call('metadata_metadataprofile', 'get', kparams);
|
637
|
+
if (client.is_multirequest)
|
638
|
+
return nil;
|
639
|
+
end
|
640
|
+
return client.do_queue();
|
641
|
+
end
|
642
|
+
|
643
|
+
# Update an existing metadata object
|
644
|
+
#
|
645
|
+
def update(id, metadata_profile, xsd_data=KalturaNotImplemented, views_data=KalturaNotImplemented)
|
646
|
+
kparams = {}
|
647
|
+
client.add_param(kparams, 'id', id);
|
648
|
+
client.add_param(kparams, 'metadataProfile', metadata_profile);
|
649
|
+
# XSD metadata definition
|
650
|
+
client.add_param(kparams, 'xsdData', xsd_data);
|
651
|
+
# UI views definition
|
652
|
+
client.add_param(kparams, 'viewsData', views_data);
|
653
|
+
client.queue_service_action_call('metadata_metadataprofile', 'update', kparams);
|
654
|
+
if (client.is_multirequest)
|
655
|
+
return nil;
|
656
|
+
end
|
657
|
+
return client.do_queue();
|
658
|
+
end
|
659
|
+
|
660
|
+
# List metadata profile objects by filter and pager
|
661
|
+
#
|
662
|
+
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
663
|
+
kparams = {}
|
664
|
+
client.add_param(kparams, 'filter', filter);
|
665
|
+
client.add_param(kparams, 'pager', pager);
|
666
|
+
client.queue_service_action_call('metadata_metadataprofile', 'list', kparams);
|
667
|
+
if (client.is_multirequest)
|
668
|
+
return nil;
|
669
|
+
end
|
670
|
+
return client.do_queue();
|
671
|
+
end
|
672
|
+
|
673
|
+
# List metadata profile fields by metadata profile id
|
674
|
+
#
|
675
|
+
def list_fields(metadata_profile_id)
|
676
|
+
kparams = {}
|
677
|
+
client.add_param(kparams, 'metadataProfileId', metadata_profile_id);
|
678
|
+
client.queue_service_action_call('metadata_metadataprofile', 'listFields', kparams);
|
679
|
+
if (client.is_multirequest)
|
680
|
+
return nil;
|
681
|
+
end
|
682
|
+
return client.do_queue();
|
683
|
+
end
|
684
|
+
|
685
|
+
# Delete an existing metadata profile
|
686
|
+
#
|
687
|
+
def delete(id)
|
688
|
+
kparams = {}
|
689
|
+
client.add_param(kparams, 'id', id);
|
690
|
+
client.queue_service_action_call('metadata_metadataprofile', 'delete', kparams);
|
691
|
+
if (client.is_multirequest)
|
692
|
+
return nil;
|
693
|
+
end
|
694
|
+
return client.do_queue();
|
695
|
+
end
|
696
|
+
|
697
|
+
# Update an existing metadata object definition file
|
698
|
+
#
|
699
|
+
def revert(id, to_version)
|
700
|
+
kparams = {}
|
701
|
+
client.add_param(kparams, 'id', id);
|
702
|
+
client.add_param(kparams, 'toVersion', to_version);
|
703
|
+
client.queue_service_action_call('metadata_metadataprofile', 'revert', kparams);
|
704
|
+
if (client.is_multirequest)
|
705
|
+
return nil;
|
706
|
+
end
|
707
|
+
return client.do_queue();
|
708
|
+
end
|
709
|
+
|
710
|
+
# Update an existing metadata object definition file
|
711
|
+
#
|
712
|
+
def update_definition_from_file(id, xsd_file)
|
713
|
+
kparams = {}
|
714
|
+
client.add_param(kparams, 'id', id);
|
715
|
+
# XSD metadata definition
|
716
|
+
client.add_param(kparams, 'xsdFile', xsd_file);
|
717
|
+
client.queue_service_action_call('metadata_metadataprofile', 'updateDefinitionFromFile', kparams);
|
718
|
+
if (client.is_multirequest)
|
719
|
+
return nil;
|
720
|
+
end
|
721
|
+
return client.do_queue();
|
722
|
+
end
|
723
|
+
|
724
|
+
# Update an existing metadata object views file
|
725
|
+
#
|
726
|
+
def update_views_from_file(id, views_file)
|
727
|
+
kparams = {}
|
728
|
+
client.add_param(kparams, 'id', id);
|
729
|
+
# UI views file
|
730
|
+
client.add_param(kparams, 'viewsFile', views_file);
|
731
|
+
client.queue_service_action_call('metadata_metadataprofile', 'updateViewsFromFile', kparams);
|
732
|
+
if (client.is_multirequest)
|
733
|
+
return nil;
|
734
|
+
end
|
735
|
+
return client.do_queue();
|
736
|
+
end
|
737
|
+
|
738
|
+
# Update an existing metadata object xslt file
|
739
|
+
#
|
740
|
+
def update_transformation_from_file(id, xslt_file)
|
741
|
+
kparams = {}
|
742
|
+
client.add_param(kparams, 'id', id);
|
743
|
+
# XSLT file, will be executed on every metadata add/update
|
744
|
+
client.add_param(kparams, 'xsltFile', xslt_file);
|
745
|
+
client.queue_service_action_call('metadata_metadataprofile', 'updateTransformationFromFile', kparams);
|
746
|
+
if (client.is_multirequest)
|
747
|
+
return nil;
|
748
|
+
end
|
749
|
+
return client.do_queue();
|
750
|
+
end
|
751
|
+
|
752
|
+
# Serves metadata profile XSD file
|
753
|
+
#
|
754
|
+
def serve(id)
|
755
|
+
kparams = {}
|
756
|
+
client.add_param(kparams, 'id', id);
|
757
|
+
client.queue_service_action_call('metadata_metadataprofile', 'serve', kparams);
|
758
|
+
return client.get_serve_url();
|
759
|
+
end
|
760
|
+
|
761
|
+
# Serves metadata profile view file
|
762
|
+
#
|
763
|
+
def serve_view(id)
|
764
|
+
kparams = {}
|
765
|
+
client.add_param(kparams, 'id', id);
|
766
|
+
client.queue_service_action_call('metadata_metadataprofile', 'serveView', kparams);
|
767
|
+
return client.get_serve_url();
|
768
|
+
end
|
769
|
+
end
|
770
|
+
|
771
|
+
class KalturaClient < KalturaClientBase
|
772
|
+
attr_reader :metadata_service
|
773
|
+
def metadata_service
|
774
|
+
if (@metadata_service == nil)
|
775
|
+
@metadata_service = KalturaMetadataService.new(self)
|
776
|
+
end
|
777
|
+
return @metadata_service
|
778
|
+
end
|
779
|
+
attr_reader :metadata_profile_service
|
780
|
+
def metadata_profile_service
|
781
|
+
if (@metadata_profile_service == nil)
|
782
|
+
@metadata_profile_service = KalturaMetadataProfileService.new(self)
|
783
|
+
end
|
784
|
+
return @metadata_profile_service
|
785
|
+
end
|
786
|
+
end
|
787
|
+
|
788
|
+
end
|