kaltura-client 14.15.0 → 14.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,150 @@
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
+
30
+ module Kaltura
31
+
32
+ class KalturaConfMapsStatus
33
+ STATUS_DISABLED = 0
34
+ STATUS_ENABLED = 1
35
+ end
36
+
37
+ class KalturaConfMaps < KalturaObjectBase
38
+ # Name of the map
39
+ attr_accessor :name
40
+ # Ini file content
41
+ attr_accessor :content
42
+ # IsEditable - true / false
43
+ attr_accessor :is_editable
44
+ # Time of the last update
45
+ attr_accessor :last_update
46
+ # Regex that represent the host/s that this map affect
47
+ attr_accessor :related_host
48
+ attr_accessor :version
49
+ attr_accessor :source_location
50
+ attr_accessor :remarks
51
+ # map status
52
+ attr_accessor :status
53
+
54
+ def is_editable=(val)
55
+ @is_editable = to_b(val)
56
+ end
57
+ def last_update=(val)
58
+ @last_update = val.to_i
59
+ end
60
+ def version=(val)
61
+ @version = val.to_i
62
+ end
63
+ def status=(val)
64
+ @status = val.to_i
65
+ end
66
+
67
+ def from_xml(xml_element)
68
+ super
69
+ if xml_element.elements['name'] != nil
70
+ self.name = xml_element.elements['name'].text
71
+ end
72
+ if xml_element.elements['content'] != nil
73
+ self.content = xml_element.elements['content'].text
74
+ end
75
+ if xml_element.elements['isEditable'] != nil
76
+ self.is_editable = xml_element.elements['isEditable'].text
77
+ end
78
+ if xml_element.elements['lastUpdate'] != nil
79
+ self.last_update = xml_element.elements['lastUpdate'].text
80
+ end
81
+ if xml_element.elements['relatedHost'] != nil
82
+ self.related_host = xml_element.elements['relatedHost'].text
83
+ end
84
+ if xml_element.elements['version'] != nil
85
+ self.version = xml_element.elements['version'].text
86
+ end
87
+ if xml_element.elements['sourceLocation'] != nil
88
+ self.source_location = xml_element.elements['sourceLocation'].text
89
+ end
90
+ if xml_element.elements['remarks'] != nil
91
+ self.remarks = xml_element.elements['remarks'].text
92
+ end
93
+ if xml_element.elements['status'] != nil
94
+ self.status = xml_element.elements['status'].text
95
+ end
96
+ end
97
+
98
+ end
99
+
100
+ class KalturaConfMapsListResponse < KalturaListResponse
101
+ attr_accessor :objects
102
+
103
+
104
+ def from_xml(xml_element)
105
+ super
106
+ if xml_element.elements['objects'] != nil
107
+ self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaConfMaps')
108
+ end
109
+ end
110
+
111
+ end
112
+
113
+ class KalturaConfMapsBaseFilter < KalturaRelatedFilter
114
+ attr_accessor :name_equal
115
+ attr_accessor :related_host_equal
116
+ attr_accessor :version_equal
117
+
118
+ def version_equal=(val)
119
+ @version_equal = val.to_i
120
+ end
121
+
122
+ def from_xml(xml_element)
123
+ super
124
+ if xml_element.elements['nameEqual'] != nil
125
+ self.name_equal = xml_element.elements['nameEqual'].text
126
+ end
127
+ if xml_element.elements['relatedHostEqual'] != nil
128
+ self.related_host_equal = xml_element.elements['relatedHostEqual'].text
129
+ end
130
+ if xml_element.elements['versionEqual'] != nil
131
+ self.version_equal = xml_element.elements['versionEqual'].text
132
+ end
133
+ end
134
+
135
+ end
136
+
137
+ class KalturaConfMapsFilter < KalturaConfMapsBaseFilter
138
+
139
+
140
+ def from_xml(xml_element)
141
+ super
142
+ end
143
+
144
+ end
145
+
146
+
147
+ class KalturaClient < KalturaClientBase
148
+ end
149
+
150
+ end
@@ -51,6 +51,14 @@ module Kaltura
51
51
  PDF = 1
52
52
  end
53
53
 
54
+ class KalturaScoreType
55
+ HIGHEST = 1
56
+ LOWEST = 2
57
+ LATEST = 3
58
+ FIRST = 4
59
+ AVERAGE = 5
60
+ end
61
+
54
62
  class KalturaThumbCuePointSubType
