kaltura_box 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +60 -0
- data/Rakefile +2 -0
- data/kaltura_box.gemspec +28 -0
- data/lib/generators/kaltura_box/install_generator.rb +16 -0
- data/lib/generators/templates/kaltura_box.rb +18 -0
- data/lib/generators/templates/kaltura_upload.js +67 -0
- data/lib/kaltura_box.rb +10 -0
- data/lib/kaltura_box/api.rb +13 -0
- data/lib/kaltura_box/category.rb +18 -0
- data/lib/kaltura_box/category/class_methods.rb +50 -0
- data/lib/kaltura_box/category/instance_methods.rb +30 -0
- data/lib/kaltura_box/client.rb +45 -0
- data/lib/kaltura_box/configuration.rb +22 -0
- data/lib/kaltura_box/entry.rb +36 -0
- data/lib/kaltura_box/entry/class_methods.rb +51 -0
- data/lib/kaltura_box/entry/instance_methods.rb +13 -0
- data/lib/kaltura_box/entry/metadata.rb +152 -0
- data/lib/kaltura_box/entry/metadata/class_and_instance_methods.rb +54 -0
- data/lib/kaltura_box/entry/metadata/class_methods.rb +69 -0
- data/lib/kaltura_box/version.rb +3 -0
- data/spec/api_spec.rb +22 -0
- data/spec/category_spec.rb +51 -0
- data/spec/entry_spec.rb +38 -0
- data/spec/metadata_spec.rb +256 -0
- data/spec/spec_helper.rb +68 -0
- data/spec/support/video.flv +0 -0
- data/vendor/kaltura-ruby-client/README +20 -0
- data/vendor/kaltura-ruby-client/Rakefile +19 -0
- data/vendor/kaltura-ruby-client/kaltura.gemspec +15 -0
- data/vendor/kaltura-ruby-client/kaltura.yml +7 -0
- data/vendor/kaltura-ruby-client/lib/kaltura.rb +31 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_client.rb +14450 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_client_base.rb +432 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_abc_screeners_watermark_access_control_client_plugin.rb +37 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +108 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +237 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +61 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +227 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +349 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +109 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +55 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +46 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +40 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +406 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +138 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +97 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +1717 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +290 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_document_client_plugin.rb +522 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +204 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +810 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +39 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +276 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +405 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +203 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +151 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +309 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +72 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_like_client_plugin.rb +82 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +788 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_multi_centers_client_plugin.rb +45 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +231 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +145 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +238 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +40 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +263 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +121 -0
- data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +195 -0
- data/vendor/kaltura-ruby-client/license.txt +674 -0
- data/vendor/kaltura-ruby-client/test/access_control_service_test.rb +75 -0
- data/vendor/kaltura-ruby-client/test/base_entry_service_test.rb +267 -0
- data/vendor/kaltura-ruby-client/test/configuration_test.rb +178 -0
- data/vendor/kaltura-ruby-client/test/cue_point_service_test.rb +67 -0
- data/vendor/kaltura-ruby-client/test/data_service_test.rb +76 -0
- data/vendor/kaltura-ruby-client/test/document_service_test.rb +41 -0
- data/vendor/kaltura-ruby-client/test/media/test.mov +0 -0
- data/vendor/kaltura-ruby-client/test/media/test.pdf +0 -0
- data/vendor/kaltura-ruby-client/test/media/test.png +0 -0
- data/vendor/kaltura-ruby-client/test/media/test.swf +0 -0
- data/vendor/kaltura-ruby-client/test/media/test.wmv +0 -0
- data/vendor/kaltura-ruby-client/test/media_service_test.rb +294 -0
- data/vendor/kaltura-ruby-client/test/metadata_profile_service_test.rb +63 -0
- data/vendor/kaltura-ruby-client/test/test_helper.rb +59 -0
- metadata +220 -0
@@ -0,0 +1,39 @@
|
|
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_bulk_upload_xml_client_plugin.rb'
|
30
|
+
require File.dirname(__FILE__) + '/kaltura_drop_folder_client_plugin.rb'
|
31
|
+
|
32
|
+
module Kaltura
|
33
|
+
|
34
|
+
class KalturaDropFolderXmlBulkUploadFileHandlerConfig < KalturaDropFolderFileHandlerConfig
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb
ADDED
@@ -0,0 +1,276 @@
|
|
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_event_notification_client_plugin.rb'
|
30
|
+
|
31
|
+
module Kaltura
|
32
|
+
|
33
|
+
class KalturaEmailNotificationTemplatePriority
|
34
|
+
HIGH = 1
|
35
|
+
NORMAL = 3
|
36
|
+
LOW = 5
|
37
|
+
end
|
38
|
+
|
39
|
+
class KalturaEmailNotificationFormat
|
40
|
+
HTML = "1"
|
41
|
+
TEXT = "2"
|
42
|
+
end
|
43
|
+
|
44
|
+
class KalturaEmailNotificationRecipientProviderType
|
45
|
+
STATIC_LIST = "1"
|
46
|
+
CATEGORY = "2"
|
47
|
+
USER = "3"
|
48
|
+
end
|
49
|
+
|
50
|
+
class KalturaEmailNotificationTemplateOrderBy
|
51
|
+
CREATED_AT_ASC = "+createdAt"
|
52
|
+
ID_ASC = "+id"
|
53
|
+
UPDATED_AT_ASC = "+updatedAt"
|
54
|
+
CREATED_AT_DESC = "-createdAt"
|
55
|
+
ID_DESC = "-id"
|
56
|
+
UPDATED_AT_DESC = "-updatedAt"
|
57
|
+
end
|
58
|
+
|
59
|
+
class KalturaEmailNotificationRecipient < KalturaObjectBase
|
60
|
+
# Recipient e-mail address
|
61
|
+
#
|
62
|
+
attr_accessor :email
|
63
|
+
# Recipient name
|
64
|
+
#
|
65
|
+
attr_accessor :name
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
# Abstract class representing the final output recipients going into the batch mechanism
|
70
|
+
#
|
71
|
+
class KalturaEmailNotificationRecipientJobData < KalturaObjectBase
|
72
|
+
# Provider type of the job data.
|
73
|
+
#
|
74
|
+
attr_accessor :provider_type
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
# Abstract core class which provides the recipients (to, CC, BCC) for an email notification
|
79
|
+
#
|
80
|
+
class KalturaEmailNotificationRecipientProvider < KalturaObjectBase
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
class KalturaCategoryUserProviderFilter < KalturaFilter
|
85
|
+
attr_accessor :user_id_equal
|
86
|
+
attr_accessor :user_id_in
|
87
|
+
attr_accessor :status_equal
|
88
|
+
attr_accessor :status_in
|
89
|
+
attr_accessor :created_at_greater_than_or_equal
|
90
|
+
attr_accessor :created_at_less_than_or_equal
|
91
|
+
attr_accessor :updated_at_greater_than_or_equal
|
92
|
+
attr_accessor :updated_at_less_than_or_equal
|
93
|
+
attr_accessor :update_method_equal
|
94
|
+
attr_accessor :update_method_in
|
95
|
+
attr_accessor :permission_names_match_and
|
96
|
+
attr_accessor :permission_names_match_or
|
97
|
+
|
98
|
+
def status_equal=(val)
|
99
|
+
@status_equal = val.to_i
|
100
|
+
end
|
101
|
+
def created_at_greater_than_or_equal=(val)
|
102
|
+
@created_at_greater_than_or_equal = val.to_i
|
103
|
+
end
|
104
|
+
def created_at_less_than_or_equal=(val)
|
105
|
+
@created_at_less_than_or_equal = val.to_i
|
106
|
+
end
|
107
|
+
def updated_at_greater_than_or_equal=(val)
|
108
|
+
@updated_at_greater_than_or_equal = val.to_i
|
109
|
+
end
|
110
|
+
def updated_at_less_than_or_equal=(val)
|
111
|
+
@updated_at_less_than_or_equal = val.to_i
|
112
|
+
end
|
113
|
+
def update_method_equal=(val)
|
114
|
+
@update_method_equal = val.to_i
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Job Data representing the provider of recipients for a single categoryId
|
119
|
+
#
|
120
|
+
class KalturaEmailNotificationCategoryRecipientJobData < KalturaEmailNotificationRecipientJobData
|
121
|
+
attr_accessor :category_user_filter
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
# API object which provides the recipients of category related notifications.
|
126
|
+
#
|
127
|
+
class KalturaEmailNotificationCategoryRecipientProvider < KalturaEmailNotificationRecipientProvider
|
128
|
+
# The ID of the category whose subscribers should receive the email notification.
|
129
|
+
#
|
130
|
+
attr_accessor :category_id
|
131
|
+
attr_accessor :category_user_filter
|
132
|
+
|
133
|
+
end
|
134
|
+
|
135
|
+
class KalturaEmailNotificationParameter < KalturaEventNotificationParameter
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
# JobData representing the static receipient array
|
140
|
+
#
|
141
|
+
class KalturaEmailNotificationStaticRecipientJobData < KalturaEmailNotificationRecipientJobData
|
142
|
+
# Email to emails and names
|
143
|
+
#
|
144
|
+
attr_accessor :email_recipients
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
# API class for recipient provider containing a static list of email recipients.
|
149
|
+
#
|
150
|
+
class KalturaEmailNotificationStaticRecipientProvider < KalturaEmailNotificationRecipientProvider
|
151
|
+
# Email to emails and names
|
152
|
+
#
|
153
|
+
attr_accessor :email_recipients
|
154
|
+
|
155
|
+
end
|
156
|
+
|
157
|
+
class KalturaEmailNotificationTemplate < KalturaEventNotificationTemplate
|
158
|
+
# Define the email body format
|
159
|
+
#
|
160
|
+
attr_accessor :format
|
161
|
+
# Define the email subject
|
162
|
+
#
|
163
|
+
attr_accessor :subject
|
164
|
+
# Define the email body content
|
165
|
+
#
|
166
|
+
attr_accessor :body
|
167
|
+
# Define the email sender email
|
168
|
+
#
|
169
|
+
attr_accessor :from_email
|
170
|
+
# Define the email sender name
|
171
|
+
#
|
172
|
+
attr_accessor :from_name
|
173
|
+
# Email recipient emails and names
|
174
|
+
#
|
175
|
+
attr_accessor :to
|
176
|
+
# Email recipient emails and names
|
177
|
+
#
|
178
|
+
attr_accessor :cc
|
179
|
+
# Email recipient emails and names
|
180
|
+
#
|
181
|
+
attr_accessor :bcc
|
182
|
+
# Default email addresses to whom the reply should be sent.
|
183
|
+
#
|
184
|
+
attr_accessor :reply_to
|
185
|
+
# Define the email priority
|
186
|
+
#
|
187
|
+
attr_accessor :priority
|
188
|
+
# Email address that a reading confirmation will be sent
|
189
|
+
#
|
190
|
+
attr_accessor :confirm_reading_to
|
191
|
+
# Hostname to use in Message-Id and Received headers and as default HELLO string.
|
192
|
+
# If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
|
193
|
+
#
|
194
|
+
attr_accessor :hostname
|
195
|
+
# Sets the message ID to be used in the Message-Id header.
|
196
|
+
# If empty, a unique id will be generated.
|
197
|
+
#
|
198
|
+
attr_accessor :message_id
|
199
|
+
# Adds a e-mail custom header
|
200
|
+
#
|
201
|
+
attr_accessor :custom_headers
|
202
|
+
|
203
|
+
def priority=(val)
|
204
|
+
@priority = val.to_i
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# JobData representing the dynamic user receipient array
|
209
|
+
#
|
210
|
+
class KalturaEmailNotificationUserRecipientJobData < KalturaEmailNotificationRecipientJobData
|
211
|
+
attr_accessor :filter
|
212
|
+
|
213
|
+
end
|
214
|
+
|
215
|
+
# API class for recipient provider which constructs a dynamic list of recipients according to a user filter
|
216
|
+
#
|
217
|
+
class KalturaEmailNotificationUserRecipientProvider < KalturaEmailNotificationRecipientProvider
|
218
|
+
attr_accessor :filter
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
class KalturaEmailNotificationDispatchJobData < KalturaEventNotificationDispatchJobData
|
223
|
+
# Define the email sender email
|
224
|
+
#
|
225
|
+
attr_accessor :from_email
|
226
|
+
# Define the email sender name
|
227
|
+
#
|
228
|
+
attr_accessor :from_name
|
229
|
+
# Email recipient emails and names, key is mail address and value is the name
|
230
|
+
#
|
231
|
+
attr_accessor :to
|
232
|
+
# Email cc emails and names, key is mail address and value is the name
|
233
|
+
#
|
234
|
+
attr_accessor :cc
|
235
|
+
# Email bcc emails and names, key is mail address and value is the name
|
236
|
+
#
|
237
|
+
attr_accessor :bcc
|
238
|
+
# Email addresses that a replies should be sent to, key is mail address and value is the name
|
239
|
+
#
|
240
|
+
attr_accessor :reply_to
|
241
|
+
# Define the email priority
|
242
|
+
#
|
243
|
+
attr_accessor :priority
|
244
|
+
# Email address that a reading confirmation will be sent to
|
245
|
+
#
|
246
|
+
attr_accessor :confirm_reading_to
|
247
|
+
# Hostname to use in Message-Id and Received headers and as default HELO string.
|
248
|
+
# If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
|
249
|
+
#
|
250
|
+
attr_accessor :hostname
|
251
|
+
# Sets the message ID to be used in the Message-Id header.
|
252
|
+
# If empty, a unique id will be generated.
|
253
|
+
#
|
254
|
+
attr_accessor :message_id
|
255
|
+
# Adds a e-mail custom header
|
256
|
+
#
|
257
|
+
attr_accessor :custom_headers
|
258
|
+
# Define the content dynamic parameters
|
259
|
+
#
|
260
|
+
attr_accessor :content_parameters
|
261
|
+
|
262
|
+
def priority=(val)
|
263
|
+
@priority = val.to_i
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
class KalturaEmailNotificationTemplateBaseFilter < KalturaEventNotificationTemplateFilter
|
268
|
+
|
269
|
+
end
|
270
|
+
|
271
|
+
class KalturaEmailNotificationTemplateFilter < KalturaEmailNotificationTemplateBaseFilter
|
272
|
+
|
273
|
+
end
|
274
|
+
|
275
|
+
|
276
|
+
end
|
data/vendor/kaltura-ruby-client/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb
ADDED
@@ -0,0 +1,405 @@
|
|
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 KalturaEventNotificationTemplateStatus
|
33
|
+
DISABLED = 1
|
34
|
+
ACTIVE = 2
|
35
|
+
DELETED = 3
|
36
|
+
end
|
37
|
+
|
38
|
+
class KalturaEventNotificationEventObjectType
|
39
|
+
AD_CUE_POINT = "adCuePointEventNotifications.AdCuePoint"
|
40
|
+
ANNOTATION = "annotationEventNotifications.Annotation"
|
41
|
+
CAPTION_ASSET = "captionAssetEventNotifications.CaptionAsset"
|
42
|
+
CODE_CUE_POINT = "codeCuePointEventNotifications.CodeCuePoint"
|
43
|
+
DISTRIBUTION_PROFILE = "contentDistributionEventNotifications.DistributionProfile"
|
44
|
+
ENTRY_DISTRIBUTION = "contentDistributionEventNotifications.EntryDistribution"
|
45
|
+
CUE_POINT = "cuePointEventNotifications.CuePoint"
|
46
|
+
METADATA = "metadataEventNotifications.Metadata"
|
47
|
+
ENTRY = "1"
|
48
|
+
CATEGORY = "2"
|
49
|
+
ASSET = "3"
|
50
|
+
FLAVORASSET = "4"
|
51
|
+
THUMBASSET = "5"
|
52
|
+
KUSER = "8"
|
53
|
+
ACCESSCONTROL = "9"
|
54
|
+
BATCHJOB = "10"
|
55
|
+
BULKUPLOADRESULT = "11"
|
56
|
+
CATEGORYKUSER = "12"
|
57
|
+
CONVERSIONPROFILE2 = "14"
|
58
|
+
FLAVORPARAMS = "15"
|
59
|
+
FLAVORPARAMSCONVERSIONPROFILE = "16"
|
60
|
+
FLAVORPARAMSOUTPUT = "17"
|
61
|
+
GENERICSYNDICATIONFEED = "18"
|
62
|
+
KUSERTOUSERROLE = "19"
|
63
|
+
PARTNER = "20"
|
64
|
+
PERMISSION = "21"
|
65
|
+
PERMISSIONITEM = "22"
|
66
|
+
PERMISSIONTOPERMISSIONITEM = "23"
|
67
|
+
SCHEDULER = "24"
|
68
|
+
SCHEDULERCONFIG = "25"
|
69
|
+
SCHEDULERSTATUS = "26"
|
70
|
+
SCHEDULERWORKER = "27"
|
71
|
+
STORAGEPROFILE = "28"
|
72
|
+
SYNDICATIONFEED = "29"
|
73
|
+
THUMBPARAMS = "31"
|
74
|
+
THUMBPARAMSOUTPUT = "32"
|
75
|
+
UPLOADTOKEN = "33"
|
76
|
+
USERLOGINDATA = "34"
|
77
|
+
USERROLE = "35"
|
78
|
+
WIDGET = "36"
|
79
|
+
CATEGORYENTRY = "37"
|
80
|
+
end
|
81
|
+
|
82
|
+
class KalturaEventNotificationEventType
|
83
|
+
BATCH_JOB_STATUS = "1"
|
84
|
+
OBJECT_ADDED = "2"
|
85
|
+
OBJECT_CHANGED = "3"
|
86
|
+
OBJECT_COPIED = "4"
|
87
|
+
OBJECT_CREATED = "5"
|
88
|
+
OBJECT_DATA_CHANGED = "6"
|
89
|
+
OBJECT_DELETED = "7"
|
90
|
+
OBJECT_ERASED = "8"
|
91
|
+
OBJECT_READY_FOR_REPLACMENT = "9"
|
92
|
+
OBJECT_SAVED = "10"
|
93
|
+
OBJECT_UPDATED = "11"
|
94
|
+
OBJECT_REPLACED = "12"
|
95
|
+
end
|
96
|
+
|
97
|
+
class KalturaEventNotificationTemplateOrderBy
|
98
|
+
CREATED_AT_ASC = "+createdAt"
|
99
|
+
ID_ASC = "+id"
|
100
|
+
UPDATED_AT_ASC = "+updatedAt"
|
101
|
+
CREATED_AT_DESC = "-createdAt"
|
102
|
+
ID_DESC = "-id"
|
103
|
+
UPDATED_AT_DESC = "-updatedAt"
|
104
|
+
end
|
105
|
+
|
106
|
+
class KalturaEventNotificationTemplateType
|
107
|
+
EMAIL = "emailNotification.Email"
|
108
|
+
HTTP = "httpNotification.Http"
|
109
|
+
end
|
110
|
+
|
111
|
+
class KalturaEventNotificationParameter < KalturaObjectBase
|
112
|
+
# The key in the subject and body to be replaced with the dynamic value
|
113
|
+
#
|
114
|
+
attr_accessor :key
|
115
|
+
attr_accessor :description
|
116
|
+
# The dynamic value to be placed in the final output
|
117
|
+
#
|
118
|
+
attr_accessor :value
|
119
|
+
|
120
|
+
end
|
121
|
+
|
122
|
+
class KalturaEventNotificationTemplate < KalturaObjectBase
|
123
|
+
attr_accessor :id
|
124
|
+
attr_accessor :partner_id
|
125
|
+
attr_accessor :name
|
126
|
+
attr_accessor :system_name
|
127
|
+
attr_accessor :description
|
128
|
+
attr_accessor :type
|
129
|
+
attr_accessor :status
|
130
|
+
attr_accessor :created_at
|
131
|
+
attr_accessor :updated_at
|
132
|
+
# Define that the template could be dispatched manually from the API
|
133
|
+
#
|
134
|
+
attr_accessor :manual_dispatch_enabled
|
135
|
+
# Define that the template could be dispatched automatically by the system
|
136
|
+
#
|
137
|
+
attr_accessor :automatic_dispatch_enabled
|
138
|
+
# Define the event that should trigger this notification
|
139
|
+
#
|
140
|
+
attr_accessor :event_type
|
141
|
+
# Define the object that raied the event that should trigger this notification
|
142
|
+
#
|
143
|
+
attr_accessor :event_object_type
|
144
|
+
# Define the conditions that cause this notification to be triggered
|
145
|
+
#
|
146
|
+
attr_accessor :event_conditions
|
147
|
+
# Define the content dynamic parameters
|
148
|
+
#
|
149
|
+
attr_accessor :content_parameters
|
150
|
+
# Define the content dynamic parameters
|
151
|
+
#
|
152
|
+
attr_accessor :user_parameters
|
153
|
+
|
154
|
+
def id=(val)
|
155
|
+
@id = val.to_i
|
156
|
+
end
|
157
|
+
def partner_id=(val)
|
158
|
+
@partner_id = val.to_i
|
159
|
+
end
|
160
|
+
def status=(val)
|
161
|
+
@status = val.to_i
|
162
|
+
end
|
163
|
+
def created_at=(val)
|
164
|
+
@created_at = val.to_i
|
165
|
+
end
|
166
|
+
def updated_at=(val)
|
167
|
+
@updated_at = val.to_i
|
168
|
+
end
|
169
|
+
def manual_dispatch_enabled=(val)
|
170
|
+
@manual_dispatch_enabled = to_b(val)
|
171
|
+
end
|
172
|
+
def automatic_dispatch_enabled=(val)
|
173
|
+
@automatic_dispatch_enabled = to_b(val)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
class KalturaEventNotificationTemplateListResponse < KalturaObjectBase
|
178
|
+
attr_accessor :objects
|
179
|
+
attr_accessor :total_count
|
180
|
+
|
181
|
+
def total_count=(val)
|
182
|
+
@total_count = val.to_i
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
class KalturaEventFieldCondition < KalturaCondition
|
187
|
+
# The field to be evaluated at runtime
|
188
|
+
#
|
189
|
+
attr_accessor :field
|
190
|
+
|
191
|
+
end
|
192
|
+
|
193
|
+
class KalturaEventNotificationArrayParameter < KalturaEventNotificationParameter
|
194
|
+
attr_accessor :values
|
195
|
+
# Used to restrict the values to close list
|
196
|
+
#
|
197
|
+
attr_accessor :allowed_values
|
198
|
+
|
199
|
+
end
|
200
|
+
|
201
|
+
class KalturaEventNotificationDispatchJobData < KalturaJobData
|
202
|
+
attr_accessor :template_id
|
203
|
+
|
204
|
+
def template_id=(val)
|
205
|
+
@template_id = val.to_i
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
class KalturaEventNotificationTemplateBaseFilter < KalturaFilter
|
210
|
+
attr_accessor :id_equal
|
211
|
+
attr_accessor :id_in
|
212
|
+
attr_accessor :partner_id_equal
|
213
|
+
attr_accessor :partner_id_in
|
214
|
+
attr_accessor :system_name_equal
|
215
|
+
attr_accessor :system_name_in
|
216
|
+
attr_accessor :type_equal
|
217
|
+
attr_accessor :type_in
|
218
|
+
attr_accessor :status_equal
|
219
|
+
attr_accessor :status_in
|
220
|
+
attr_accessor :created_at_greater_than_or_equal
|
221
|
+
attr_accessor :created_at_less_than_or_equal
|
222
|
+
attr_accessor :updated_at_greater_than_or_equal
|
223
|
+
attr_accessor :updated_at_less_than_or_equal
|
224
|
+
|
225
|
+
def id_equal=(val)
|
226
|
+
@id_equal = val.to_i
|
227
|
+
end
|
228
|
+
def partner_id_equal=(val)
|
229
|
+
@partner_id_equal = val.to_i
|
230
|
+
end
|
231
|
+
def status_equal=(val)
|
232
|
+
@status_equal = val.to_i
|
233
|
+
end
|
234
|
+
def created_at_greater_than_or_equal=(val)
|
235
|
+
@created_at_greater_than_or_equal = val.to_i
|
236
|
+
end
|
237
|
+
def created_at_less_than_or_equal=(val)
|
238
|
+
@created_at_less_than_or_equal = val.to_i
|
239
|
+
end
|
240
|
+
def updated_at_greater_than_or_equal=(val)
|
241
|
+
@updated_at_greater_than_or_equal = val.to_i
|
242
|
+
end
|
243
|
+
def updated_at_less_than_or_equal=(val)
|
244
|
+
@updated_at_less_than_or_equal = val.to_i
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
class KalturaEventObjectChangedCondition < KalturaCondition
|
249
|
+
# Comma seperated column names to be tested
|
250
|
+
#
|
251
|
+
attr_accessor :modified_columns
|
252
|
+
|
253
|
+
end
|
254
|
+
|
255
|
+
class KalturaEventNotificationTemplateFilter < KalturaEventNotificationTemplateBaseFilter
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
|
260
|
+
# Event notification template service lets you create and manage event notification templates
|
261
|
+
#
|
262
|
+
class KalturaEventNotificationTemplateService < KalturaServiceBase
|
263
|
+
def initialize(client)
|
264
|
+
super(client)
|
265
|
+
end
|
266
|
+
|
267
|
+
# Allows you to add a new event notification template object
|
268
|
+
#
|
269
|
+
def add(event_notification_template)
|
270
|
+
kparams = {}
|
271
|
+
client.add_param(kparams, 'eventNotificationTemplate', event_notification_template);
|
272
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'add', kparams);
|
273
|
+
if (client.is_multirequest)
|
274
|
+
return nil;
|
275
|
+
end
|
276
|
+
return client.do_queue();
|
277
|
+
end
|
278
|
+
|
279
|
+
# Allows you to clone exiting event notification template object and create a new one with similar configuration
|
280
|
+
#
|
281
|
+
def clone(id, event_notification_template=KalturaNotImplemented)
|
282
|
+
kparams = {}
|
283
|
+
# source template to clone
|
284
|
+
client.add_param(kparams, 'id', id);
|
285
|
+
# overwrite configuration object
|
286
|
+
client.add_param(kparams, 'eventNotificationTemplate', event_notification_template);
|
287
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'clone', kparams);
|
288
|
+
if (client.is_multirequest)
|
289
|
+
return nil;
|
290
|
+
end
|
291
|
+
return client.do_queue();
|
292
|
+
end
|
293
|
+
|
294
|
+
# Retrieve an event notification template object by id
|
295
|
+
#
|
296
|
+
def get(id)
|
297
|
+
kparams = {}
|
298
|
+
client.add_param(kparams, 'id', id);
|
299
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'get', kparams);
|
300
|
+
if (client.is_multirequest)
|
301
|
+
return nil;
|
302
|
+
end
|
303
|
+
return client.do_queue();
|
304
|
+
end
|
305
|
+
|
306
|
+
# Update an existing event notification template object
|
307
|
+
#
|
308
|
+
def update(id, event_notification_template)
|
309
|
+
kparams = {}
|
310
|
+
client.add_param(kparams, 'id', id);
|
311
|
+
client.add_param(kparams, 'eventNotificationTemplate', event_notification_template);
|
312
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'update', kparams);
|
313
|
+
if (client.is_multirequest)
|
314
|
+
return nil;
|
315
|
+
end
|
316
|
+
return client.do_queue();
|
317
|
+
end
|
318
|
+
|
319
|
+
# Update event notification template status by id
|
320
|
+
#
|
321
|
+
def update_status(id, status)
|
322
|
+
kparams = {}
|
323
|
+
client.add_param(kparams, 'id', id);
|
324
|
+
client.add_param(kparams, 'status', status);
|
325
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'updateStatus', kparams);
|
326
|
+
if (client.is_multirequest)
|
327
|
+
return nil;
|
328
|
+
end
|
329
|
+
return client.do_queue();
|
330
|
+
end
|
331
|
+
|
332
|
+
# Delete an event notification template object
|
333
|
+
#
|
334
|
+
def delete(id)
|
335
|
+
kparams = {}
|
336
|
+
client.add_param(kparams, 'id', id);
|
337
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'delete', kparams);
|
338
|
+
if (client.is_multirequest)
|
339
|
+
return nil;
|
340
|
+
end
|
341
|
+
return client.do_queue();
|
342
|
+
end
|
343
|
+
|
344
|
+
# list event notification template objects
|
345
|
+
#
|
346
|
+
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
347
|
+
kparams = {}
|
348
|
+
client.add_param(kparams, 'filter', filter);
|
349
|
+
client.add_param(kparams, 'pager', pager);
|
350
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'list', kparams);
|
351
|
+
if (client.is_multirequest)
|
352
|
+
return nil;
|
353
|
+
end
|
354
|
+
return client.do_queue();
|
355
|
+
end
|
356
|
+
|
357
|
+
def list_by_partner(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
358
|
+
kparams = {}
|
359
|
+
client.add_param(kparams, 'filter', filter);
|
360
|
+
client.add_param(kparams, 'pager', pager);
|
361
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'listByPartner', kparams);
|
362
|
+
if (client.is_multirequest)
|
363
|
+
return nil;
|
364
|
+
end
|
365
|
+
return client.do_queue();
|
366
|
+
end
|
367
|
+
|
368
|
+
# Dispatch event notification object by id
|
369
|
+
#
|
370
|
+
def dispatch(id, data)
|
371
|
+
kparams = {}
|
372
|
+
client.add_param(kparams, 'id', id);
|
373
|
+
client.add_param(kparams, 'data', data);
|
374
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'dispatch', kparams);
|
375
|
+
if (client.is_multirequest)
|
376
|
+
return nil;
|
377
|
+
end
|
378
|
+
return client.do_queue();
|
379
|
+
end
|
380
|
+
|
381
|
+
# Action lists the template partner event notification templates.
|
382
|
+
#
|
383
|
+
def list_templates(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
384
|
+
kparams = {}
|
385
|
+
client.add_param(kparams, 'filter', filter);
|
386
|
+
client.add_param(kparams, 'pager', pager);
|
387
|
+
client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'listTemplates', kparams);
|
388
|
+
if (client.is_multirequest)
|
389
|
+
return nil;
|
390
|
+
end
|
391
|
+
return client.do_queue();
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
class KalturaClient < KalturaClientBase
|
396
|
+
attr_reader :event_notification_template_service
|
397
|
+
def event_notification_template_service
|
398
|
+
if (@event_notification_template_service == nil)
|
399
|
+
@event_notification_template_service = KalturaEventNotificationTemplateService.new(self)
|
400
|
+
end
|
401
|
+
return @event_notification_template_service
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
405
|
+
end
|