kaltura-client 15.19.0 → 16.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,165 @@
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-2020 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 KalturaRatingCountOrderBy
33
+ end
34
+
35
+ class KalturaRatingCount < KalturaObjectBase
36
+ attr_accessor :entry_id
37
+ attr_accessor :rank
38
+ attr_accessor :count
39
+
40
+ def rank=(val)
41
+ @rank = val.to_i
42
+ end
43
+ def count=(val)
44
+ @count = val.to_i
45
+ end
46
+
47
+ def from_xml(xml_element)
48
+ super
49
+ if xml_element.elements['entryId'] != nil
50
+ self.entry_id = xml_element.elements['entryId'].text
51
+ end
52
+ if xml_element.elements['rank'] != nil
53
+ self.rank = xml_element.elements['rank'].text
54
+ end
55
+ if xml_element.elements['count'] != nil
56
+ self.count = xml_element.elements['count'].text
57
+ end
58
+ end
59
+
60
+ end
61
+
62
+ class KalturaRatingCountListResponse < KalturaListResponse
63
+ attr_accessor :objects
64
+
65
+
66
+ def from_xml(xml_element)
67
+ super
68
+ if xml_element.elements['objects'] != nil
69
+ self.objects = KalturaClientBase.object_from_xml(xml_element.elements['objects'], 'KalturaRatingCount')
70
+ end
71
+ end
72
+
73
+ end
74
+
75
+ class KalturaRatingCountBaseFilter < KalturaRelatedFilter
76
+ attr_accessor :entry_id_equal
77
+ attr_accessor :rank_in
78
+
79
+
80
+ def from_xml(xml_element)
81
+ super
82
+ if xml_element.elements['entryIdEqual'] != nil
83
+ self.entry_id_equal = xml_element.elements['entryIdEqual'].text
84
+ end
85
+ if xml_element.elements['rankIn'] != nil
86
+ self.rank_in = xml_element.elements['rankIn'].text
87
+ end
88
+ end
89
+
90
+ end
91
+
92
+ class KalturaRatingCountFilter < KalturaRatingCountBaseFilter
93
+
94
+
95
+ def from_xml(xml_element)
96
+ super
97
+ end
98
+
99
+ end
100
+
101
+
102
+ # Allows user to manipulate their entry rating
103
+ class KalturaRatingService < KalturaServiceBase
104
+ def initialize(client)
105
+ super(client)
106
+ end
107
+
108
+ # @return [int]
109
+ def check_rating(entry_id)
110
+ kparams = {}
111
+ client.add_param(kparams, 'entryId', entry_id)
112
+ client.queue_service_action_call('rating_rating', 'checkRating', 'int', kparams)
113
+ if (client.is_multirequest)
114
+ return nil
115
+ end
116
+ return client.do_queue()
117
+ end
118
+
119
+ # @return [KalturaRatingCountListResponse]
120
+ def get_rating_counts(filter)
121
+ kparams = {}
122
+ client.add_param(kparams, 'filter', filter)
123
+ client.queue_service_action_call('rating_rating', 'getRatingCounts', 'KalturaRatingCountListResponse', kparams)
124
+ if (client.is_multirequest)
125
+ return nil
126
+ end
127
+ return client.do_queue()
128
+ end
129
+
130
+ # @return [int]
131
+ def rate(entry_id, rank)
132
+ kparams = {}
133
+ client.add_param(kparams, 'entryId', entry_id)
134
+ client.add_param(kparams, 'rank', rank)
135
+ client.queue_service_action_call('rating_rating', 'rate', 'int', kparams)
136
+ if (client.is_multirequest)
137
+ return nil
138
+ end
139
+ return client.do_queue()
140
+ end
141
+
142
+ # @return [bool]
143
+ def remove_rating(entry_id)
144
+ kparams = {}
145
+ client.add_param(kparams, 'entryId', entry_id)
146
+ client.queue_service_action_call('rating_rating', 'removeRating', 'bool', kparams)
147
+ if (client.is_multirequest)
148
+ return nil
149
+ end
150
+ return client.do_queue()
151
+ end
152
+ end
153
+
154
+ class KalturaClient < KalturaClientBase
155
+ attr_reader :rating_service
156
+ def rating_service
157
+ if (@rating_service == nil)
158
+ @rating_service = KalturaRatingService.new(self)
159
+ end
160
+ return @rating_service
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -27,6 +27,7 @@
27
27
  # ===================================================================================================
28
28
  require 'kaltura_client.rb'
29
29
  require File.dirname(__FILE__) + '/kaltura_event_notification_client_plugin.rb'
30
+ require File.dirname(__FILE__) + '/kaltura_bulk_upload_client_plugin.rb'
30
31
 
31
32
  module Kaltura
32
33
 
@@ -87,6 +88,13 @@ module Kaltura
87
88
  class KalturaVendorServiceTurnAroundTime
