kaltura-client 3.3.0 → 14.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README +23 -23
- data/lib/kaltura_client.rb +2054 -1860
- data/lib/kaltura_client_base.rb +4 -1
- data/lib/kaltura_enums.rb +612 -36
- data/lib/kaltura_plugins/kaltura_activiti_business_process_notification_client_plugin.rb +96 -0
- data/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +46 -17
- data/lib/kaltura_plugins/kaltura_admin_console_client_plugin.rb +61 -251
- data/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +131 -60
- data/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +62 -0
- data/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +83 -55
- data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +613 -0
- data/lib/kaltura_plugins/kaltura_avn_distribution_client_plugin.rb +109 -0
- data/lib/kaltura_plugins/kaltura_bpm_event_notification_integration_client_plugin.rb +61 -0
- data/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +17 -19
- data/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +7 -6
- data/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +33 -13
- data/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +1 -2
- data/lib/kaltura_plugins/kaltura_business_process_notification_client_plugin.rb +545 -0
- data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +235 -114
- data/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +86 -29
- data/lib/kaltura_plugins/kaltura_cielo24client_plugin.rb +39 -17
- data/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +49 -18
- data/lib/kaltura_plugins/kaltura_comcast_mrss_distribution_client_plugin.rb +163 -0
- data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +846 -439
- data/lib/kaltura_plugins/kaltura_cross_kaltura_distribution_client_plugin.rb +232 -0
- data/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +229 -74
- data/lib/kaltura_plugins/kaltura_dailymotion_distribution_client_plugin.rb +199 -0
- data/lib/kaltura_plugins/kaltura_document_client_plugin.rb +140 -97
- data/lib/kaltura_plugins/kaltura_double_click_distribution_client_plugin.rb +142 -0
- data/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +635 -0
- data/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +485 -196
- data/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +19 -1
- data/lib/kaltura_plugins/kaltura_elastic_search_client_plugin.rb +1228 -0
- data/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +178 -89
- data/lib/kaltura_plugins/kaltura_event_cue_point_client_plugin.rb +10 -4
- data/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +205 -95
- data/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +43 -32
- data/lib/kaltura_plugins/kaltura_facebook_distribution_client_plugin.rb +183 -0
- data/lib/kaltura_plugins/kaltura_fairplay_client_plugin.rb +62 -0
- data/lib/kaltura_plugins/kaltura_feed_drop_folder_client_plugin.rb +40 -16
- data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +182 -67
- data/lib/kaltura_plugins/kaltura_freewheel_distribution_client_plugin.rb +157 -0
- data/lib/kaltura_plugins/kaltura_freewheel_generic_distribution_client_plugin.rb +172 -0
- data/lib/kaltura_plugins/kaltura_ftp_distribution_client_plugin.rb +258 -0
- data/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +154 -102
- data/lib/kaltura_plugins/kaltura_hulu_distribution_client_plugin.rb +213 -0
- data/lib/kaltura_plugins/kaltura_idetic_distribution_client_plugin.rb +131 -0
- data/lib/kaltura_plugins/kaltura_integration_client_plugin.rb +19 -10
- data/lib/kaltura_plugins/kaltura_kaltura_internal_tools_client_plugin.rb +1 -87
- data/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +19 -10
- data/lib/kaltura_plugins/kaltura_like_client_plugin.rb +45 -25
- data/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +435 -213
- data/lib/kaltura_plugins/kaltura_metro_pcs_distribution_client_plugin.rb +155 -0
- data/lib/kaltura_plugins/kaltura_msn_distribution_client_plugin.rb +186 -0
- data/lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb +482 -0
- data/lib/kaltura_plugins/kaltura_poll_client_plugin.rb +116 -0
- data/lib/kaltura_plugins/kaltura_push_notification_client_plugin.rb +154 -0
- data/lib/kaltura_plugins/kaltura_quick_play_distribution_client_plugin.rb +187 -0
- data/lib/kaltura_plugins/kaltura_quiz_client_plugin.rb +155 -58
- data/lib/kaltura_plugins/kaltura_schedule_bulk_upload_client_plugin.rb +107 -0
- data/lib/kaltura_plugins/kaltura_schedule_client_plugin.rb +1580 -0
- data/lib/kaltura_plugins/kaltura_schedule_drop_folder_client_plugin.rb +52 -0
- data/lib/kaltura_plugins/kaltura_scheduled_task_client_plugin.rb +277 -71
- data/lib/kaltura_plugins/kaltura_scheduled_task_content_distribution_client_plugin.rb +4 -3
- data/lib/kaltura_plugins/kaltura_scheduled_task_event_notification_client_plugin.rb +4 -3
- data/lib/kaltura_plugins/kaltura_scheduled_task_metadata_client_plugin.rb +10 -7
- data/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +113 -66
- data/lib/kaltura_plugins/kaltura_system_partner_client_plugin.rb +81 -517
- data/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +63 -30
- data/lib/kaltura_plugins/kaltura_thumb_cue_point_client_plugin.rb +40 -16
- data/lib/kaltura_plugins/kaltura_transcript_client_plugin.rb +44 -8
- data/lib/kaltura_plugins/kaltura_unicorn_distribution_client_plugin.rb +212 -0
- data/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +75 -74
- data/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +10 -4
- data/lib/kaltura_plugins/kaltura_view_history_client_plugin.rb +112 -0
- data/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +119 -59
- data/lib/kaltura_plugins/kaltura_voicebase_client_plugin.rb +34 -19
- data/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +207 -0
- data/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +299 -0
- data/lib/kaltura_plugins/kaltura_wowza_client_plugin.rb +22 -13
- data/lib/kaltura_plugins/kaltura_yahoo_distribution_client_plugin.rb +155 -0
- data/lib/kaltura_plugins/kaltura_you_tube_distribution_client_plugin.rb +382 -0
- data/lib/kaltura_plugins/kaltura_youtube_api_distribution_client_plugin.rb +219 -0
- data/lib/kaltura_types.rb +10305 -4858
- data/test/access_control_service_test.rb +43 -20
- data/test/base_entry_service_test.rb +57 -67
- data/test/configuration_test.rb +2 -34
- data/test/cue_point_service_test.rb +1 -1
- data/test/data_service_test.rb +19 -5
- data/test/document_service_test.rb +1 -1
- data/test/media_service_test.rb +296 -296
- data/test/metadata_profile_service_test.rb +1 -1
- metadata +52 -21
@@ -8,7 +8,7 @@
|
|
8
8
|
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
9
|
# text.
|
10
10
|
#
|
11
|
-
# Copyright (C) 2006-
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
12
|
#
|
13
13
|
# This program is free software: you can redistribute it and/or modify
|
14
14
|
# it under the terms of the GNU Affero General Public License as
|
@@ -56,13 +56,27 @@ module Kaltura
|
|
56
56
|
|
57
57
|
def from_xml(xml_element)
|
58
58
|
super
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
if xml_element.elements['id'] != nil
|
60
|
+
self.id = xml_element.elements['id'].text
|
61
|
+
end
|
62
|
+
if xml_element.elements['tag'] != nil
|
63
|
+
self.tag = xml_element.elements['tag'].text
|
64
|
+
end
|
65
|
+
if xml_element.elements['taggedObjectType'] != nil
|
66
|
+
self.tagged_object_type = xml_element.elements['taggedObjectType'].text
|
67
|
+
end
|
68
|
+
if xml_element.elements['partnerId'] != nil
|
69
|
+
self.partner_id = xml_element.elements['partnerId'].text
|
70
|
+
end
|
71
|
+
if xml_element.elements['instanceCount'] != nil
|
72
|
+
self.instance_count = xml_element.elements['instanceCount'].text
|
73
|
+
end
|
74
|
+
if xml_element.elements['createdAt'] != nil
|
75
|
+
self.created_at = xml_element.elements['createdAt'].text
|
76
|
+
end
|
77
|
+
if xml_element.elements['updatedAt'] != nil
|
78
|
+
self.updated_at = xml_element.elements['updatedAt'].text
|
79
|
+
end
|
66
80
|
end
|
67
81
|
|
68
82
|
end
|
@@ -78,9 +92,15 @@ module Kaltura
|
|
78
92
|
|
79
93
|
def from_xml(xml_element)
|
80
94
|
super
|
81
|
-
|
82
|
-
|
83
|
-
|
95
|
+
if xml_element.elements['changedCategoryId'] != nil
|
96
|
+
self.changed_category_id = xml_element.elements['changedCategoryId'].text
|
97
|
+
end
|
98
|
+
if xml_element.elements['deletedPrivacyContexts'] != nil
|
99
|
+
self.deleted_privacy_contexts = xml_element.elements['deletedPrivacyContexts'].text
|
100
|
+
end
|
101
|
+
if xml_element.elements['addedPrivacyContexts'] != nil
|
102
|
+
self.added_privacy_contexts = xml_element.elements['addedPrivacyContexts'].text
|
103
|
+
end
|
84
104
|
end
|
85
105
|
|
86
106
|
end
|
@@ -101,11 +121,21 @@ module Kaltura
|
|
101
121
|
|
102
122
|
def from_xml(xml_element)
|
103
123
|
super
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
124
|
+
if xml_element.elements['objectTypeEqual'] != nil
|
125
|
+
self.object_type_equal = xml_element.elements['objectTypeEqual'].text
|
126
|
+
end
|
127
|
+
if xml_element.elements['tagEqual'] != nil
|
128
|
+
self.tag_equal = xml_element.elements['tagEqual'].text
|
129
|
+
end
|
130
|
+
if xml_element.elements['tagStartsWith'] != nil
|
131
|
+
self.tag_starts_with = xml_element.elements['tagStartsWith'].text
|
132
|
+
end
|
133
|
+
if xml_element.elements['instanceCountEqual'] != nil
|
134
|
+
self.instance_count_equal = xml_element.elements['instanceCountEqual'].text
|
135
|
+
end
|
136
|
+
if xml_element.elements['instanceCountIn'] != nil
|
137
|
+
self.instance_count_in = xml_element.elements['instanceCountIn'].text
|
138
|
+
end
|
109
139
|
end
|
110
140
|
|
111
141
|
end
|
@@ -116,32 +146,22 @@ module Kaltura
|
|
116
146
|
|
117
147
|
def from_xml(xml_element)
|
118
148
|
super
|
119
|
-
|
149
|
+
if xml_element.elements['objects'] != nil
|
150
|
+
self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaTag')
|
151
|
+
end
|
120
152
|
end
|
121
153
|
|
122
154
|
end
|
123
155
|
|
124
156
|
|
125
157
|
# Search object tags
|
126
|
-
#
|
127
158
|
class KalturaTagService < KalturaServiceBase
|
128
159
|
def initialize(client)
|
129
160
|
super(client)
|
130
161
|
end
|
131
162
|
|
132
|
-
def search(tag_filter, pager=KalturaNotImplemented)
|
133
|
-
kparams = {}
|
134
|
-
client.add_param(kparams, 'tagFilter', tag_filter)
|
135
|
-
client.add_param(kparams, 'pager', pager)
|
136
|
-
client.queue_service_action_call('tagsearch_tag', 'search', 'KalturaTagListResponse', kparams)
|
137
|
-
if (client.is_multirequest)
|
138
|
-
return nil
|
139
|
-
end
|
140
|
-
return client.do_queue()
|
141
|
-
end
|
142
|
-
|
143
163
|
# Action goes over all tags with instanceCount==0 and checks whether they need to be removed from the DB. Returns number of removed tags.
|
144
|
-
#
|
164
|
+
# @return [int]
|
145
165
|
def delete_pending()
|
146
166
|
kparams = {}
|
147
167
|
client.queue_service_action_call('tagsearch_tag', 'deletePending', 'int', kparams)
|
@@ -151,6 +171,7 @@ module Kaltura
|
|
151
171
|
return client.do_queue()
|
152
172
|
end
|
153
173
|
|
174
|
+
# @return []
|
154
175
|
def index_category_entry_tags(category_id, pc_to_decrement, pc_to_increment)
|
155
176
|
kparams = {}
|
156
177
|
client.add_param(kparams, 'categoryId', category_id)
|
@@ -162,6 +183,18 @@ module Kaltura
|
|
162
183
|
end
|
163
184
|
return client.do_queue()
|
164
185
|
end
|
186
|
+
|
187
|
+
# @return [KalturaTagListResponse]
|
188
|
+
def search(tag_filter, pager=KalturaNotImplemented)
|
189
|
+
kparams = {}
|
190
|
+
client.add_param(kparams, 'tagFilter', tag_filter)
|
191
|
+
client.add_param(kparams, 'pager', pager)
|
192
|
+
client.queue_service_action_call('tagsearch_tag', 'search', 'KalturaTagListResponse', kparams)
|
193
|
+
if (client.is_multirequest)
|
194
|
+
return nil
|
195
|
+
end
|
196
|
+
return client.do_queue()
|
197
|
+
end
|
165
198
|
end
|
166
199
|
|
167
200
|
class KalturaClient < KalturaClientBase
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
9
|
# text.
|
10
10
|
#
|
11
|
-
# Copyright (C) 2006-
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
12
|
#
|
13
13
|
# This program is free software: you can redistribute it and/or modify
|
14
14
|
# it under the terms of the GNU Affero General Public License as
|
@@ -59,7 +59,6 @@ module Kaltura
|
|
59
59
|
attr_accessor :description
|
60
60
|
attr_accessor :title
|
61
61
|
# The sub type of the ThumbCuePoint
|
62
|
-
#
|
63
62
|
attr_accessor :sub_type
|
64
63
|
|
65
64
|
def sub_type=(val)
|
@@ -68,23 +67,32 @@ module Kaltura
|
|
68
67
|
|
69
68
|
def from_xml(xml_element)
|
70
69
|
super
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
if xml_element.elements['assetId'] != nil
|
71
|
+
self.asset_id = xml_element.elements['assetId'].text
|
72
|
+
end
|
73
|
+
if xml_element.elements['description'] != nil
|
74
|
+
self.description = xml_element.elements['description'].text
|
75
|
+
end
|
76
|
+
if xml_element.elements['title'] != nil
|
77
|
+
self.title = xml_element.elements['title'].text
|
78
|
+
end
|
79
|
+
if xml_element.elements['subType'] != nil
|
80
|
+
self.sub_type = xml_element.elements['subType'].text
|
81
|
+
end
|
75
82
|
end
|
76
83
|
|
77
84
|
end
|
78
85
|
|
79
86
|
class KalturaTimedThumbAsset < KalturaThumbAsset
|
80
87
|
# Associated thumb cue point ID
|
81
|
-
#
|
82
88
|
attr_accessor :cue_point_id
|
83
89
|
|
84
90
|
|
85
91
|
def from_xml(xml_element)
|
86
92
|
super
|
87
|
-
|
93
|
+
if xml_element.elements['cuePointId'] != nil
|
94
|
+
self.cue_point_id = xml_element.elements['cuePointId'].text
|
95
|
+
end
|
88
96
|
end
|
89
97
|
|
90
98
|
end
|
@@ -105,14 +113,30 @@ module Kaltura
|
|
105
113
|
|
106
114
|
def from_xml(xml_element)
|
107
115
|
super
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
+
if xml_element.elements['descriptionLike'] != nil
|
117
|
+
self.description_like = xml_element.elements['descriptionLike'].text
|
118
|
+
end
|
119
|
+
if xml_element.elements['descriptionMultiLikeOr'] != nil
|
120
|
+
self.description_multi_like_or = xml_element.elements['descriptionMultiLikeOr'].text
|
121
|
+
end
|
122
|
+
if xml_element.elements['descriptionMultiLikeAnd'] != nil
|
123
|
+
self.description_multi_like_and = xml_element.elements['descriptionMultiLikeAnd'].text
|
124
|
+
end
|
125
|
+
if xml_element.elements['titleLike'] != nil
|
126
|
+
self.title_like = xml_element.elements['titleLike'].text
|
127
|
+
end
|
128
|
+
if xml_element.elements['titleMultiLikeOr'] != nil
|
129
|
+
self.title_multi_like_or = xml_element.elements['titleMultiLikeOr'].text
|
130
|
+
end
|
131
|
+
if xml_element.elements['titleMultiLikeAnd'] != nil
|
132
|
+
self.title_multi_like_and = xml_element.elements['titleMultiLikeAnd'].text
|
133
|
+
end
|
134
|
+
if xml_element.elements['subTypeEqual'] != nil
|
135
|
+
self.sub_type_equal = xml_element.elements['subTypeEqual'].text
|
136
|
+
end
|
137
|
+
if xml_element.elements['subTypeIn'] != nil
|
138
|
+
self.sub_type_in = xml_element.elements['subTypeIn'].text
|
139
|
+
end
|
116
140
|
end
|
117
141
|
|
118
142
|
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
9
|
# text.
|
10
10
|
#
|
11
|
-
# Copyright (C) 2006-
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
12
|
#
|
13
13
|
# This program is free software: you can redistribute it and/or modify
|
14
14
|
# it under the terms of the GNU Affero General Public License as
|
@@ -41,16 +41,20 @@ module Kaltura
|
|
41
41
|
UPDATED_AT_DESC = "-updatedAt"
|
42
42
|
end
|
43
43
|
|
44
|
+
class KalturaTranscriptProviderType
|
45
|
+
CIELO24 = "cielo24.Cielo24"
|
46
|
+
VOICEBASE = "voicebase.Voicebase"
|
47
|
+
end
|
48
|
+
|
44
49
|
class KalturaTranscriptAsset < KalturaAttachmentAsset
|
45
50
|
# The accuracy of the transcript - values between 0 and 1
|
46
|
-
#
|
47
51
|
attr_accessor :accuracy
|
48
52
|
# Was verified by human or machine
|
49
|
-
#
|
50
53
|
attr_accessor :human_verified
|
51
54
|
# The language of the transcript
|
52
|
-
#
|
53
55
|
attr_accessor :language
|
56
|
+
# The provider of the transcript
|
57
|
+
attr_accessor :provider_type
|
54
58
|
|
55
59
|
def accuracy=(val)
|
56
60
|
@accuracy = val.to_f
|
@@ -61,9 +65,39 @@ module Kaltura
|
|
61
65
|
|
62
66
|
def from_xml(xml_element)
|
63
67
|
super
|
64
|
-
|
65
|
-
|
66
|
-
|
68
|
+
if xml_element.elements['accuracy'] != nil
|
69
|
+
self.accuracy = xml_element.elements['accuracy'].text
|
70
|
+
end
|
71
|
+
if xml_element.elements['humanVerified'] != nil
|
72
|
+
self.human_verified = xml_element.elements['humanVerified'].text
|
73
|
+
end
|
74
|
+
if xml_element.elements['language'] != nil
|
75
|
+
self.language = xml_element.elements['language'].text
|
76
|
+
end
|
77
|
+
if xml_element.elements['providerType'] != nil
|
78
|
+
self.provider_type = xml_element.elements['providerType'].text
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
class KalturaEntryTranscriptAssetSearchItem < KalturaSearchItem
|
85
|
+
attr_accessor :content_like
|
86
|
+
attr_accessor :content_multi_like_or
|
87
|
+
attr_accessor :content_multi_like_and
|
88
|
+
|
89
|
+
|
90
|
+
def from_xml(xml_element)
|
91
|
+
super
|
92
|
+
if xml_element.elements['contentLike'] != nil
|
93
|
+
self.content_like = xml_element.elements['contentLike'].text
|
94
|
+
end
|
95
|
+
if xml_element.elements['contentMultiLikeOr'] != nil
|
96
|
+
self.content_multi_like_or = xml_element.elements['contentMultiLikeOr'].text
|
97
|
+
end
|
98
|
+
if xml_element.elements['contentMultiLikeAnd'] != nil
|
99
|
+
self.content_multi_like_and = xml_element.elements['contentMultiLikeAnd'].text
|
100
|
+
end
|
67
101
|
end
|
68
102
|
|
69
103
|
end
|
@@ -74,7 +108,9 @@ module Kaltura
|
|
74
108
|
|
75
109
|
def from_xml(xml_element)
|
76
110
|
super
|
77
|
-
|
111
|
+
if xml_element.elements['objects'] != nil
|
112
|
+
self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaTranscriptAsset')
|
113
|
+
end
|
78
114
|
end
|
79
115
|
|
80
116
|
end
|
@@ -0,0 +1,212 @@
|
|
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-2019 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_content_distribution_client_plugin.rb'
|
30
|
+
|
31
|
+
module Kaltura
|
32
|
+
|
33
|
+
class KalturaUnicornDistributionProfileOrderBy
|
34
|
+
CREATED_AT_ASC = "+createdAt"
|
35
|
+
UPDATED_AT_ASC = "+updatedAt"
|
36
|
+
CREATED_AT_DESC = "-createdAt"
|
37
|
+
UPDATED_AT_DESC = "-updatedAt"
|
38
|
+
end
|
39
|
+
|
40
|
+
class KalturaUnicornDistributionProviderOrderBy
|
41
|
+
end
|
42
|
+
|
43
|
+
class KalturaUnicornDistributionProvider < KalturaDistributionProvider
|
44
|
+
|
45
|
+
|
46
|
+
def from_xml(xml_element)
|
47
|
+
super
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
class KalturaUnicornDistributionJobProviderData < KalturaConfigurableDistributionJobProviderData
|
53
|
+
# The Catalog GUID the video is in or will be ingested into.
|
54
|
+
attr_accessor :catalog_guid
|
55
|
+
# The Title assigned to the video. The Foreign Key will be used if no title is provided.
|
56
|
+
attr_accessor :title
|
57
|
+
# Indicates that the media content changed and therefore the job should wait for HTTP callback notification to be closed.
|
58
|
+
attr_accessor :media_changed
|
59
|
+
# Flavor asset version.
|
60
|
+
attr_accessor :flavor_asset_version
|
61
|
+
# The schema and host name to the Kaltura server, e.g. http://www.kaltura.com
|
62
|
+
attr_accessor :notification_base_url
|
63
|
+
|
64
|
+
def media_changed=(val)
|
65
|
+
@media_changed = to_b(val)
|
66
|
+
end
|
67
|
+
|
68
|
+
def from_xml(xml_element)
|
69
|
+
super
|
70
|
+
if xml_element.elements['catalogGuid'] != nil
|
71
|
+
self.catalog_guid = xml_element.elements['catalogGuid'].text
|
72
|
+
end
|
73
|
+
if xml_element.elements['title'] != nil
|
74
|
+
self.title = xml_element.elements['title'].text
|
75
|
+
end
|
76
|
+
if xml_element.elements['mediaChanged'] != nil
|
77
|
+
self.media_changed = xml_element.elements['mediaChanged'].text
|
78
|
+
end
|
79
|
+
if xml_element.elements['flavorAssetVersion'] != nil
|
80
|
+
self.flavor_asset_version = xml_element.elements['flavorAssetVersion'].text
|
81
|
+
end
|
82
|
+
if xml_element.elements['notificationBaseUrl'] != nil
|
83
|
+
self.notification_base_url = xml_element.elements['notificationBaseUrl'].text
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
class KalturaUnicornDistributionProfile < KalturaConfigurableDistributionProfile
|
90
|
+
# The email address associated with the Upload User, used to authorize the incoming request.
|
91
|
+
attr_accessor :username
|
92
|
+
# The password used in association with the email to determine if the Upload User is authorized the incoming request.
|
93
|
+
attr_accessor :password
|
94
|
+
# The name of the Domain that the Upload User should have access to, Used for authentication.
|
95
|
+
attr_accessor :domain_name
|
96
|
+
# The Channel GUID assigned to this Publication Rule. Must be a valid Channel in the Domain that was used in authentication.
|
97
|
+
attr_accessor :channel_guid
|
98
|
+
# The API host URL that the Upload User should have access to, Used for HTTP content submission.
|
99
|
+
attr_accessor :api_host_url
|
100
|
+
# The GUID of the Customer Domain in the Unicorn system obtained by contacting your Unicorn representative.
|
101
|
+
attr_accessor :domain_guid
|
102
|
+
# The GUID for the application in which to record metrics and enforce business rules obtained through your Unicorn representative.
|
103
|
+
attr_accessor :ad_free_application_guid
|
104
|
+
# The flavor-params that will be used for the remote asset.
|
105
|
+
attr_accessor :remote_asset_params_id
|
106
|
+
# The remote storage that should be used for the remote asset.
|
107
|
+
attr_accessor :storage_profile_id
|
108
|
+
|
109
|
+
def remote_asset_params_id=(val)
|
110
|
+
@remote_asset_params_id = val.to_i
|
111
|
+
end
|
112
|
+
|
113
|
+
def from_xml(xml_element)
|
114
|
+
super
|
115
|
+
if xml_element.elements['username'] != nil
|
116
|
+
self.username = xml_element.elements['username'].text
|
117
|
+
end
|
118
|
+
if xml_element.elements['password'] != nil
|
119
|
+
self.password = xml_element.elements['password'].text
|
120
|
+
end
|
121
|
+
if xml_element.elements['domainName'] != nil
|
122
|
+
self.domain_name = xml_element.elements['domainName'].text
|
123
|
+
end
|
124
|
+
if xml_element.elements['channelGuid'] != nil
|
125
|
+
self.channel_guid = xml_element.elements['channelGuid'].text
|
126
|
+
end
|
127
|
+
if xml_element.elements['apiHostUrl'] != nil
|
128
|
+
self.api_host_url = xml_element.elements['apiHostUrl'].text
|
129
|
+
end
|
130
|
+
if xml_element.elements['domainGuid'] != nil
|
131
|
+
self.domain_guid = xml_element.elements['domainGuid'].text
|
132
|
+
end
|
133
|
+
if xml_element.elements['adFreeApplicationGuid'] != nil
|
134
|
+
self.ad_free_application_guid = xml_element.elements['adFreeApplicationGuid'].text
|
135
|
+
end
|
136
|
+
if xml_element.elements['remoteAssetParamsId'] != nil
|
137
|
+
self.remote_asset_params_id = xml_element.elements['remoteAssetParamsId'].text
|
138
|
+
end
|
139
|
+
if xml_element.elements['storageProfileId'] != nil
|
140
|
+
self.storage_profile_id = xml_element.elements['storageProfileId'].text
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
class KalturaUnicornDistributionProviderBaseFilter < KalturaDistributionProviderFilter
|
147
|
+
|
148
|
+
|
149
|
+
def from_xml(xml_element)
|
150
|
+
super
|
151
|
+
end
|
152
|
+
|
153
|
+
end
|
154
|
+
|
155
|
+
class KalturaUnicornDistributionProviderFilter < KalturaUnicornDistributionProviderBaseFilter
|
156
|
+
|
157
|
+
|
158
|
+
def from_xml(xml_element)
|
159
|
+
super
|
160
|
+
end
|
161
|
+
|
162
|
+
end
|
163
|
+
|
164
|
+
class KalturaUnicornDistributionProfileBaseFilter < KalturaConfigurableDistributionProfileFilter
|
165
|
+
|
166
|
+
|
167
|
+
def from_xml(xml_element)
|
168
|
+
super
|
169
|
+
end
|
170
|
+
|
171
|
+
end
|
172
|
+
|
173
|
+
class KalturaUnicornDistributionProfileFilter < KalturaUnicornDistributionProfileBaseFilter
|
174
|
+
|
175
|
+
|
176
|
+
def from_xml(xml_element)
|
177
|
+
super
|
178
|
+
end
|
179
|
+
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
# Unicorn Service
|
184
|
+
class KalturaUnicornService < KalturaServiceBase
|
185
|
+
def initialize(client)
|
186
|
+
super(client)
|
187
|
+
end
|
188
|
+
|
189
|
+
# @return []
|
190
|
+
def notify(id)
|
191
|
+
kparams = {}
|
192
|
+
client.add_param(kparams, 'id', id)
|
193
|
+
client.queue_service_action_call('unicorndistribution_unicorn', 'notify', '', kparams)
|
194
|
+
if (client.is_multirequest)
|
195
|
+
return nil
|
196
|
+
end
|
197
|
+
return client.do_queue()
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
class KalturaClient < KalturaClientBase
|
202
|
+
attr_reader :unicorn_service
|
203
|
+
def unicorn_service
|
204
|
+
if (@unicorn_service == nil)
|
205
|
+
@unicorn_service = KalturaUnicornService.new(self)
|
206
|
+
end
|
207
|
+
return @unicorn_service
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
211
|
+
|
212
|
+
end
|