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,45 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2011 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
|
30
|
+
module Kaltura
|
31
|
+
|
32
|
+
class KalturaFileSyncImportJobData < KalturaJobData
|
33
|
+
attr_accessor :source_url
|
34
|
+
attr_accessor :filesync_id
|
35
|
+
attr_accessor :tmp_file_path
|
36
|
+
attr_accessor :dest_file_path
|
37
|
+
attr_accessor :file_size
|
38
|
+
|
39
|
+
def file_size=(val)
|
40
|
+
@file_size = val.to_i
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,231 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2011 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
|
30
|
+
module Kaltura
|
31
|
+
|
32
|
+
class KalturaShortLinkStatus
|
33
|
+
DISABLED = 1
|
34
|
+
ENABLED = 2
|
35
|
+
DELETED = 3
|
36
|
+
end
|
37
|
+
|
38
|
+
class KalturaShortLinkOrderBy
|
39
|
+
CREATED_AT_ASC = "+createdAt"
|
40
|
+
EXPIRES_AT_ASC = "+expiresAt"
|
41
|
+
UPDATED_AT_ASC = "+updatedAt"
|
42
|
+
CREATED_AT_DESC = "-createdAt"
|
43
|
+
EXPIRES_AT_DESC = "-expiresAt"
|
44
|
+
UPDATED_AT_DESC = "-updatedAt"
|
45
|
+
end
|
46
|
+
|
47
|
+
class KalturaShortLink < KalturaObjectBase
|
48
|
+
attr_accessor :id
|
49
|
+
attr_accessor :created_at
|
50
|
+
attr_accessor :updated_at
|
51
|
+
attr_accessor :expires_at
|
52
|
+
attr_accessor :partner_id
|
53
|
+
attr_accessor :user_id
|
54
|
+
attr_accessor :name
|
55
|
+
attr_accessor :system_name
|
56
|
+
attr_accessor :full_url
|
57
|
+
attr_accessor :status
|
58
|
+
|
59
|
+
def id=(val)
|
60
|
+
@id = val.to_i
|
61
|
+
end
|
62
|
+
def created_at=(val)
|
63
|
+
@created_at = val.to_i
|
64
|
+
end
|
65
|
+
def updated_at=(val)
|
66
|
+
@updated_at = val.to_i
|
67
|
+
end
|
68
|
+
def expires_at=(val)
|
69
|
+
@expires_at = val.to_i
|
70
|
+
end
|
71
|
+
def partner_id=(val)
|
72
|
+
@partner_id = val.to_i
|
73
|
+
end
|
74
|
+
def status=(val)
|
75
|
+
@status = val.to_i
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
class KalturaShortLinkListResponse < KalturaObjectBase
|
80
|
+
attr_accessor :objects
|
81
|
+
attr_accessor :total_count
|
82
|
+
|
83
|
+
def total_count=(val)
|
84
|
+
@total_count = val.to_i
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
class KalturaShortLinkBaseFilter < KalturaFilter
|
89
|
+
attr_accessor :id_equal
|
90
|
+
attr_accessor :id_in
|
91
|
+
attr_accessor :created_at_greater_than_or_equal
|
92
|
+
attr_accessor :created_at_less_than_or_equal
|
93
|
+
attr_accessor :updated_at_greater_than_or_equal
|
94
|
+
attr_accessor :updated_at_less_than_or_equal
|
95
|
+
attr_accessor :expires_at_greater_than_or_equal
|
96
|
+
attr_accessor :expires_at_less_than_or_equal
|
97
|
+
attr_accessor :partner_id_equal
|
98
|
+
attr_accessor :partner_id_in
|
99
|
+
attr_accessor :user_id_equal
|
100
|
+
attr_accessor :user_id_in
|
101
|
+
attr_accessor :system_name_equal
|
102
|
+
attr_accessor :system_name_in
|
103
|
+
attr_accessor :status_equal
|
104
|
+
attr_accessor :status_in
|
105
|
+
|
106
|
+
def id_equal=(val)
|
107
|
+
@id_equal = val.to_i
|
108
|
+
end
|
109
|
+
def created_at_greater_than_or_equal=(val)
|
110
|
+
@created_at_greater_than_or_equal = val.to_i
|
111
|
+
end
|
112
|
+
def created_at_less_than_or_equal=(val)
|
113
|
+
@created_at_less_than_or_equal = val.to_i
|
114
|
+
end
|
115
|
+
def updated_at_greater_than_or_equal=(val)
|
116
|
+
@updated_at_greater_than_or_equal = val.to_i
|
117
|
+
end
|
118
|
+
def updated_at_less_than_or_equal=(val)
|
119
|
+
@updated_at_less_than_or_equal = val.to_i
|
120
|
+
end
|
121
|
+
def expires_at_greater_than_or_equal=(val)
|
122
|
+
@expires_at_greater_than_or_equal = val.to_i
|
123
|
+
end
|
124
|
+
def expires_at_less_than_or_equal=(val)
|
125
|
+
@expires_at_less_than_or_equal = val.to_i
|
126
|
+
end
|
127
|
+
def partner_id_equal=(val)
|
128
|
+
@partner_id_equal = val.to_i
|
129
|
+
end
|
130
|
+
def status_equal=(val)
|
131
|
+
@status_equal = val.to_i
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
class KalturaShortLinkFilter < KalturaShortLinkBaseFilter
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
# Short link service
|
141
|
+
#
|
142
|
+
class KalturaShortLinkService < KalturaServiceBase
|
143
|
+
def initialize(client)
|
144
|
+
super(client)
|
145
|
+
end
|
146
|
+
|
147
|
+
# List short link objects by filter and pager
|
148
|
+
#
|
149
|
+
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
150
|
+
kparams = {}
|
151
|
+
client.add_param(kparams, 'filter', filter);
|
152
|
+
client.add_param(kparams, 'pager', pager);
|
153
|
+
client.queue_service_action_call('shortlink_shortlink', 'list', kparams);
|
154
|
+
if (client.is_multirequest)
|
155
|
+
return nil;
|
156
|
+
end
|
157
|
+
return client.do_queue();
|
158
|
+
end
|
159
|
+
|
160
|
+
# Allows you to add a short link object
|
161
|
+
#
|
162
|
+
def add(short_link)
|
163
|
+
kparams = {}
|
164
|
+
client.add_param(kparams, 'shortLink', short_link);
|
165
|
+
client.queue_service_action_call('shortlink_shortlink', 'add', kparams);
|
166
|
+
if (client.is_multirequest)
|
167
|
+
return nil;
|
168
|
+
end
|
169
|
+
return client.do_queue();
|
170
|
+
end
|
171
|
+
|
172
|
+
# Retrieve an short link object by id
|
173
|
+
#
|
174
|
+
def get(id)
|
175
|
+
kparams = {}
|
176
|
+
client.add_param(kparams, 'id', id);
|
177
|
+
client.queue_service_action_call('shortlink_shortlink', 'get', kparams);
|
178
|
+
if (client.is_multirequest)
|
179
|
+
return nil;
|
180
|
+
end
|
181
|
+
return client.do_queue();
|
182
|
+
end
|
183
|
+
|
184
|
+
# Update exisitng short link
|
185
|
+
#
|
186
|
+
def update(id, short_link)
|
187
|
+
kparams = {}
|
188
|
+
client.add_param(kparams, 'id', id);
|
189
|
+
client.add_param(kparams, 'shortLink', short_link);
|
190
|
+
client.queue_service_action_call('shortlink_shortlink', 'update', kparams);
|
191
|
+
if (client.is_multirequest)
|
192
|
+
return nil;
|
193
|
+
end
|
194
|
+
return client.do_queue();
|
195
|
+
end
|
196
|
+
|
197
|
+
# Mark the short link as deleted
|
198
|
+
#
|
199
|
+
def delete(id)
|
200
|
+
kparams = {}
|
201
|
+
client.add_param(kparams, 'id', id);
|
202
|
+
client.queue_service_action_call('shortlink_shortlink', 'delete', kparams);
|
203
|
+
if (client.is_multirequest)
|
204
|
+
return nil;
|
205
|
+
end
|
206
|
+
return client.do_queue();
|
207
|
+
end
|
208
|
+
|
209
|
+
# Serves short link
|
210
|
+
#
|
211
|
+
def goto(id, proxy=false)
|
212
|
+
kparams = {}
|
213
|
+
client.add_param(kparams, 'id', id);
|
214
|
+
# proxy the response instead of redirect
|
215
|
+
client.add_param(kparams, 'proxy', proxy);
|
216
|
+
client.queue_service_action_call('shortlink_shortlink', 'goto', kparams);
|
217
|
+
return client.get_serve_url();
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
class KalturaClient < KalturaClientBase
|
222
|
+
attr_reader :short_link_service
|
223
|
+
def short_link_service
|
224
|
+
if (@short_link_service == nil)
|
225
|
+
@short_link_service = KalturaShortLinkService.new(self)
|
226
|
+
end
|
227
|
+
return @short_link_service
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
@@ -0,0 +1,145 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2011 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
|
30
|
+
module Kaltura
|
31
|
+
|
32
|
+
class KalturaTag < KalturaObjectBase
|
33
|
+
attr_accessor :id
|
34
|
+
attr_accessor :tag
|
35
|
+
attr_accessor :tagged_object_type
|
36
|
+
attr_accessor :partner_id
|
37
|
+
attr_accessor :instance_count
|
38
|
+
attr_accessor :created_at
|
39
|
+
attr_accessor :updated_at
|
40
|
+
|
41
|
+
def id=(val)
|
42
|
+
@id = val.to_i
|
43
|
+
end
|
44
|
+
def partner_id=(val)
|
45
|
+
@partner_id = val.to_i
|
46
|
+
end
|
47
|
+
def instance_count=(val)
|
48
|
+
@instance_count = val.to_i
|
49
|
+
end
|
50
|
+
def created_at=(val)
|
51
|
+
@created_at = val.to_i
|
52
|
+
end
|
53
|
+
def updated_at=(val)
|
54
|
+
@updated_at = val.to_i
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class KalturaTagListResponse < KalturaObjectBase
|
59
|
+
attr_accessor :objects
|
60
|
+
attr_accessor :total_count
|
61
|
+
|
62
|
+
def total_count=(val)
|
63
|
+
@total_count = val.to_i
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
class KalturaIndexTagsByPrivacyContextJobData < KalturaJobData
|
68
|
+
attr_accessor :changed_category_id
|
69
|
+
attr_accessor :deleted_privacy_contexts
|
70
|
+
attr_accessor :added_privacy_contexts
|
71
|
+
|
72
|
+
def changed_category_id=(val)
|
73
|
+
@changed_category_id = val.to_i
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
class KalturaTagFilter < KalturaFilter
|
78
|
+
attr_accessor :object_type_equal
|
79
|
+
attr_accessor :tag_equal
|
80
|
+
attr_accessor :tag_starts_with
|
81
|
+
attr_accessor :instance_count_equal
|
82
|
+
attr_accessor :instance_count_in
|
83
|
+
|
84
|
+
def instance_count_equal=(val)
|
85
|
+
@instance_count_equal = val.to_i
|
86
|
+
end
|
87
|
+
def instance_count_in=(val)
|
88
|
+
@instance_count_in = val.to_i
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
# Search object tags
|
94
|
+
#
|
95
|
+
class KalturaTagService < KalturaServiceBase
|
96
|
+
def initialize(client)
|
97
|
+
super(client)
|
98
|
+
end
|
99
|
+
|
100
|
+
def search(tag_filter, pager=KalturaNotImplemented)
|
101
|
+
kparams = {}
|
102
|
+
client.add_param(kparams, 'tagFilter', tag_filter);
|
103
|
+
client.add_param(kparams, 'pager', pager);
|
104
|
+
client.queue_service_action_call('tagsearch_tag', 'search', kparams);
|
105
|
+
if (client.is_multirequest)
|
106
|
+
return nil;
|
107
|
+
end
|
108
|
+
return client.do_queue();
|
109
|
+
end
|
110
|
+
|
111
|
+
# Action goes over all tags with instanceCount==0 and checks whether they need to be removed from the DB. Returns number of removed tags.
|
112
|
+
#
|
113
|
+
def delete_pending()
|
114
|
+
kparams = {}
|
115
|
+
client.queue_service_action_call('tagsearch_tag', 'deletePending', kparams);
|
116
|
+
if (client.is_multirequest)
|
117
|
+
return nil;
|
118
|
+
end
|
119
|
+
return client.do_queue();
|
120
|
+
end
|
121
|
+
|
122
|
+
def index_category_entry_tags(category_id, pc_to_decrement, pc_to_increment)
|
123
|
+
kparams = {}
|
124
|
+
client.add_param(kparams, 'categoryId', category_id);
|
125
|
+
client.add_param(kparams, 'pcToDecrement', pc_to_decrement);
|
126
|
+
client.add_param(kparams, 'pcToIncrement', pc_to_increment);
|
127
|
+
client.queue_service_action_call('tagsearch_tag', 'indexCategoryEntryTags', kparams);
|
128
|
+
if (client.is_multirequest)
|
129
|
+
return nil;
|
130
|
+
end
|
131
|
+
return client.do_queue();
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
class KalturaClient < KalturaClientBase
|
136
|
+
attr_reader :tag_service
|
137
|
+
def tag_service
|
138
|
+
if (@tag_service == nil)
|
139
|
+
@tag_service = KalturaTagService.new(self)
|
140
|
+
end
|
141
|
+
return @tag_service
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
end
|
@@ -0,0 +1,238 @@
|
|
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 KalturaVarPartnerUsageItem < KalturaObjectBase
|
33
|
+
# Partner ID
|
34
|
+
#
|
35
|
+
attr_accessor :partner_id
|
36
|
+
# Partner name
|
37
|
+
#
|
38
|
+
attr_accessor :partner_name
|
39
|
+
# Partner status
|
40
|
+
#
|
41
|
+
attr_accessor :partner_status
|
42
|
+
# Partner package
|
43
|
+
#
|
44
|
+
attr_accessor :partner_package
|
45
|
+
# Partner creation date (Unix timestamp)
|
46
|
+
#
|
47
|
+
attr_accessor :partner_created_at
|
48
|
+
# Number of player loads in the specific date range
|
49
|
+
#
|
50
|
+
attr_accessor :views
|
51
|
+
# Number of plays in the specific date range
|
52
|
+
#
|
53
|
+
attr_accessor :plays
|
54
|
+
# Number of new entries created during specific date range
|
55
|
+
#
|
56
|
+
attr_accessor :entries_count
|
57
|
+
# Total number of entries
|
58
|
+
#
|
59
|
+
attr_accessor :total_entries_count
|
60
|
+
# Number of new video entries created during specific date range
|
61
|
+
#
|
62
|
+
attr_accessor :video_entries_count
|
63
|
+
# Number of new image entries created during specific date range
|
64
|
+
#
|
65
|
+
attr_accessor :image_entries_count
|
66
|
+
# Number of new audio entries created during specific date range
|
67
|
+
#
|
68
|
+
attr_accessor :audio_entries_count
|
69
|
+
# Number of new mix entries created during specific date range
|
70
|
+
#
|
71
|
+
attr_accessor :mix_entries_count
|
72
|
+
# The total bandwidth usage during the given date range (in MB)
|
73
|
+
#
|
74
|
+
attr_accessor :bandwidth
|
75
|
+
# The total storage consumption (in MB)
|
76
|
+
#
|
77
|
+
attr_accessor :total_storage
|
78
|
+
# The added storage consumption (new uploads) during the given date range (in MB)
|
79
|
+
#
|
80
|
+
attr_accessor :storage
|
81
|
+
# The deleted storage consumption (new uploads) during the given date range (in MB)
|
82
|
+
#
|
83
|
+
attr_accessor :deleted_storage
|
84
|
+
# The peak amount of storage consumption during the given date range for the specific publisher
|
85
|
+
#
|
86
|
+
attr_accessor :peak_storage
|
87
|
+
# The average amount of storage consumption during the given date range for the specific publisher
|
88
|
+
#
|
89
|
+
attr_accessor :avg_storage
|
90
|
+
# The combined amount of bandwidth and storage consumed during the given date range for the specific publisher
|
91
|
+
#
|
92
|
+
attr_accessor :combined_storage_bandwidth
|
93
|
+
# Amount of transcoding usage in MB
|
94
|
+
#
|
95
|
+
attr_accessor :transcoding_usage
|
96
|
+
# TGhe date at which the report was taken - Unix Timestamp
|
97
|
+
#
|
98
|
+
attr_accessor :date_id
|
99
|
+
|
100
|
+
def partner_id=(val)
|
101
|
+
@partner_id = val.to_i
|
102
|
+
end
|
103
|
+
def partner_status=(val)
|
104
|
+
@partner_status = val.to_i
|
105
|
+
end
|
106
|
+
def partner_package=(val)
|
107
|
+
@partner_package = val.to_i
|
108
|
+
end
|
109
|
+
def partner_created_at=(val)
|
110
|
+
@partner_created_at = val.to_i
|
111
|
+
end
|
112
|
+
def views=(val)
|
113
|
+
@views = val.to_i
|
114
|
+
end
|
115
|
+
def plays=(val)
|
116
|
+
@plays = val.to_i
|
117
|
+
end
|
118
|
+
def entries_count=(val)
|
119
|
+
@entries_count = val.to_i
|
120
|
+
end
|
121
|
+
def total_entries_count=(val)
|
122
|
+
@total_entries_count = val.to_i
|
123
|
+
end
|
124
|
+
def video_entries_count=(val)
|
125
|
+
@video_entries_count = val.to_i
|
126
|
+
end
|
127
|
+
def image_entries_count=(val)
|
128
|
+
@image_entries_count = val.to_i
|
129
|
+
end
|
130
|
+
def audio_entries_count=(val)
|
131
|
+
@audio_entries_count = val.to_i
|
132
|
+
end
|
133
|
+
def mix_entries_count=(val)
|
134
|
+
@mix_entries_count = val.to_i
|
135
|
+
end
|
136
|
+
def bandwidth=(val)
|
137
|
+
@bandwidth = val.to_f
|
138
|
+
end
|
139
|
+
def total_storage=(val)
|
140
|
+
@total_storage = val.to_f
|
141
|
+
end
|
142
|
+
def storage=(val)
|
143
|
+
@storage = val.to_f
|
144
|
+
end
|
145
|
+
def deleted_storage=(val)
|
146
|
+
@deleted_storage = val.to_f
|
147
|
+
end
|
148
|
+
def peak_storage=(val)
|
149
|
+
@peak_storage = val.to_f
|
150
|
+
end
|
151
|
+
def avg_storage=(val)
|
152
|
+
@avg_storage = val.to_f
|
153
|
+
end
|
154
|
+
def combined_storage_bandwidth=(val)
|
155
|
+
@combined_storage_bandwidth = val.to_f
|
156
|
+
end
|
157
|
+
def transcoding_usage=(val)
|
158
|
+
@transcoding_usage = val.to_f
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
class KalturaPartnerUsageListResponse < KalturaObjectBase
|
163
|
+
attr_accessor :total
|
164
|
+
attr_accessor :objects
|
165
|
+
attr_accessor :total_count
|
166
|
+
|
167
|
+
def total_count=(val)
|
168
|
+
@total_count = val.to_i
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
class KalturaVarPartnerUsageTotalItem < KalturaVarPartnerUsageItem
|
173
|
+
|
174
|
+
end
|
175
|
+
|
176
|
+
class KalturaVarConsolePartnerFilter < KalturaPartnerFilter
|
177
|
+
# Eq filter for the partner's group type
|
178
|
+
#
|
179
|
+
attr_accessor :group_type_eq
|
180
|
+
# In filter for the partner's group type
|
181
|
+
#
|
182
|
+
attr_accessor :group_type_in
|
183
|
+
# Filter for partner permissions- filter contains comma-separated string of permission names which the returned partners should have.
|
184
|
+
#
|
185
|
+
attr_accessor :partner_permissions_exist
|
186
|
+
|
187
|
+
def group_type_eq=(val)
|
188
|
+
@group_type_eq = val.to_i
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
|
193
|
+
# Utility service for the Multi-publishers console
|
194
|
+
#
|
195
|
+
class KalturaVarConsoleService < KalturaServiceBase
|
196
|
+
def initialize(client)
|
197
|
+
super(client)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Function which calulates partner usage of a group of a VAR's sub-publishers
|
201
|
+
#
|
202
|
+
def get_partner_usage(partner_filter=KalturaNotImplemented, usage_filter=KalturaNotImplemented, pager=KalturaNotImplemented)
|
203
|
+
kparams = {}
|
204
|
+
client.add_param(kparams, 'partnerFilter', partner_filter);
|
205
|
+
client.add_param(kparams, 'usageFilter', usage_filter);
|
206
|
+
client.add_param(kparams, 'pager', pager);
|
207
|
+
client.queue_service_action_call('varconsole_varconsole', 'getPartnerUsage', kparams);
|
208
|
+
if (client.is_multirequest)
|
209
|
+
return nil;
|
210
|
+
end
|
211
|
+
return client.do_queue();
|
212
|
+
end
|
213
|
+
|
214
|
+
# Function to change a sub-publisher's status
|
215
|
+
#
|
216
|
+
def update_status(id, status)
|
217
|
+
kparams = {}
|
218
|
+
client.add_param(kparams, 'id', id);
|
219
|
+
client.add_param(kparams, 'status', status);
|
220
|
+
client.queue_service_action_call('varconsole_varconsole', 'updateStatus', kparams);
|
221
|
+
if (client.is_multirequest)
|
222
|
+
return nil;
|
223
|
+
end
|
224
|
+
return client.do_queue();
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
class KalturaClient < KalturaClientBase
|
229
|
+
attr_reader :var_console_service
|
230
|
+
def var_console_service
|
231
|
+
if (@var_console_service == nil)
|
232
|
+
@var_console_service = KalturaVarConsoleService.new(self)
|
233
|
+
end
|
234
|
+
return @var_console_service
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|