88
89
  BEST_EFFORT = -1
89
90
  IMMEDIATE = 0
91
+ ONE_BUSINESS_DAY = 1
92
+ TWO_BUSINESS_DAYS = 2
93
+ THREE_BUSINESS_DAYS = 3
94
+ FOUR_BUSINESS_DAYS = 4
95
+ FIVE_BUSINESS_DAYS = 5
96
+ SIX_BUSINESS_DAYS = 6
97
+ SEVEN_BUSINESS_DAYS = 7
90
98
  THIRTY_MINUTES = 1800
91
99
  TWO_HOURS = 7200
92
100
  THREE_HOURS = 10800
@@ -286,6 +294,7 @@ module Kaltura
286
294
  attr_accessor :expected_finish_time
287
295
  attr_accessor :service_type
288
296
  attr_accessor :service_feature
297
+ attr_accessor :turn_around_time
289
298
 
290
299
  def id=(val)
291
300
  @id = val.to_i
@@ -335,6 +344,9 @@ module Kaltura
335
344
  def service_feature=(val)
336
345
  @service_feature = val.to_i
337
346
  end
347
+ def turn_around_time=(val)
348
+ @turn_around_time = val.to_i
349
+ end
338
350
 
339
351
  def from_xml(xml_element)
340
352
  super
@@ -422,6 +434,9 @@ module Kaltura
422
434
  if xml_element.elements['serviceFeature'] != nil
423
435
  self.service_feature = xml_element.elements['serviceFeature'].text
424
436
  end
437
+ if xml_element.elements['turnAroundTime'] != nil
438
+ self.turn_around_time = xml_element.elements['turnAroundTime'].text
439
+ end
425
440
  end
426
441
 
427
442
  end
@@ -702,30 +717,6 @@ module Kaltura
702
717
 
703
718
  end
704
719
 
705
- class KalturaAlignmentVendorTaskData < KalturaVendorTaskData
706
- # The id of the text transcript object the vendor should use while runing the alignment task
707
- attr_accessor :text_transcript_asset_id
708
- # Optional - The id of the json transcript object the vendor should update once alignment task processing is done
709
- attr_accessor :json_transcript_asset_id
710
- # Optional - The id of the caption asset object the vendor should update once alignment task processing is done
711
- attr_accessor :caption_asset_id
712
-
713
-
714
- def from_xml(xml_element)
715
- super
716
- if xml_element.elements['textTranscriptAssetId'] != nil
717
- self.text_transcript_asset_id = xml_element.elements['textTranscriptAssetId'].text
718
- end
719
- if xml_element.elements['jsonTranscriptAssetId'] != nil
720
- self.json_transcript_asset_id = xml_element.elements['jsonTranscriptAssetId'].text
721
- end
722
- if xml_element.elements['captionAssetId'] != nil
723
- self.caption_asset_id = xml_element.elements['captionAssetId'].text
724
- end
725
- end
726
-
727
- end
728
-
729
720
  class KalturaCatalogItemAdvancedFilter < KalturaSearchItem
730
721
  attr_accessor :service_type_equal
731
722
  attr_accessor :service_type_in
@@ -1004,6 +995,39 @@ module Kaltura
1004
995
 
1005
996
  end
1006
997
 
998
+ class KalturaVendorTaskDataCaptionAsset < KalturaVendorTaskData
999
+ # Optional - The id of the caption asset object
1000
+ attr_accessor :caption_asset_id
1001
+
1002
+
1003
+ def from_xml(xml_element)
1004
+ super
1005
+ if xml_element.elements['captionAssetId'] != nil
1006
+ self.caption_asset_id = xml_element.elements['captionAssetId'].text
1007
+ end
1008
+ end
1009
+
1010
+ end
1011
+
1012
+ class KalturaAlignmentVendorTaskData < KalturaVendorTaskDataCaptionAsset
1013
+ # The id of the text transcript object the vendor should use while runing the alignment task
1014
+ attr_accessor :text_transcript_asset_id
1015
+ # Optional - The id of the json transcript object the vendor should update once alignment task processing is done
1016
+ attr_accessor :json_transcript_asset_id
1017
+
1018
+
1019
+ def from_xml(xml_element)
1020
+ super
1021
+ if xml_element.elements['textTranscriptAssetId'] != nil
1022
+ self.text_transcript_asset_id = xml_element.elements['textTranscriptAssetId'].text
1023
+ end
1024
+ if xml_element.elements['jsonTranscriptAssetId'] != nil
1025
+ self.json_transcript_asset_id = xml_element.elements['jsonTranscriptAssetId'].text
1026
+ end
1027
+ end
1028
+
1029
+ end
1030
+
1007
1031
  class KalturaEntryVendorTaskBaseFilter < KalturaRelatedFilter
