goncalossilva_kaltura-ruby 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +7 -0
- data/LICENSE +661 -0
- data/README.markdown +56 -0
- data/README.rdoc +54 -0
- data/Rakefile +61 -0
- data/VERSION +1 -0
- data/VERSION.yml +5 -0
- data/goncalossilva_kaltura-ruby.gemspec +179 -0
- data/lib/kaltura.rb +19 -0
- data/lib/kaltura/constants.rb +77 -0
- data/lib/kaltura/constants/access_control_order_by.rb +14 -0
- data/lib/kaltura/constants/audio_codec.rb +16 -0
- data/lib/kaltura/constants/base.rb +61 -0
- data/lib/kaltura/constants/batch_job.rb +87 -0
- data/lib/kaltura/constants/bit_rate_mode.rb +14 -0
- data/lib/kaltura/constants/category_order_by.rb +18 -0
- data/lib/kaltura/constants/commercial_use_type.rb +14 -0
- data/lib/kaltura/constants/container_format.rb +21 -0
- data/lib/kaltura/constants/control_panel_command.rb +49 -0
- data/lib/kaltura/constants/conversion_profile_order_by.rb +14 -0
- data/lib/kaltura/constants/country_restriction_type.rb +16 -0
- data/lib/kaltura/constants/data_entry_order_by.rb +20 -0
- data/lib/kaltura/constants/directory_restriction_type.rb +14 -0
- data/lib/kaltura/constants/document.rb +39 -0
- data/lib/kaltura/constants/duration_type.rb +16 -0
- data/lib/kaltura/constants/editor_type.rb +14 -0
- data/lib/kaltura/constants/email_ingestion_profile_status.rb +14 -0
- data/lib/kaltura/constants/entry.rb +59 -0
- data/lib/kaltura/constants/file_sync.rb +67 -0
- data/lib/kaltura/constants/flavor_asset_status.rb +18 -0
- data/lib/kaltura/constants/gender.rb +15 -0
- data/lib/kaltura/constants/google_syndication_feed.rb +39 -0
- data/lib/kaltura/constants/i_tunes_syndication_feed.rb +42 -0
- data/lib/kaltura/constants/i_tunes_syndication_feed/categories.rb +82 -0
- data/lib/kaltura/constants/license_type.rb +29 -0
- data/lib/kaltura/constants/live_stream_admin_entry_order_by.rb +31 -0
- data/lib/kaltura/constants/mail_job_order_by.rb +16 -0
- data/lib/kaltura/constants/media.rb +55 -0
- data/lib/kaltura/constants/mix_entry_order_by.rb +28 -0
- data/lib/kaltura/constants/moderation.rb +34 -0
- data/lib/kaltura/constants/notification.rb +43 -0
- data/lib/kaltura/constants/nullable_boolean.rb +14 -0
- data/lib/kaltura/constants/partner.rb +64 -0
- data/lib/kaltura/constants/playable_entry_order_by.rb +28 -0
- data/lib/kaltura/constants/playlist.rb +35 -0
- data/lib/kaltura/constants/report_type.rb +24 -0
- data/lib/kaltura/constants/search_provider_type.rb +29 -0
- data/lib/kaltura/constants/session_type.rb +14 -0
- data/lib/kaltura/constants/site_restriction_type.rb +14 -0
- data/lib/kaltura/constants/source_type.rb +17 -0
- data/lib/kaltura/constants/stats.rb +49 -0
- data/lib/kaltura/constants/stats/kmc_event_type.rb +77 -0
- data/lib/kaltura/constants/syndication_feed.rb +37 -0
- data/lib/kaltura/constants/system_user.rb +17 -0
- data/lib/kaltura/constants/tube_mogul_syndication_feed.rb +34 -0
- data/lib/kaltura/constants/ui_conf.rb +26 -0
- data/lib/kaltura/constants/upload_error_code.rb +9 -0
- data/lib/kaltura/constants/user.rb +16 -0
- data/lib/kaltura/constants/video_codec.rb +16 -0
- data/lib/kaltura/constants/widget.rb +15 -0
- data/lib/kaltura/constants/yahoo_syndication_feed.rb +44 -0
- data/lib/kaltura/filter.rb +75 -0
- data/lib/kaltura/filter/access_control_filter.rb +20 -0
- data/lib/kaltura/filter/base_entry_filter.rb +115 -0
- data/lib/kaltura/filter/base_filter.rb +7 -0
- data/lib/kaltura/filter/base_job_filter.rb +28 -0
- data/lib/kaltura/filter/batch_job_filter.rb +54 -0
- data/lib/kaltura/filter/category_filter.rb +23 -0
- data/lib/kaltura/filter/control_panel_command_filter.rb +39 -0
- data/lib/kaltura/filter/conversion_profile_filter.rb +12 -0
- data/lib/kaltura/filter/document_entry_filter.rb +12 -0
- data/lib/kaltura/filter/file_sync_filter.rb +93 -0
- data/lib/kaltura/filter/flavor_params_filter.rb +11 -0
- data/lib/kaltura/filter/flavor_params_output_filter.rb +14 -0
- data/lib/kaltura/filter/media_entry_filter.rb +22 -0
- data/lib/kaltura/filter/media_entry_filter_for_playlist.rb +11 -0
- data/lib/kaltura/filter/partner_filter.rb +22 -0
- data/lib/kaltura/filter/playable_entry_filter.rb +40 -0
- data/lib/kaltura/filter/report_input_filter.rb +25 -0
- data/lib/kaltura/filter/system_partner_usage_filter.rb +15 -0
- data/lib/kaltura/filter/ui_conf_filter.rb +40 -0
- data/lib/kaltura/filter/user_filter.rb +27 -0
- data/lib/kaltura/filter/widget_filter.rb +37 -0
- data/lib/kaltura/kaltura_client.rb +1762 -0
- data/lib/kaltura/kaltura_client_base.rb +300 -0
- data/lib/kaltura/response.rb +112 -0
- data/lib/kaltura/service.rb +142 -0
- data/lib/kaltura/service/access_control_service.rb +110 -0
- data/lib/kaltura/service/admin_user_service.rb +69 -0
- data/lib/kaltura/service/base_entry_service.rb +331 -0
- data/lib/kaltura/service/base_service.rb +42 -0
- data/lib/kaltura/service/bulk_upload_service.rb +75 -0
- data/lib/kaltura/service/category_service.rb +112 -0
- data/lib/kaltura/service/conversion_profile_service.rb +116 -0
- data/lib/kaltura/service/data_service.rb +116 -0
- data/lib/kaltura/service/email_ingestion_profile_service.rb +122 -0
- data/lib/kaltura/service/flavor_asset_service.rb +155 -0
- data/lib/kaltura/service/flavor_params_service.rb +111 -0
- data/lib/kaltura/service/live_stream_service.rb +140 -0
- data/lib/kaltura/service/media_service.rb +546 -0
- data/lib/kaltura/service/mixing_service.rb +86 -0
- data/lib/kaltura/service/notification_service.rb +13 -0
- data/lib/kaltura/service/partner_service.rb +41 -0
- data/lib/kaltura/service/playlist_service.rb +73 -0
- data/lib/kaltura/service/report_service.rb +47 -0
- data/lib/kaltura/service/search_service.rb +34 -0
- data/lib/kaltura/service/session_service.rb +24 -0
- data/lib/kaltura/service/stats_service.rb +24 -0
- data/lib/kaltura/service/syndication_feed_service.rb +50 -0
- data/lib/kaltura/service/system_partner_service.rb +58 -0
- data/lib/kaltura/service/system_service.rb +11 -0
- data/lib/kaltura/service/system_user_service.rb +63 -0
- data/lib/kaltura/service/ui_conf_service.rb +51 -0
- data/lib/kaltura/service/upload_service.rb +18 -0
- data/lib/kaltura/service/user_service.rb +44 -0
- data/lib/kaltura/service/widget_service.rb +38 -0
- data/lib/kaltura/service/x_internal_service.rb +13 -0
- data/test/kaltura-ruby_test.rb +7 -0
- data/test/test.rb +23 -0
- data/test/test_2.rb +26 -0
- data/test/test_error.rb +14 -0
- data/test/test_helper.rb +10 -0
- metadata +222 -0
@@ -0,0 +1,122 @@
|
|
1
|
+
module Kaltura
|
2
|
+
module Service
|
3
|
+
##
|
4
|
+
# The Email Ingestion Profile Service allows you to manage email ingestion profile records.
|
5
|
+
##
|
6
|
+
class EmailIngestionProfileService < BaseService
|
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
|
+
##
|
19
|
+
def add(email_ip)
|
20
|
+
kparams = {}
|
21
|
+
client.add_param(kparams, 'EmailIP', email_ip)
|
22
|
+
perform_request('EmailIngestionProfile','add',kparams,false)
|
23
|
+
end
|
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
|
+
##
|
35
|
+
def get_by_email_address(email_address)
|
36
|
+
kparams = {}
|
37
|
+
client.add_param(kparams, 'emailAddress', email_address)
|
38
|
+
perform_request('EmailIngestionProfile','getByEmailAddress',kparams,false)
|
39
|
+
end
|
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
|
+
##
|
51
|
+
def get(id)
|
52
|
+
kparams = {}
|
53
|
+
client.add_param(kparams, 'id', id)
|
54
|
+
perform_request('EmailIngestionProfile','get',kparams,false)
|
55
|
+
end
|
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
|
+
##
|
71
|
+
def update(id, email_ip)
|
72
|
+
kparams = {}
|
73
|
+
client.add_param(kparams, 'id', id)
|
74
|
+
client.add_param(kparams, 'EmailIP', email_ip)
|
75
|
+
perform_request('EmailIngestionProfile','update',kparams,false)
|
76
|
+
end
|
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
|
+
##
|
88
|
+
def delete(id)
|
89
|
+
kparams = {}
|
90
|
+
client.add_param(kparams, 'id', id)
|
91
|
+
perform_request('EmailIngestionProfile','delete',kparams,false)
|
92
|
+
end
|
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
|
+
##
|
111
|
+
def add_media_entry(media_entry, upload_token_id, email_prof_id, from_address, email_msg_id)
|
112
|
+
kparams = {}
|
113
|
+
client.add_param(kparams, 'mediaEntry', media_entry)
|
114
|
+
client.add_param(kparams, 'uploadTokenId', upload_token_id)
|
115
|
+
client.add_param(kparams, 'emailProfId', email_prof_id)
|
116
|
+
client.add_param(kparams, 'fromAddress', from_address)
|
117
|
+
client.add_param(kparams, 'emailMsgId', email_msg_id)
|
118
|
+
perform_request('EmailIngestionProfile','addMediaEntry',kparams,false)
|
119
|
+
end
|
120
|
+
end #class EmailIngestionProfileService
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
module Kaltura
|
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
|
+
##
|
29
|
+
class FlavorAssetService < BaseService
|
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
|
+
##
|
41
|
+
def get(id)
|
42
|
+
kparams = {}
|
43
|
+
client.add_param(kparams, 'id', id)
|
44
|
+
perform_request('flavorAsset','get',kparams,false)
|
45
|
+
end
|
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
|
+
##
|
56
|
+
def get_by_entry_id(entry_id)
|
57
|
+
kparams = {}
|
58
|
+
client.add_param(kparams, 'entryId', entry_id)
|
59
|
+
perform_request('flavorAsset','getByEntryId',kparams,false)
|
60
|
+
end
|
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
|
+
##
|
71
|
+
def get_web_playable_by_entry_id(entry_id)
|
72
|
+
kparams = {}
|
73
|
+
client.add_param(kparams, 'entryId', entry_id)
|
74
|
+
perform_request('flavorAsset','getWebPlayableByEntryId',kparams,false)
|
75
|
+
end
|
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
|
+
##
|
87
|
+
def convert(entry_id, flavor_params_id)
|
88
|
+
kparams = {}
|
89
|
+
client.add_param(kparams, 'entryId', entry_id)
|
90
|
+
client.add_param(kparams, 'flavorParamsId', flavor_params_id)
|
91
|
+
perform_request('flavorAsset','convert',kparams,false)
|
92
|
+
end
|
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
|
+
##
|
103
|
+
def reconvert(id)
|
104
|
+
kparams = {}
|
105
|
+
client.add_param(kparams, 'id', id)
|
106
|
+
perform_request('flavorAsset','reconvert',kparams,false)
|
107
|
+
end
|
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
|
+
##
|
118
|
+
def delete(id)
|
119
|
+
kparams = {}
|
120
|
+
client.add_param(kparams, 'id', id)
|
121
|
+
perform_request('flavorAsset','delete',kparams,false)
|
122
|
+
end
|
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
|
+
##
|
133
|
+
def get_download_url(id)
|
134
|
+
kparams = {}
|
135
|
+
client.add_param(kparams, 'id', id)
|
136
|
+
perform_request('flavorAsset','getDownloadUrl',kparams,false)
|
137
|
+
end
|
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
|
+
##
|
148
|
+
def get_flavor_assets_with_params(entry_id)
|
149
|
+
kparams = {}
|
150
|
+
client.add_param(kparams, 'entryId', entry_id)
|
151
|
+
perform_request('flavorAsset','getFlavorAssetsWithParams',kparams,false)
|
152
|
+
end
|
153
|
+
end #class FlavorAssetService
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
module Kaltura
|
2
|
+
module Service
|
3
|
+
|
4
|
+
##
|
5
|
+
# The Flavor Params service is responsible for adding and managing flavor params
|
6
|
+
##
|
7
|
+
class FlavorParamsService < BaseService
|
8
|
+
|
9
|
+
##
|
10
|
+
# Adds a new Flavor param.
|
11
|
+
#
|
12
|
+
# @param [Kaltura::FlavorParams] flavor_params The flavor params object to add to Kaltura.
|
13
|
+
#
|
14
|
+
# @return [Kaltura::FlavorParams] Returns the flavor params object as stored in the Kaltura system.
|
15
|
+
# Would be helpful to store the ID for later use.
|
16
|
+
#
|
17
|
+
# @raise [Kaltura::APIError] Raises default Kaltura API errors
|
18
|
+
##
|
19
|
+
def add(flavor_params)
|
20
|
+
kparams = {}
|
21
|
+
client.add_param(kparams, 'flavorParams', flavor_params)
|
22
|
+
perform_request('flavorParams','add',kparams,false)
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Retrieves a flavor param.
|
27
|
+
#
|
28
|
+
# @param [Integer] id The flavor param ID.
|
29
|
+
#
|
30
|
+
# @return [Kaltura::FlavorParams] The requested flavor params.
|
31
|
+
#
|
32
|
+
# @raise [Kaltura::APIError] Raises default Kaltura API errors.
|
33
|
+
##
|
34
|
+
def get(id)
|
35
|
+
kparams = {}
|
36
|
+
client.add_param(kparams, 'id', id)
|
37
|
+
perform_request('flavorParams','get',kparams,false)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Updates an existing flavor params object.
|
42
|
+
# As with other Kaltura API update actions, it is best to instantiate a new flavor params
|
43
|
+
# object instead of retrieving the existing one. You only add fields for the fields you wish to
|
44
|
+
# change.
|
45
|
+
#
|
46
|
+
# @param [Integer] id The flavor param ID.
|
47
|
+
# @param [Kaltura::FlavorParams] A newly instantiated flavor params object that contains the fields
|
48
|
+
# you wish to change on the existing flavor params object.
|
49
|
+
#
|
50
|
+
# @return [Kaltura::FlavorParams] The newly updated flavor param object. The version will have been bumped.
|
51
|
+
#
|
52
|
+
# @raise [Kaltura::APIError] Raises default Kaltura API errors.
|
53
|
+
#
|
54
|
+
##
|
55
|
+
def update(id, flavor_params)
|
56
|
+
kparams = {}
|
57
|
+
client.add_param(kparams, 'id', id)
|
58
|
+
client.add_param(kparams, 'flavorParams', flavor_params)
|
59
|
+
perform_request('flavorParams','update',kparams,false)
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Deletes the requested flavor param.
|
64
|
+
#
|
65
|
+
# @param [Integer] id The flavor param id.
|
66
|
+
#
|
67
|
+
# @return [nil] Returns nothing.
|
68
|
+
#
|
69
|
+
# @raise [Kaltura::APIError] Raises default Kaltura API errors.
|
70
|
+
##
|
71
|
+
def delete(id)
|
72
|
+
kparams = {}
|
73
|
+
client.add_param(kparams, 'id', id)
|
74
|
+
perform_request('flavorParams','delete',kparams,false)
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Lists flavor params by filter with paging support.
|
79
|
+
# In addition, all system default parameters will be listed as well.
|
80
|
+
#
|
81
|
+
# @param [Kaltura::Filter::FlavorParamsFilter] filter The filter to apply.
|
82
|
+
# @param [Kaltura::FilterPager] The default Kaltura pager.
|
83
|
+
#
|
84
|
+
# @return [Kaltura::Response::FlavorParamsListResponse] Wrapper for Kaltura::Response::BaseResponse.
|
85
|
+
#
|
86
|
+
# @raise [Kaltura::APIError] Raises default Kaltura API errors.
|
87
|
+
##
|
88
|
+
def list(filter=nil, pager=nil)
|
89
|
+
kparams = {}
|
90
|
+
client.add_param(kparams, 'filter', filter)
|
91
|
+
client.add_param(kparams, 'pager', pager)
|
92
|
+
perform_request('flavorParams','list',kparams,false)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieves all flavor params from a specific Conversion Profile.
|
97
|
+
#
|
98
|
+
# @param [Integer] conversion_profile_id The conversion profile ID.
|
99
|
+
#
|
100
|
+
# @return [Array] Returns an array of Flavor Params with a specific conversion profile.
|
101
|
+
#
|
102
|
+
# @raise [Kaltura::APIError] Raises default Kaltura API errors
|
103
|
+
##
|
104
|
+
def get_by_conversion_profile_id(conversion_profile_id)
|
105
|
+
kparams = {}
|
106
|
+
client.add_param(kparams, 'conversionProfileId', conversion_profile_id)
|
107
|
+
perform_request('flavorParams','getByConversionProfileId',kparams,false)
|
108
|
+
end
|
109
|
+
end #class FlavorParamsService
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
module Kaltura
|
2
|
+
module Service
|
3
|
+
|
4
|
+
##
|
5
|
+
# The live stream service lets you manage live stream channels.
|
6
|
+
##
|
7
|
+
class LiveStreamService < BaseService
|
8
|
+
|
9
|
+
##
|
10
|
+
# Adds a new live stream entry.
|
11
|
+
# The entry will be queued for provision. Note, this uses a LiveStreamAdminEntry instead of a
|
12
|
+
# normal LiveStreamEntry object. LiveStreamAdminEntry is a child class, and adds a few fields
|
13
|
+
# pertinent to administering a Live stream.
|
14
|
+
#
|
15
|
+
# @param [Kaltura::LiveStreamAdminEntry] live_stream_entry The live stream entry metadata.
|
16
|
+
# In order to succesfully create a live stream entry you need to have the media_type,
|
17
|
+
# encoding_ip1, and encoding_ip2 fields populated.
|
18
|
+
#
|
19
|
+
# @return [Kaltura::LiveStreamAdminEntry] Returns the live stream entry saved on the database.
|
20
|
+
# It might be a good idea to save the ID field on return.
|
21
|
+
#
|
22
|
+
# @raise [Kaltura::APIError] Raises 'PROPERTY_VALIDATION_CANNOT_BE_NULL' if media_type, encoding_ip1,
|
23
|
+
# or encoding_ip2 are null.
|
24
|
+
#
|
25
|
+
##
|
26
|
+
def add(live_stream_entry)
|
27
|
+
kparams = {}
|
28
|
+
client.add_param(kparams, 'liveStreamEntry', live_stream_entry)
|
29
|
+
perform_request('liveStream','add',kparams,false)
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# Retrieves a live stream entry by ID.
|
34
|
+
# The Kaltura API docs indicate that this action will return a LiveStreamEntry object,
|
35
|
+
# but the reality is that it will return a LiveStreamAdminEntry object instead.
|
36
|
+
#
|
37
|
+
# @param [String] entry_id The live stream entry ID.
|
38
|
+
# @param [Integer] version The version of the entry.
|
39
|
+
#
|
40
|
+
# @return [Kaltura::LiveStreamAdminEntry] The requested live stream object.
|
41
|
+
#
|
42
|
+
# @raise [Kaltura::APIError] Raises 'ENTRY_ID_NOT_FOUND' if the entry doesn't exist.
|
43
|
+
##
|
44
|
+
def get(entry_id, version=-1)
|
45
|
+
kparams = {}
|
46
|
+
client.add_param(kparams, 'entryId', entry_id)
|
47
|
+
client.add_param(kparams, 'version', version)
|
48
|
+
perform_request('liveStream','get',kparams,false)
|
49
|
+
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Updates a live stream entry object.
|
53
|
+
# Like all of the other Kaltura API update actions it is best to instantiate a new LiveStreamAdminEntry object
|
54
|
+
# instead of pulling the existing one and updating its fields.
|
55
|
+
#
|
56
|
+
# @param [String] entry_id The live stream entry ID.
|
57
|
+
# @param [Kaltura::LiveStreamEntry] live_stream_entry A LiveStreamEntry object with the fields you wish to update populated.
|
58
|
+
#
|
59
|
+
# @return [Kaltura::LiveStreamEntry] Returns the entry_id with the updated fields. It will also bump the version.
|
60
|
+
#
|
61
|
+
# @raise [Kaltura::APIError] Raises 'ENTRY_ID_NOT_FOUND' if the entry doesn't exist.
|
62
|
+
#
|
63
|
+
##
|
64
|
+
def update(entry_id, live_stream_entry)
|
65
|
+
kparams = {}
|
66
|
+
client.add_param(kparams, 'entryId', entry_id)
|
67
|
+
client.add_param(kparams, 'liveStreamEntry', live_stream_entry)
|
68
|
+
perform_request('liveStream','update',kparams,false)
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# Deletes a live stream entry object.
|
73
|
+
#
|
74
|
+
# @param [String] entry_id The live stream entry ID.
|
75
|
+
#
|
76
|
+
# @return [nil] Returns nothing
|
77
|
+
#
|
78
|
+
# @raise [Kaltura::APIError] Raises 'ENTRY_ID_NOT_FOUND' if the entry doesn't exist.
|
79
|
+
##
|
80
|
+
def delete(entry_id)
|
81
|
+
kparams = {}
|
82
|
+
client.add_param(kparams, 'entryId', entry_id)
|
83
|
+
perform_request('liveStream','delete',kparams,false)
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Lists live streams by the filter with paging support for large sets of live streams.
|
88
|
+
#
|
89
|
+
# @param [Kaltura::Filter::LiveStreamEntryFilter] The live stream filter is a wrapper for Kaltura::Filter::MediaEntryFilter
|
90
|
+
# @param [Kaltura::FilterPager] The default Kaltura pager.
|
91
|
+
#
|
92
|
+
# @return [Kaltura::Response::LiveStreamListResponse] This is a wrapper for Kaltura::Response::BaseRespsone.
|
93
|
+
#
|
94
|
+
# @raise [Kaltura::APIError] Raises default Kaltura API errors.
|
95
|
+
##
|
96
|
+
def list(filter=nil, pager=nil)
|
97
|
+
kparams = {}
|
98
|
+
client.add_param(kparams, 'filter', filter)
|
99
|
+
client.add_param(kparams, 'pager', pager)
|
100
|
+
perform_request('liveStream','list',kparams,false)
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Updates the live stream entries offline thumbnail using a raw jpgeg file.
|
105
|
+
#
|
106
|
+
# @param [String] entry_id The live stream entry ID.
|
107
|
+
# @param [File] file_data The JPEG file to use as the stream is offline backdrop.
|
108
|
+
#
|
109
|
+
# @return [Kaltura::LiveStreamEntry] The live stream entry with the updated thumbnail and version.
|
110
|
+
#
|
111
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors plus 'ENTRY_ID_NOT_FOUND' if the entry doesn't exist and
|
112
|
+
# 'PERMISSION_DENIED_TO_UPDATE_ENTRY' if the user is does not own the live stream and isn't an administrator.
|
113
|
+
##
|
114
|
+
def update_offline_thumbnail_jpeg(entry_id, file_data)
|
115
|
+
kparams = {}
|
116
|
+
client.add_param(kparams, 'entryId', entry_id)
|
117
|
+
client.add_param(kparams, 'fileData', file_data)
|
118
|
+
perform_request('liveStream','updateOfflineThumbnailJpeg',kparams,false)
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Updates the live stream entries offline thumbnail using a URL.
|
123
|
+
#
|
124
|
+
# @param [String] entry_id The live stream entry ID.
|
125
|
+
# @param [File] url The URL to a JPEG file to use as the stream is offline backdrop.
|
126
|
+
#
|
127
|
+
# @return [Kaltura::LiveStreamEntry] The live stream entry with the updated thumbnail and version.
|
128
|
+
#
|
129
|
+
# @raise [Kaltura::APIError] Raises default Kaltura errors plus 'ENTRY_ID_NOT_FOUND' if the entry doesn't exist and
|
130
|
+
# 'PERMISSION_DENIED_TO_UPDATE_ENTRY' if the user is does not own the live stream and isn't an administrator.
|
131
|
+
##
|
132
|
+
def update_offline_thumbnail_from_url(entry_id, url)
|
133
|
+
kparams = {}
|
134
|
+
client.add_param(kparams, 'entryId', entry_id)
|
135
|
+
client.add_param(kparams, 'url', url)
|
136
|
+
perform_request('liveStream','updateOfflineThumbnailFromUrl',kparams,false)
|
137
|
+
end
|
138
|
+
end #class LiveStreamService
|
139
|
+
end
|
140
|
+
end
|