55
63
  SLIDE = 1
56
64
  CHAPTER = 2
@@ -193,6 +193,8 @@ module Kaltura
193
193
 
194
194
  class KalturaESearchUserOrderByFieldName
195
195
  CREATED_AT = "created_at"
196
+ USER_ID = "puser_id"
197
+ SCREEN_NAME = "screen_name"
196
198
  UPDATED_AT = "updated_at"
197
199
  end
198
200
 
@@ -214,6 +216,28 @@ module Kaltura
214
216
 
215
217
  end
216
218
 
219
+ class KalturaESearchOrderByItem < KalturaObjectBase
220
+ attr_accessor :sort_order
221
+
222
+
223
+ def from_xml(xml_element)
224
+ super
225
+ if xml_element.elements['sortOrder'] != nil
226
+ self.sort_order = xml_element.elements['sortOrder'].text
227
+ end
228
+ end
229
+
230
+ end
231
+
232
+ class KalturaESearchBaseFilter < KalturaObjectBase
233
+
234
+
235
+ def from_xml(xml_element)
236
+ super
237
+ end
238
+
239
+ end
240
+
217
241
  class KalturaESearchCategoryBaseItem < KalturaESearchBaseItem
218
242
 
219
243
 
@@ -347,14 +371,14 @@ module Kaltura
347
371
 
348
372
  end
349
373
 
350
- class KalturaESearchOrderByItem < KalturaObjectBase
351
- attr_accessor :sort_order
374
+ class KalturaESearchGroupResult < KalturaESearchResult
375
+ attr_accessor :object
352
376
 
353
377
 
354
378
  def from_xml(xml_element)
355
379
  super
356
- if xml_element.elements['sortOrder'] != nil
357
- self.sort_order = xml_element.elements['sortOrder'].text
380
+ if xml_element.elements['object'] != nil
381
+ self.object = KalturaClientBase.object_from_xml(xml_element.elements['object'], 'KalturaGroup')
358
382
  end
359
383
  end
360
384
 
@@ -687,6 +711,45 @@ module Kaltura
687
711
 
688
712
  end
689
713
 
714
+ class KalturaESearchGroupOrderByItem < KalturaESearchOrderByItem
715
+ attr_accessor :sort_field
716
+
717
+
718
+ def from_xml(xml_element)
719
+ super
720
+ if xml_element.elements['sortField'] != nil
721
+ self.sort_field = xml_element.elements['sortField'].text
722
+ end
723
+ end
724
+
725
+ end
726
+
727
+ class KalturaESearchGroupParams < KalturaESearchParams
728
+ attr_accessor :search_operator
729
+
730
+
731
+ def from_xml(xml_element)
732
+ super
733
+ if xml_element.elements['searchOperator'] != nil
734
+ self.search_operator = KalturaClientBase.object_from_xml(xml_element.elements['searchOperator'], 'KalturaESearchGroupOperator')
735
+ end
736
+ end
737
+
738
+ end
739
+
740
+ class KalturaESearchGroupResponse < KalturaESearchResponse
741
+ attr_accessor :objects
742
+
743
+
744
+ def from_xml(xml_element)
745
+ super
746
+ if xml_element.elements['objects'] != nil
747
+ self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaESearchGroupResult')
748
+ end
749
+ end
750
+
751
+ end
752
+
690
753
  class KalturaESearchMetadataItemData < KalturaESearchItemData
691
754
  attr_accessor :xpath
692
755
  attr_accessor :metadata_profile_id
@@ -1201,6 +1264,18 @@ module Kaltura
1201
1264
  return client.do_queue()
1202
1265
  end
1203
1266
 
1267
+ # @return [KalturaESearchGroupResponse]
1268
+ def search_group(search_params, pager=KalturaNotImplemented)
1269
+ kparams = {}
1270
+ client.add_param(kparams, 'searchParams', search_params)
1271
+ client.add_param(kparams, 'pager', pager)
1272
+ client.queue_service_action_call('elasticsearch_esearch', 'searchGroup', 'KalturaESearchGroupResponse', kparams)
1273
+ if (client.is_multirequest)
1274
+ return nil
1275
+ end
1276
+ return client.do_queue()
1277
+ end
1278
+
1204
1279
  # @return [KalturaESearchUserResponse]