1008
1032
  attr_accessor :id_equal
1009
1033
  attr_accessor :id_in
@@ -1293,6 +1317,15 @@ module Kaltura
1293
1317
 
1294
1318
  end
1295
1319
 
1320
+ class KalturaTranslationVendorTaskData < KalturaVendorTaskDataCaptionAsset
1321
+
1322
+
1323
+ def from_xml(xml_element)
1324
+ super
1325
+ end
1326
+
1327
+ end
1328
+
1296
1329
  class KalturaVendorCatalogItemBaseFilter < KalturaRelatedFilter
1297
1330
  attr_accessor :id_equal
1298
1331
  attr_accessor :id_in
@@ -1560,6 +1593,20 @@ module Kaltura
1560
1593
  return client.do_queue()
1561
1594
  end
1562
1595
 
1596
+ # @return [KalturaBulkUpload]
1597
+ def add_from_bulk_upload(file_data, bulk_upload_data=KalturaNotImplemented, bulk_upload_vendor_catalog_item_data=KalturaNotImplemented)
1598
+ kparams = {}
1599
+ kfiles = {}
1600
+ client.add_param(kfiles, 'fileData', file_data)
1601
+ client.add_param(kparams, 'bulkUploadData', bulk_upload_data)
1602
+ client.add_param(kparams, 'bulkUploadVendorCatalogItemData', bulk_upload_vendor_catalog_item_data)
1603
+ client.queue_service_action_call('reach_vendorcatalogitem', 'addFromBulkUpload', 'KalturaBulkUpload', kparams, kfiles)
1604
+ if (client.is_multirequest)
1605
+ return nil
1606
+ end
1607
+ return client.do_queue()
1608
+ end
1609
+
1563
1610
  # Delete vedor catalog item object
1564
1611
  # @return []
1565
1612
  def delete(id)
@@ -1584,6 +1631,17 @@ module Kaltura
1584
1631
  return client.do_queue()
1585
1632
  end
1586
1633
 
1634
+ # @return [string]
1635
+ def get_serve_url(vendor_partner_id=KalturaNotImplemented)
1636
+ kparams = {}
1637
+ client.add_param(kparams, 'vendorPartnerId', vendor_partner_id)
1638
+ client.queue_service_action_call('reach_vendorcatalogitem', 'getServeUrl', 'string', kparams)
1639
+ if (client.is_multirequest)
1640
+ return nil
1641
+ end
1642
+ return client.do_queue()
1643
+ end
1644
+
1587
1645
  # List KalturaVendorCatalogItem objects
1588
1646
  # @return [KalturaVendorCatalogItemListResponse]
1589
1647
  def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
@@ -1597,6 +1655,14 @@ module Kaltura
1597
1655
  return client.do_queue()
1598
1656
  end
1599
1657
 
1658
+ # @return [file]
1659
+ def serve(vendor_partner_id=KalturaNotImplemented)
1660
+ kparams = {}
1661
+ client.add_param(kparams, 'vendorPartnerId', vendor_partner_id)
1662
+ client.queue_service_action_call('reach_vendorcatalogitem', 'serve', 'file', kparams)
1663
+ return client.get_serve_url()
1664
+ end
1665
+
1600
1666
  # Update an existing vedor catalog item object
1601
1667
  # @return [KalturaVendorCatalogItem]
1602
1668
  def update(id, vendor_catalog_item)
@@ -0,0 +1,51 @@
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-2020 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 KalturaRegistrationUserEntry < KalturaUserEntry
33
+
34
+
35
+ def from_xml(xml_element)
36
+ super
37
+ end
38
+
39
+ end
40
+
41
+ class KalturaRegistrationUserEntryFilter < KalturaUserEntryFilter
42
+
43
+
44
+ def from_xml(xml_element)
45
+ super
46
+ end
47
+
48
+ end
49
+
50
+
51
+ end
@@ -336,6 +336,8 @@ module Kaltura
336
336
  attr_accessor :input_entitled_users_edit
337
337
  # The input entitled users publish to set on the entry
338
338
  attr_accessor :input_entitled_users_publish
339
+ # Should clear the media repurposing data and therefore reset the process
340
+ attr_accessor :reset_media_repurposing_process
339
341
 
340
342
  def input_metadata_profile_id=(val)
341
343
  @input_metadata_profile_id = val.to_i
@@ -343,6 +345,9 @@ module Kaltura
343
345
  def output_metadata_profile_id=(val)
344
346
  @output_metadata_profile_id = val.to_i
345
347
  end
348
+ def reset_media_repurposing_process=(val)
349
+ @reset_media_repurposing_process = to_b(val)
350
+ end
346
351
 
347
352
  def from_xml(xml_element)
348
353
  super
@@ -367,6 +372,9 @@ module Kaltura
367
372
  if xml_element.elements['inputEntitledUsersPublish'] != nil
