velir_kaltura-ruby 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION.yml +1 -1
- data/lib/kaltura/kaltura_client.rb +8 -0
- data/lib/kaltura/service/access_control_service.rb +75 -3
- data/lib/kaltura/service/admin_user_service.rb +43 -2
- data/lib/kaltura/service/base_entry_service.rb +219 -8
- data/lib/kaltura/service/base_service.rb +23 -1
- data/lib/kaltura/service/bulk_upload_service.rb +51 -1
- data/lib/kaltura/service/category_service.rb +76 -1
- data/lib/kaltura/service/conversion_profile_service.rb +79 -1
- data/lib/kaltura/service/data_service.rb +77 -0
- data/lib/kaltura/service/email_ingestion_profile_service.rb +77 -2
- data/lib/kaltura/service/flavor_asset_service.rb +102 -2
- data/lib/kaltura/service/flavor_params_service.rb +67 -0
- data/lib/kaltura/service/live_stream_service.rb +43 -2
- data/lib/kaltura/service.rb +69 -3
- data/lib/kaltura.rb +3 -3
- data/velir_kaltura-ruby.gemspec +8 -8
- metadata +6 -6
@@ -1,19 +1,74 @@
|
|
1
1
|
module Kaltura
|
2
2
|
module Service
|
3
|
+
##
|
4
|
+
# CategoryService is responsible for adding and managing Categories. Categories are the main
|
5
|
+
# means to filter entries within the KMC.
|
6
|
+
#
|
7
|
+
# @example Add a new category to the KMC filter list.
|
8
|
+
# new_category = Kaltura::Category.new
|
9
|
+
# new_category.name = "waffles"
|
10
|
+
# client.category_service.add(new_category)
|
11
|
+
#
|
12
|
+
# @example Get an existing category by ID.
|
13
|
+
# client.category_service.get(214)
|
14
|
+
#
|
15
|
+
# @example Update an existing category.
|
16
|
+
# category_update = Kaltura::Category.new
|
17
|
+
# category_update.description = "waffles are pretty freaking good."
|
18
|
+
# client.category_service.update(214,category_update)
|
19
|
+
#
|
20
|
+
# @example Delete an existing category.
|
21
|
+
# client.category_service.delete(214)
|
22
|
+
#
|
23
|
+
# @example List all categories with a parent_id of 2
|
24
|
+
# category_filter = Kaltura::Filter::CategoryFilter.new
|
25
|
+
# category_filter.parent_id_equal = 2
|
26
|
+
# client.category_service.list(category_filter)
|
27
|
+
##
|
3
28
|
class CategoryService < BaseService
|
4
|
-
|
29
|
+
|
30
|
+
##
|
31
|
+
# Adds a new Category.
|
32
|
+
#
|
33
|
+
# @param [Kaltura::Category] category The category that will be created. The crucial field to fill out is name.
|
34
|
+
#
|
35
|
+
# @return [Kaltura::Category] Returns the category as it now appears on the server. It would be beneficial to
|
36
|
+
# save the ID of the category for later reference.
|
37
|
+
#
|
38
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
39
|
+
##
|
5
40
|
def add(category)
|
6
41
|
kparams = {}
|
7
42
|
client.add_param(kparams, 'category', category)
|
8
43
|
perform_request('category','add',kparams,false)
|
9
44
|
end
|
10
45
|
|
46
|
+
##
|
47
|
+
# Retrieves a category by it's ID.
|
48
|
+
#
|
49
|
+
# @param [Integer] id The Kaltura::Category object's id.
|
50
|
+
#
|
51
|
+
# @return [Kaltura::Category] The requested category.
|
52
|
+
#
|
53
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
54
|
+
##
|
11
55
|
def get(id)
|
12
56
|
kparams = {}
|
13
57
|
client.add_param(kparams, 'id', id)
|
14
58
|
perform_request('category','get',kparams,false)
|
15
59
|
end
|
16
60
|
|
61
|
+
##
|
62
|
+
# Updates a category.
|
63
|
+
# The best practice as with all updates would be to insantiate a new Kaltura::Category and update specific fields.
|
64
|
+
#
|
65
|
+
# @param [Integer] id The Kaltura::Category id of the category to be updated.
|
66
|
+
# @param [Kaltura::Category] A newly insantiated Category object with the fields updated that you'd like to update.
|
67
|
+
#
|
68
|
+
# @return [Kaltura::Category] The new and improved Category object.
|
69
|
+
#
|
70
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
71
|
+
##
|
17
72
|
def update(id, category)
|
18
73
|
kparams = {}
|
19
74
|
client.add_param(kparams, 'id', id)
|
@@ -21,12 +76,32 @@ module Kaltura
|
|
21
76
|
perform_request('category','update',kparams,false)
|
22
77
|
end
|
23
78
|
|
79
|
+
##
|
80
|
+
# Deletes the requested Category.
|
81
|
+
# I am fairly confident that this will not actually clear the category from each entry, but it is no longer
|
82
|
+
# a filter on the KMC.
|
83
|
+
#
|
84
|
+
# @param [Integer] id The category ID to remove.
|
85
|
+
#
|
86
|
+
# @return [nil] Returns nothing.
|
87
|
+
#
|
88
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
89
|
+
##
|
24
90
|
def delete(id)
|
25
91
|
kparams = {}
|
26
92
|
client.add_param(kparams, 'id', id)
|
27
93
|
perform_request('category','delete',kparams,false)
|
28
94
|
end
|
29
95
|
|
96
|
+
##
|
97
|
+
# Lists all Categories given the specified filter.
|
98
|
+
#
|
99
|
+
# @param [Kaltura::Filter::CategoryFilter] filter The filter to apply.
|
100
|
+
#
|
101
|
+
# @return [Kaltura::Response::CategoryListResponse] Wrapper for Kaltura::Response::BaseResponse.
|
102
|
+
#
|
103
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
104
|
+
##
|
30
105
|
def list(filter=nil)
|
31
106
|
kparams = {}
|
32
107
|
client.add_param(kparams, 'filter', filter)
|
@@ -1,19 +1,78 @@
|
|
1
1
|
module Kaltura
|
2
2
|
module Service
|
3
|
+
|
4
|
+
##
|
5
|
+
# The Conversion Profile Service is responsible for adding and managing conversion profiles.
|
6
|
+
#
|
7
|
+
# @example Create a new conversion profile:
|
8
|
+
# conversion_profile = Kaltura::ConversionProfile.new
|
9
|
+
# conversion_profile.name = "waffles"
|
10
|
+
# conversion_profile.is_default = "true"
|
11
|
+
# conversion_profile.clip_duration = 15
|
12
|
+
# client.conversion_profile_service.add(conversion_profile)
|
13
|
+
#
|
14
|
+
# @example Retrieve a conversion profile:
|
15
|
+
# client.conversion_profile_service.get(224)
|
16
|
+
#
|
17
|
+
# @example Update a conversion profile:
|
18
|
+
# update_profile = Kaltura::ConversionProfile.new
|
19
|
+
# update_profile.description = "why does the documentor love waffles so much?"
|
20
|
+
# update_profile.clip_start = 3
|
21
|
+
# client.conversion_profile_service.update(224,update_profile)
|
22
|
+
#
|
23
|
+
# @example Delete a conversion profile:
|
24
|
+
# client.conversion_profile_service.delete(224)
|
25
|
+
#
|
26
|
+
# @example Retrieve all conversion profiles with an ID of 224
|
27
|
+
# filter = Kaltura::Filter::ConversionProfileFilter.new
|
28
|
+
# filter.id_equal = 224
|
29
|
+
# client.conversion_profile_service.list(filter)
|
30
|
+
##
|
3
31
|
class ConversionProfileService < BaseService
|
4
32
|
|
33
|
+
##
|
34
|
+
# Adds a new conversion profile.
|
35
|
+
#
|
36
|
+
# @param [Kaltura::ConversionProfile] conversion_profile The new conversion profile.
|
37
|
+
#
|
38
|
+
# @return [Kaltura::ConversionProfile] The conversion profile as it is stored on the Kaltura server.
|
39
|
+
# It might be important to store the ID returned.
|
40
|
+
#
|
41
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
42
|
+
##
|
5
43
|
def add(conversion_profile)
|
6
44
|
kparams = {}
|
7
45
|
client.add_param(kparams, 'conversionProfile', conversion_profile)
|
8
46
|
perform_request('conversionProfile','add',kparams,false)
|
9
47
|
end
|
10
|
-
|
48
|
+
|
49
|
+
##
|
50
|
+
# Retrieves a conversion profile by ID.
|
51
|
+
#
|
52
|
+
# @param [Integer] id The conversion profile ID.
|
53
|
+
#
|
54
|
+
# @return [Kaltura::ConversionProfile] The requested conversion profile.
|
55
|
+
#
|
56
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
57
|
+
##
|
11
58
|
def get(id)
|
12
59
|
kparams = {}
|
13
60
|
client.add_param(kparams, 'id', id)
|
14
61
|
perform_request('conversionProfile','get',kparams,false)
|
15
62
|
end
|
16
63
|
|
64
|
+
##
|
65
|
+
# Updates a conversion profile given an ID and a newly instantiated ConversionProfile.
|
66
|
+
# It will update any populated fields on the provided profile.
|
67
|
+
#
|
68
|
+
# @param [Integer] id The conversion profile ID.
|
69
|
+
# @param [Kaltura::ConversionProfile] conversion_profile Newly instantiated conversion profile with
|
70
|
+
# the fields to update.
|
71
|
+
#
|
72
|
+
# @return [Kaltura::ConversionProfile] Returns an updated conversion profile.
|
73
|
+
#
|
74
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
75
|
+
##
|
17
76
|
def update(id, conversion_profile)
|
18
77
|
kparams = {}
|
19
78
|
client.add_param(kparams, 'id', id)
|
@@ -21,12 +80,31 @@ module Kaltura
|
|
21
80
|
perform_request('conversionProfile','update',kparams,false)
|
22
81
|
end
|
23
82
|
|
83
|
+
##
|
84
|
+
# Deletes a conversion profile by ID.
|
85
|
+
#
|
86
|
+
# @param [Integer] id The conversion profile ID.
|
87
|
+
#
|
88
|
+
# @return [nil] Returns nothing.
|
89
|
+
#
|
90
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
91
|
+
##
|
24
92
|
def delete(id)
|
25
93
|
kparams = {}
|
26
94
|
client.add_param(kparams, 'id', id)
|
27
95
|
perform_request('conversionProfile','delete',kparams,false)
|
28
96
|
end
|
29
97
|
|
98
|
+
##
|
99
|
+
# Lists conversion profiles given a filter with paging support for larger result sets.
|
100
|
+
#
|
101
|
+
# @param [Kaltura::Filter::ConversionProfileFilter] filter The filter to apply to the list.
|
102
|
+
# @param [Kaltura::FilterPager] pager Default Kaltura Pager.
|
103
|
+
#
|
104
|
+
# @return [Kaltura::Response::ConversionProfileListResponse] Wrapper for Kaltura::Response::BaseResponse.
|
105
|
+
#
|
106
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
107
|
+
##
|
30
108
|
def list(filter=nil, pager=nil)
|
31
109
|
kparams = {}
|
32
110
|
client.add_param(kparams, 'filter', filter)
|
@@ -1,13 +1,58 @@
|
|
1
1
|
module Kaltura
|
2
2
|
module Service
|
3
|
+
##
|
4
|
+
# The Data Service allows you to add and manage texual content.
|
5
|
+
#
|
6
|
+
# @example Creating a new DataEntry:
|
7
|
+
# new_data_entry = Kaltura::DataEntry.new
|
8
|
+
# new_data_entry.name = "pancake"
|
9
|
+
# new_data_entry.data_content = "We all know that waffles are better. But the documentation author is tired."
|
10
|
+
# client.data_entry_service.add(new_data_entry)
|
11
|
+
#
|
12
|
+
# @example Retrieve a DataEntry:
|
13
|
+
# client.data_entry_service.get('1_ad342xk')
|
14
|
+
#
|
15
|
+
# @example Update a DataEntry:
|
16
|
+
# update_entry = Kaltura::DataEntry.new
|
17
|
+
# update_entry.data_content = 'Ninjas <3 waffles. Pirates love the pancakes.'
|
18
|
+
# client.data_entry_service.update('1_ad342xk',update_entry)
|
19
|
+
#
|
20
|
+
# @example Delete a DataEntry:
|
21
|
+
# client.data_entry_service.delete('1_ad342xk')
|
22
|
+
#
|
23
|
+
# @example Filter DataEntries by group ID 2:
|
24
|
+
# filter = Kaltura::Filter::DataEntryFilter.new
|
25
|
+
# filter.group_id_equal = '2'
|
26
|
+
# client.data_entry_service.list(filter)
|
27
|
+
##
|
3
28
|
class DataService < BaseService
|
4
29
|
|
30
|
+
##
|
31
|
+
# Adds a new data entry.
|
32
|
+
#
|
33
|
+
# @param [Kaltura::DataEntry] data_entry This is essentially a BaseEntry except there
|
34
|
+
# is a field called data_content. Presumably you shove text into this field.
|
35
|
+
#
|
36
|
+
# @return [Kaltura::DataEntry] Returns the data entry as it is stored in the DB.
|
37
|
+
#
|
38
|
+
# @raise [Kaltura::APIError] Raises the default Kaltura errors.
|
39
|
+
##
|
5
40
|
def add(data_entry)
|
6
41
|
kparams = {}
|
7
42
|
client.add_param(kparams, 'dataEntry', data_entry)
|
8
43
|
perform_request('data','add',kparams,false)
|
9
44
|
end
|
10
45
|
|
46
|
+
##
|
47
|
+
# Gets a data entry by ID.
|
48
|
+
#
|
49
|
+
# @param [String] entry_id the DataEntry id.
|
50
|
+
# @param [Integer] version Version of the DataEntry.
|
51
|
+
#
|
52
|
+
# @return [Kaltura::DataEntry] Returns the desired DataEntry object.
|
53
|
+
#
|
54
|
+
# @raise [Kaltura::APIError] Raises the default Kaltura errors in addition to 'ENTRY_ID_NOT_FOUND'.
|
55
|
+
##
|
11
56
|
def get(entry_id, version=-1)
|
12
57
|
kparams = {}
|
13
58
|
client.add_param(kparams, 'entryId', entry_id)
|
@@ -15,6 +60,19 @@ module Kaltura
|
|
15
60
|
perform_request('data','get',kparams,false)
|
16
61
|
end
|
17
62
|
|
63
|
+
##
|
64
|
+
# Updates a data entry.
|
65
|
+
# As with other update actions, the best practice is to instantiate a new Kaltura::DataEntry object
|
66
|
+
# and set the fields of that object that you wish to change.
|
67
|
+
#
|
68
|
+
# @param [String] entry_id The DataEntry you wish to update.
|
69
|
+
# @param [Kaltura::DataEntry] document_entry A newly instantiated DataEntry object with only
|
70
|
+
# the fields that you wish to update filled in.
|
71
|
+
#
|
72
|
+
# @return [Kaltura::DataEntry] Returns the updated DataEntry object complete with a version bump.
|
73
|
+
#
|
74
|
+
# @raise [Kaltura::APIError] Raises the default Kaltura errors in addition to 'ENTRY_ID_NOT_FOUND'.
|
75
|
+
##
|
18
76
|
def update(entry_id, document_entry)
|
19
77
|
kparams = {}
|
20
78
|
client.add_param(kparams, 'entryId', entry_id)
|
@@ -22,12 +80,31 @@ module Kaltura
|
|
22
80
|
perform_request('data','update',kparams,false)
|
23
81
|
end
|
24
82
|
|
83
|
+
##
|
84
|
+
# Removes a DataEntry object.
|
85
|
+
#
|
86
|
+
# @param [String] entry_id the DataEntry to delete.
|
87
|
+
#
|
88
|
+
# @return [nil] Returns nothing.
|
89
|
+
#
|
90
|
+
# @raise [Kaltura::APIError] Raises the default Kaltura errors in addition to 'ENTRY_ID_NOT_FOUND'.
|
91
|
+
##
|
25
92
|
def delete(entry_id)
|
26
93
|
kparams = {}
|
27
94
|
client.add_param(kparams, 'entryId', entry_id)
|
28
95
|
perform_request('data','delete',kparams,false)
|
29
96
|
end
|
30
97
|
|
98
|
+
##
|
99
|
+
# Lists DataEntry objects with the given filter and paging support for larger sets of data.
|
100
|
+
#
|
101
|
+
# @param [Kaltura::Filter::DataEntryFilter] filter The filter to apply to the list.
|
102
|
+
# @param [Kaltura::FilterPager] pager The default Kaltura pager.
|
103
|
+
#
|
104
|
+
# @return [Kaltura::Response::DataListResponse] Wrapper for Kaltura::Response::BaseResponse.
|
105
|
+
#
|
106
|
+
# @raise [Kaltura::APIError] Raises the default Kaltura errrors.
|
107
|
+
##
|
31
108
|
def list(filter=nil, pager=nil)
|
32
109
|
kparams = {}
|
33
110
|
client.add_param(kparams, 'filter', filter)
|
@@ -1,25 +1,73 @@
|
|
1
1
|
module Kaltura
|
2
2
|
module Service
|
3
|
+
##
|
4
|
+
# The Email Ingestion Profile Service allows you to manage email ingestion profile records.
|
5
|
+
##
|
3
6
|
class EmailIngestionProfileService < BaseService
|
4
|
-
|
7
|
+
|
8
|
+
##
|
9
|
+
# Adds an email ingestion profile to the Kaltura Database.
|
10
|
+
#
|
11
|
+
# @param [Kaltura::EmailIngestionProfile] email_ip The email ingestion profile to add.
|
12
|
+
#
|
13
|
+
# @return [Kaltura::EmailIngestionProfile] Returns the email ingestion profile as stored on the DB.
|
14
|
+
# It might be important to store either the email_address or ID fields for later.
|
15
|
+
#
|
16
|
+
# @raise [Kaltura::APIError] Raises 'EMAIL INGESTION PROFILE EMAIL EXISTS' if there is another profile using
|
17
|
+
# the email address provided.
|
18
|
+
##
|
5
19
|
def add(email_ip)
|
6
20
|
kparams = {}
|
7
21
|
client.add_param(kparams, 'EmailIP', email_ip)
|
8
22
|
perform_request('EmailIngestionProfile','add',kparams,false)
|
9
23
|
end
|
10
|
-
|
24
|
+
|
25
|
+
##
|
26
|
+
# Retrieves an email ingestion profile by the email_address field.
|
27
|
+
#
|
28
|
+
# @param [String] email_address The email address to find the profile with.
|
29
|
+
#
|
30
|
+
# @return [Kaltura::EmailIngestionProfile] The requested email ingestion profile.
|
31
|
+
#
|
32
|
+
# @raise [Kaltura::APIError] Raises 'EMAIL INGESTION PROFILE NOT FOUND' if there isnt a profile with the
|
33
|
+
# email address provided.
|
34
|
+
##
|
11
35
|
def get_by_email_address(email_address)
|
12
36
|
kparams = {}
|
13
37
|
client.add_param(kparams, 'emailAddress', email_address)
|
14
38
|
perform_request('EmailIngestionProfile','getByEmailAddress',kparams,false)
|
15
39
|
end
|
16
40
|
|
41
|
+
##
|
42
|
+
# Retrieves an email ingestion profile by ID.
|
43
|
+
#
|
44
|
+
# @param [Integer] id The ID of the email ingestion profile to find.
|
45
|
+
#
|
46
|
+
# @return [Kaltura::EmailIngestionProfile] The requested email ingestion profile.
|
47
|
+
#
|
48
|
+
# @raise [Kaltura::APIError] Raises 'EMAIL INGESTION PROFILE NOT FOUND' if there isnt a profile with the
|
49
|
+
# email address provided.
|
50
|
+
##
|
17
51
|
def get(id)
|
18
52
|
kparams = {}
|
19
53
|
client.add_param(kparams, 'id', id)
|
20
54
|
perform_request('EmailIngestionProfile','get',kparams,false)
|
21
55
|
end
|
22
56
|
|
57
|
+
##
|
58
|
+
# Updates an existing email ingestion profile.
|
59
|
+
# As with other update API actions it is a best practice to instantiate a new EmailIngestionProfile object
|
60
|
+
# and populate the fields with the fields you wish to change of the existing object.
|
61
|
+
#
|
62
|
+
# @param [Integer] id The ID of the email ingestion profile you wish to update.
|
63
|
+
# @param [Kaltura::EmailIngestionProfile] email_ip The newly instantiated email ingestion profile object
|
64
|
+
# with the fields you wish to update.
|
65
|
+
#
|
66
|
+
# @return [Kaltura::EmailIngestionProfile] Returns the updated object with a new version.
|
67
|
+
#
|
68
|
+
# @raise [Kaltura::APIError] Raises 'EMAIL INGESTION PROFILE NOT FOUND' if there isnt a profile with the
|
69
|
+
# email address provided.
|
70
|
+
##
|
23
71
|
def update(id, email_ip)
|
24
72
|
kparams = {}
|
25
73
|
client.add_param(kparams, 'id', id)
|
@@ -27,12 +75,39 @@ module Kaltura
|
|
27
75
|
perform_request('EmailIngestionProfile','update',kparams,false)
|
28
76
|
end
|
29
77
|
|
78
|
+
##
|
79
|
+
# Deletes an email ingestion profile by ID.
|
80
|
+
#
|
81
|
+
# @param [Integer] id The ID of the email ingestion profile to delete.
|
82
|
+
#
|
83
|
+
# @return [nil] Returns nothing.
|
84
|
+
#
|
85
|
+
# @raise [Kaltura::APIError] Raises 'EMAIL INGESTION PROFILE NOT FOUND' if there isnt a profile with the
|
86
|
+
# email address provided.
|
87
|
+
##
|
30
88
|
def delete(id)
|
31
89
|
kparams = {}
|
32
90
|
client.add_param(kparams, 'id', id)
|
33
91
|
perform_request('EmailIngestionProfile','delete',kparams,false)
|
34
92
|
end
|
35
93
|
|
94
|
+
##
|
95
|
+
# Adds a Kaltura::MediaEntry from a email ingestion profile.
|
96
|
+
# I'm not entirely sure what the aim of this upload action is, rather than
|
97
|
+
# using the media service itself.
|
98
|
+
#
|
99
|
+
# @param [Kaltura::MediaEntry] media_entry A newly instantiated media entry object that will be created
|
100
|
+
# in the database.
|
101
|
+
# @param [String] upload_token_id The upload token provided by the media service's upload action.
|
102
|
+
# @param [Integer] email_profile_id The email ingestion profile ID.
|
103
|
+
# @param [String] from_address The email address the action is coming from?
|
104
|
+
# @param [String] email_msg_id The ID of the email message?
|
105
|
+
#
|
106
|
+
# @return [Kaltura::MediaEntry] The newly created media entry as stored in the kaltura database.
|
107
|
+
# It would be beneficial to store the entry_id of this object for later.
|
108
|
+
#
|
109
|
+
# @raise [Kaltura::APIError] Raises 'UPLOADED_FILE_NOT_FOUND_BY_TOKEN' when the upload token cannot be found.
|
110
|
+
##
|
36
111
|
def add_media_entry(media_entry, upload_token_id, email_prof_id, from_address, email_msg_id)
|
37
112
|
kparams = {}
|
38
113
|
client.add_param(kparams, 'mediaEntry', media_entry)
|
@@ -1,25 +1,89 @@
|
|
1
1
|
module Kaltura
|
2
2
|
module Service
|
3
|
+
|
4
|
+
##
|
5
|
+
# The Flavor Asset Service allows you to retrieve information and invoke actions on flavor assets.
|
6
|
+
#
|
7
|
+
# @example Add a new flavor to a media entry:
|
8
|
+
# client.flavor_asset_service.convert('1_qa32a3ax',22)
|
9
|
+
#
|
10
|
+
# @example Retrieve a flavor by flavor_id:
|
11
|
+
# client.flavor_asset_service.get('0_as35a2r3a')
|
12
|
+
#
|
13
|
+
# @example Retrieve all flavors for a media entry:
|
14
|
+
# client.flavor_asset_service.get_by_entry_id('1_qa32a3ax')
|
15
|
+
#
|
16
|
+
# @example Retrieve all the web playable flavors for a media entry:
|
17
|
+
# client.flavor_asset_service.get_web_playable_by_entry_id('1_qa32a3ax')
|
18
|
+
#
|
19
|
+
# @example Reconvert a specific Flavor:
|
20
|
+
# client.flavor_asset_service.get('0_as35a2r3a')
|
21
|
+
#
|
22
|
+
# @example Delete a Flavor:
|
23
|
+
# client.flavor_asset_service.delete('0_as35a2r3a')
|
24
|
+
#
|
25
|
+
# @example Retrieve a URL to download a specific flavor:
|
26
|
+
# client.flavor_asset_service.get_download_url('0_as35a2r3a')
|
27
|
+
#
|
28
|
+
##
|
3
29
|
class FlavorAssetService < BaseService
|
4
30
|
|
31
|
+
##
|
32
|
+
# Retrieves an individual flavor asset by ID.
|
33
|
+
#
|
34
|
+
# @param [String] id A flavor asset ID closely resembles an entry_id as Kaltura flavors are
|
35
|
+
# very close in nature to entries.
|
36
|
+
#
|
37
|
+
# @return [Kaltura::FlavorAsset] Returns the requested flavor asset.
|
38
|
+
#
|
39
|
+
# @raise [Kaltura::APIError] Raises the default Kaltura errors.
|
40
|
+
##
|
5
41
|
def get(id)
|
6
42
|
kparams = {}
|
7
43
|
client.add_param(kparams, 'id', id)
|
8
44
|
perform_request('flavorAsset','get',kparams,false)
|
9
45
|
end
|
10
46
|
|
47
|
+
##
|
48
|
+
# Retrieves an enumerable collection of flavor assets given a media entry id.
|
49
|
+
#
|
50
|
+
# @param [String] entry_id The media entry ID to seek flavors for.
|
51
|
+
#
|
52
|
+
# @return [Array] Returns an array of the flavor assets for a given media entry.
|
53
|
+
#
|
54
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
55
|
+
##
|
11
56
|
def get_by_entry_id(entry_id)
|
12
57
|
kparams = {}
|
13
58
|
client.add_param(kparams, 'entryId', entry_id)
|
14
59
|
perform_request('flavorAsset','getByEntryId',kparams,false)
|
15
60
|
end
|
16
|
-
|
61
|
+
|
62
|
+
##
|
63
|
+
# Retrieves an enumerable collection of flavor assets that are playable within the KDP for a given media entry ID.
|
64
|
+
#
|
65
|
+
# @param [String] entry_id The media entry ID to seek flavors for.
|
66
|
+
#
|
67
|
+
# @return [Array] Returns an array of the flavor assets for a given media entry.
|
68
|
+
#
|
69
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
70
|
+
##
|
17
71
|
def get_web_playable_by_entry_id(entry_id)
|
18
72
|
kparams = {}
|
19
73
|
client.add_param(kparams, 'entryId', entry_id)
|
20
74
|
perform_request('flavorAsset','getWebPlayableByEntryId',kparams,false)
|
21
75
|
end
|
22
76
|
|
77
|
+
##
|
78
|
+
# Add and convert a new flavor asset for a specified entry given a flavor param.
|
79
|
+
#
|
80
|
+
# @param [String] entry_id The media entry ID to add a new flavor asset to.
|
81
|
+
# @param [Integer] flavor_params_id The flavor params ID for conversion type.
|
82
|
+
#
|
83
|
+
# @return [nil] Returns nothing.
|
84
|
+
#
|
85
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
86
|
+
##
|
23
87
|
def convert(entry_id, flavor_params_id)
|
24
88
|
kparams = {}
|
25
89
|
client.add_param(kparams, 'entryId', entry_id)
|
@@ -27,24 +91,60 @@ module Kaltura
|
|
27
91
|
perform_request('flavorAsset','convert',kparams,false)
|
28
92
|
end
|
29
93
|
|
94
|
+
##
|
95
|
+
# Reconvert a specific flavor asset.
|
96
|
+
#
|
97
|
+
# @param [String] id The flavor asset id.
|
98
|
+
#
|
99
|
+
# @return [nil] Returns nothing.
|
100
|
+
#
|
101
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
102
|
+
##
|
30
103
|
def reconvert(id)
|
31
104
|
kparams = {}
|
32
105
|
client.add_param(kparams, 'id', id)
|
33
106
|
perform_request('flavorAsset','reconvert',kparams,false)
|
34
107
|
end
|
35
108
|
|
109
|
+
##
|
110
|
+
# Removes a flavor asset.
|
111
|
+
#
|
112
|
+
# @param [String] id Flavor asset to remove.
|
113
|
+
#
|
114
|
+
# @return [nil] Returns nothing.
|
115
|
+
#
|
116
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
117
|
+
##
|
36
118
|
def delete(id)
|
37
119
|
kparams = {}
|
38
120
|
client.add_param(kparams, 'id', id)
|
39
121
|
perform_request('flavorAsset','delete',kparams,false)
|
40
122
|
end
|
41
123
|
|
124
|
+
##
|
125
|
+
# Gets a downloadable URL for a flavor asset.
|
126
|
+
#
|
127
|
+
# @param [String] id The flavor asset id.
|
128
|
+
#
|
129
|
+
# @return [String] a URL that can be used to download the requested flavor.
|
130
|
+
#
|
131
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
132
|
+
##
|
42
133
|
def get_download_url(id)
|
43
134
|
kparams = {}
|
44
135
|
client.add_param(kparams, 'id', id)
|
45
136
|
perform_request('flavorAsset','getDownloadUrl',kparams,false)
|
46
137
|
end
|
47
|
-
|
138
|
+
|
139
|
+
##
|
140
|
+
# Retrieves an enumerable collection of Flavor Assets + Flavor Params given a media entry.
|
141
|
+
#
|
142
|
+
# @param [String] entry_id The media entry to retrieve flavors from.
|
143
|
+
#
|
144
|
+
# @return [Array] Returns a collection of Flavor Assets + Flavor Params.
|
145
|
+
#
|
146
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors.
|
147
|
+
##
|
48
148
|
def get_flavor_assets_with_params(entry_id)
|
49
149
|
kparams = {}
|
50
150
|
client.add_param(kparams, 'entryId', entry_id)
|