1205
1280
  def search_user(search_params, pager=KalturaNotImplemented)
1206
1281
  kparams = {}
@@ -0,0 +1,275 @@
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_elastic_search_client_plugin.rb'
30
+
31
+ module Kaltura
32
+
33
+ class KalturaESearchGroupFieldName
34
+ CREATED_AT = "created_at"
35
+ EMAIL = "email"
36
+ FIRST_NAME = "first_name"
37
+ GROUP_IDS = "group_ids"
38
+ LAST_NAME = "last_name"
39
+ PERMISSION_NAMES = "permission_names"
40
+ ROLE_IDS = "role_ids"
41
+ SCREEN_NAME = "screen_name"
42
+ TAGS = "tags"
43
+ UPDATED_AT = "updated_at"
44
+ USER_ID = "user_id"
45
+ end
46
+
47
+ class KalturaESearchGroupOrderByFieldName
48
+ CREATED_AT = "created_at"
49
+ MEMBERS_COUNT = "members_count"
50
+ USER_ID = "puser_id"
51
+ SCREEN_NAME = "screen_name"
52
+ UPDATED_AT = "updated_at"
53
+ end
54
+
55
+ class KalturaESearchGroupBaseItem < KalturaESearchBaseItem
56
+
57
+
58
+ def from_xml(xml_element)
59
+ super
60
+ end
61
+
62
+ end
63
+
64
+ class KalturaGroup < KalturaBaseUser
65
+ attr_accessor :members_count
66
+
67
+ def members_count=(val)
68
+ @members_count = val.to_i
69
+ end
70
+
71
+ def from_xml(xml_element)
72
+ super
73
+ if xml_element.elements['membersCount'] != nil
74
+ self.members_count = xml_element.elements['membersCount'].text
75
+ end
76
+ end
77
+
78
+ end
79
+
80
+ class KalturaESearchGroupOperator < KalturaESearchGroupBaseItem
81
+ attr_accessor :operator
82
+ attr_accessor :search_items
83
+
84
+ def operator=(val)
85
+ @operator = val.to_i
86
+ end
87
+
88
+ def from_xml(xml_element)
89
+ super
90
+ if xml_element.elements['operator'] != nil
91
+ self.operator = xml_element.elements['operator'].text
92
+ end
93
+ if xml_element.elements['searchItems'] != nil
94
+ self.search_items = KalturaClientBase.object_from_xml(xml_element.elements['searchItems'], 'KalturaESearchGroupBaseItem')
95
+ end
96
+ end
97
+
98
+ end
99
+
100
+ class KalturaGroupListResponse < KalturaListResponse
101
+ attr_accessor :objects
102
+
103
+
104
+ def from_xml(xml_element)
105
+ super
106
+ if xml_element.elements['objects'] != nil
107
+ self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaGroup')
108
+ end
109
+ end
110
+
111
+ end
112
+
113
+ class KalturaESearchAbstractGroupItem < KalturaESearchGroupBaseItem
114
+ attr_accessor :search_term
115
+ attr_accessor :item_type
116
+ attr_accessor :range
117
+ attr_accessor :add_highlight
118
+
119
+ def item_type=(val)
120
+ @item_type = val.to_i
121
+ end
122
+ def add_highlight=(val)
123
+ @add_highlight = to_b(val)
124
+ end
125
+
126
+ def from_xml(xml_element)
127
+ super
128
+ if xml_element.elements['searchTerm'] != nil
129
+ self.search_term = xml_element.elements['searchTerm'].text
130
+ end
131
+ if xml_element.elements['itemType'] != nil
132
+ self.item_type = xml_element.elements['itemType'].text
133
+ end
134
+ if xml_element.elements['range'] != nil
135
+ self.range = KalturaClientBase.object_from_xml(xml_element.elements['range'], 'KalturaESearchRange')
136
+ end
137
+ if xml_element.elements['addHighlight'] != nil
138
+ self.add_highlight = xml_element.elements['addHighlight'].text
139
+ end
140
+ end
141
+
142
+ end
143
+
144
+ class KalturaESearchGroupItem < KalturaESearchAbstractGroupItem
145
+ attr_accessor :field_name
146
+
147
+
148
+ def from_xml(xml_element)
149
+ super
150
+ if xml_element.elements['fieldName'] != nil
151
+ self.field_name = xml_element.elements['fieldName'].text
152
+ end
153
+ end
154
+
155
+ end
156
+
157
+ class KalturaESearchGroupMetadataItem < KalturaESearchAbstractGroupItem
158
+ attr_accessor :xpath
159
+ attr_accessor :metadata_profile_id
160
+ attr_accessor :metadata_field_id
161
+
162
+ def metadata_profile_id=(val)
163
+ @metadata_profile_id = val.to_i
164
+ end
165
+ def metadata_field_id=(val)
166
+ @metadata_field_id = val.to_i
167
+ end
168
+
169
+ def from_xml(xml_element)
170
+ super
171
+ if xml_element.elements['xpath'] != nil
172
+ self.xpath = xml_element.elements['xpath'].text
173
+ end
174
+ if xml_element.elements['metadataProfileId'] != nil
175
+ self.metadata_profile_id = xml_element.elements['metadataProfileId'].text
176
+ end
177
+ if xml_element.elements['metadataFieldId'] != nil
178
+ self.metadata_field_id = xml_element.elements['metadataFieldId'].text
179
+ end
180
+ end
181
+
182
+ end
183
+
184
+ class KalturaGroupFilter < KalturaUserFilter
185
+
186
+
187
+ def from_xml(xml_element)
188
+ super
189
+ end
190
+
191
+ end
192
+
193
+
194
+ class KalturaGroupService < KalturaServiceBase
195
+ def initialize(client)
196
+ super(client)
197
+ end
198
+
199
+ # Adds a new group (user of type group).
200
+ # @return [KalturaGroup]
201
+ def add(group)
202
+ kparams = {}
203
+ client.add_param(kparams, 'group', group)
204
+ client.queue_service_action_call('group_group', 'add', 'KalturaGroup', kparams)
205
+ if (client.is_multirequest)
206
+ return nil
207
+ end
208
+ return client.do_queue()
209
+ end
210
+
211
+ # Delete group by ID
212
+ # @return [KalturaGroup]
213
+ def delete(group_id)
214
+ kparams = {}
215
+ client.add_param(kparams, 'groupId', group_id)
216
+ client.queue_service_action_call('group_group', 'delete', 'KalturaGroup', kparams)
217
+ if (client.is_multirequest)
218
+ return nil
219
+ end
220
+ return client.do_queue()
221
+ end
222
+
223
+ # Retrieves a group object for a specified group ID.
224
+ # @return [KalturaGroup]
225
+ def get(group_id)
226
+ kparams = {}
227
+ client.add_param(kparams, 'groupId', group_id)
228
+ client.queue_service_action_call('group_group', 'get', 'KalturaGroup', kparams)
229
+ if (client.is_multirequest)
230
+ return nil
231
+ end
232
+ return client.do_queue()
233
+ end
234
+
235
+ # Lists group objects that are associated with an account.
236
+ # Blocked users are listed unless you use a filter to exclude them.
237
+ # Deleted users are not listed unless you use a filter to include them.
238
+ # @return [KalturaGroupListResponse]
239
+ def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
240
+ kparams = {}
241
+ client.add_param(kparams, 'filter', filter)
242
+ client.add_param(kparams, 'pager', pager)
243
+ client.queue_service_action_call('group_group', 'list', 'KalturaGroupListResponse', kparams)
244
+ if (client.is_multirequest)
245
+ return nil
246
+ end
247
+ return client.do_queue()
248
+ end
249
+
250
+ # Update group by ID
251
+ # @return [KalturaGroup]
252
+ def update(group_id, group)
253
+ kparams = {}
254
+ client.add_param(kparams, 'groupId', group_id)
255
+ client.add_param(kparams, 'group', group)
256
+ client.queue_service_action_call('group_group', 'update', 'KalturaGroup', kparams)
257
+ if (client.is_multirequest)
258
+ return nil
259
+ end
260
+ return client.do_queue()
261
+ end
262
+ end
263
+
264
+ class KalturaClient < KalturaClientBase
265
+ attr_reader :group_service
266
+ def group_service
267
+ if (@group_service == nil)
268
+ @group_service = KalturaGroupService.new(self)
269
+ end
270
+ return @group_service
271
+ end
272
+
273
+ end
274
+
275
+ end