368
373
  self.input_entitled_users_publish = xml_element.elements['inputEntitledUsersPublish'].text
369
374
  end
375
+ if xml_element.elements['resetMediaRepurposingProcess'] != nil
376
+ self.reset_media_repurposing_process = xml_element.elements['resetMediaRepurposingProcess'].text
377
+ end
370
378
  end
371
379
 
372
380
  end
@@ -0,0 +1,160 @@
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-2020 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 KalturaSipServerNodeOrderBy
33
+ CREATED_AT_ASC = "+createdAt"
34
+ HEARTBEAT_TIME_ASC = "+heartbeatTime"
35
+ UPDATED_AT_ASC = "+updatedAt"
36
+ CREATED_AT_DESC = "-createdAt"
37
+ HEARTBEAT_TIME_DESC = "-heartbeatTime"
38
+ UPDATED_AT_DESC = "-updatedAt"
39
+ end
40
+
41
+ class KalturaSipEntryServerNode < KalturaEntryServerNode
42
+ attr_accessor :sip_room_id
43
+ attr_accessor :sip_primary_adp_id
44
+ attr_accessor :sip_secondary_adp_id
45
+
46
+
47
+ def from_xml(xml_element)
48
+ super
49
+ if xml_element.elements['sipRoomId'] != nil
50
+ self.sip_room_id = xml_element.elements['sipRoomId'].text
51
+ end
52
+ if xml_element.elements['sipPrimaryAdpId'] != nil
53
+ self.sip_primary_adp_id = xml_element.elements['sipPrimaryAdpId'].text
54
+ end
55
+ if xml_element.elements['sipSecondaryAdpId'] != nil
56
+ self.sip_secondary_adp_id = xml_element.elements['sipSecondaryAdpId'].text
57
+ end
58
+ end
59
+
60
+ end
61
+
62
+ class KalturaSipServerNode < KalturaServerNode
63
+
64
+
65
+ def from_xml(xml_element)
66
+ super
67
+ end
68
+
69
+ end
70
+
71
+ class KalturaSipEntryServerNodeBaseFilter < KalturaEntryServerNodeFilter
72
+
73
+
74
+ def from_xml(xml_element)
75
+ super
76
+ end
77
+
78
+ end
79
+
80
+ class KalturaSipServerNodeBaseFilter < KalturaServerNodeFilter
81
+
82
+
83
+ def from_xml(xml_element)
84
+ super
85
+ end
86
+
87
+ end
88
+
89
+ class KalturaSipEntryServerNodeFilter < KalturaSipEntryServerNodeBaseFilter
90
+
91
+
92
+ def from_xml(xml_element)
93
+ super
94
+ end
95
+
96
+ end
97
+
98
+ class KalturaSipServerNodeFilter < KalturaSipServerNodeBaseFilter
99
+
100
+
101
+ def from_xml(xml_element)
102
+ super
103
+ end
104
+
105
+ end
106
+
107
+
108
+ class KalturaPexipService < KalturaServiceBase
109
+ def initialize(client)
110
+ super(client)
111
+ end
112
+
113
+ # @return [string]
114
+ def generate_sip_url(entry_id, regenerate=false)
115
+ kparams = {}
116
+ client.add_param(kparams, 'entryId', entry_id)
117
+ client.add_param(kparams, 'regenerate', regenerate)
118
+ client.queue_service_action_call('sip_pexip', 'generateSipUrl', 'string', kparams)
119
+ if (client.is_multirequest)
120
+ return nil
121
+ end
122
+ return client.do_queue()
123
+ end
124
+
125
+ # @return [bool]
126
+ def handle_incoming_call()
127
+ kparams = {}
128
+ client.queue_service_action_call('sip_pexip', 'handleIncomingCall', 'bool', kparams)
129
+ if (client.is_multirequest)
130
+ return nil
131
+ end
132
+ return client.do_queue()
133
+ end
134
+
135
+ # @return [array]
136
+ def list_rooms(offset=0, page_size=500, active_only=false)
137
+ kparams = {}
138
+ client.add_param(kparams, 'offset', offset)
139
+ client.add_param(kparams, 'pageSize', page_size)
140
+ client.add_param(kparams, 'activeOnly', active_only)
141
+ client.queue_service_action_call('sip_pexip', 'listRooms', 'KalturaStringValue', kparams)
142
+ if (client.is_multirequest)
143
+ return nil
144
+ end
145
+ return client.do_queue()
146
+ end
147
+ end
148
+
149
+ class KalturaClient < KalturaClientBase
150
+ attr_reader :pexip_service
151
+ def pexip_service
152
+ if (@pexip_service == nil)
153
+ @pexip_service = KalturaPexipService.new(self)
154
+ end
155
+ return @pexip_service
156
+ end
157
+
158
+ end
159
+
160
+ end