Class: Kaltura::KalturaThumbAssetService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaThumbAssetService
- Defined in:
- lib/kaltura_client.rb
Overview
Retrieve information and invoke actions on Thumb Asset
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(entry_id, thumb_asset) ⇒ Object
Add thumbnail asset.
- #add_from_image(entry_id, file_data) ⇒ Object
- #add_from_url(entry_id, url) ⇒ Object
- #delete(thumb_asset_id) ⇒ Object
- #generate(entry_id, thumb_params, source_asset_id = KalturaNotImplemented) ⇒ Object
- #generate_by_entry_id(entry_id, dest_thumb_params_id) ⇒ Object
- #get(thumb_asset_id) ⇒ Object
- #get_by_entry_id(entry_id) ⇒ Object
-
#get_remote_paths(id) ⇒ Object
Get remote storage existing paths for the asset.
-
#get_url(id, storage_id = KalturaNotImplemented, thumb_params = KalturaNotImplemented) ⇒ Object
Get download URL for the asset.
-
#initialize(client) ⇒ KalturaThumbAssetService
constructor
A new instance of KalturaThumbAssetService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List Thumbnail Assets by filter and pager.
- #regenerate(thumb_asset_id) ⇒ Object
-
#serve(thumb_asset_id, version = KalturaNotImplemented, thumb_params = KalturaNotImplemented, options = KalturaNotImplemented) ⇒ Object
Serves thumbnail by its id.
-
#serve_by_entry_id(entry_id, thumb_param_id = KalturaNotImplemented) ⇒ Object
Serves thumbnail by entry id and thumnail params id.
-
#set_as_default(thumb_asset_id) ⇒ Object
Tags the thumbnail as DEFAULT_THUMB and removes that tag from all other thumbnail assets of the entry.
-
#set_content(id, content_resource) ⇒ Object
Update content of thumbnail asset.
-
#update(id, thumb_asset) ⇒ Object
Update thumbnail asset.
Constructor Details
#initialize(client) ⇒ KalturaThumbAssetService
Returns a new instance of KalturaThumbAssetService.
13124 13125 13126 |
# File 'lib/kaltura_client.rb', line 13124 def initialize(client) super(client) end |
Instance Method Details
#add(entry_id, thumb_asset) ⇒ Object
Add thumbnail asset
13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 |
# File 'lib/kaltura_client.rb', line 13130 def add(entry_id, thumb_asset) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.add_param(kparams, 'thumbAsset', thumb_asset); client.queue_service_action_call('thumbasset', 'add', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#add_from_image(entry_id, file_data) ⇒ Object
13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 |
# File 'lib/kaltura_client.rb', line 13282 def add_from_image(entry_id, file_data) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.add_param(kparams, 'fileData', file_data); client.queue_service_action_call('thumbasset', 'addFromImage', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#add_from_url(entry_id, url) ⇒ Object
13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 |
# File 'lib/kaltura_client.rb', line 13271 def add_from_url(entry_id, url) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.add_param(kparams, 'url', url); client.queue_service_action_call('thumbasset', 'addFromUrl', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#delete(thumb_asset_id) ⇒ Object
13293 13294 13295 13296 13297 13298 13299 13300 13301 |
# File 'lib/kaltura_client.rb', line 13293 def delete(thumb_asset_id) kparams = {} client.add_param(kparams, 'thumbAssetId', thumb_asset_id); client.queue_service_action_call('thumbasset', 'delete', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#generate(entry_id, thumb_params, source_asset_id = KalturaNotImplemented) ⇒ Object
13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 |
# File 'lib/kaltura_client.rb', line 13215 def generate(entry_id, thumb_params, source_asset_id=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.add_param(kparams, 'thumbParams', thumb_params); # id of the source asset (flavor or thumbnail) to be used as source for the thumbnail generation client.add_param(kparams, 'sourceAssetId', source_asset_id); client.queue_service_action_call('thumbasset', 'generate', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#generate_by_entry_id(entry_id, dest_thumb_params_id) ⇒ Object
13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 |
# File 'lib/kaltura_client.rb', line 13203 def generate_by_entry_id(entry_id, dest_thumb_params_id) kparams = {} client.add_param(kparams, 'entryId', entry_id); # indicate the id of the ThumbParams to be generate this thumbnail by client.add_param(kparams, 'destThumbParamsId', dest_thumb_params_id); client.queue_service_action_call('thumbasset', 'generateByEntryId', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get(thumb_asset_id) ⇒ Object
13238 13239 13240 13241 13242 13243 13244 13245 13246 |
# File 'lib/kaltura_client.rb', line 13238 def get(thumb_asset_id) kparams = {} client.add_param(kparams, 'thumbAssetId', thumb_asset_id); client.queue_service_action_call('thumbasset', 'get', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get_by_entry_id(entry_id) ⇒ Object
13248 13249 13250 13251 13252 13253 13254 13255 13256 |
# File 'lib/kaltura_client.rb', line 13248 def get_by_entry_id(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.queue_service_action_call('thumbasset', 'getByEntryId', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get_remote_paths(id) ⇒ Object
Get remote storage existing paths for the asset
13319 13320 13321 13322 13323 13324 13325 13326 13327 |
# File 'lib/kaltura_client.rb', line 13319 def get_remote_paths(id) kparams = {} client.add_param(kparams, 'id', id); client.queue_service_action_call('thumbasset', 'getRemotePaths', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get_url(id, storage_id = KalturaNotImplemented, thumb_params = KalturaNotImplemented) ⇒ Object
Get download URL for the asset
13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 |
# File 'lib/kaltura_client.rb', line 13305 def get_url(id, storage_id=KalturaNotImplemented, thumb_params=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'id', id); client.add_param(kparams, 'storageId', storage_id); client.add_param(kparams, 'thumbParams', thumb_params); client.queue_service_action_call('thumbasset', 'getUrl', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List Thumbnail Assets by filter and pager
13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 |
# File 'lib/kaltura_client.rb', line 13260 def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter); client.add_param(kparams, 'pager', pager); client.queue_service_action_call('thumbasset', 'list', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#regenerate(thumb_asset_id) ⇒ Object
13228 13229 13230 13231 13232 13233 13234 13235 13236 |
# File 'lib/kaltura_client.rb', line 13228 def regenerate(thumb_asset_id) kparams = {} client.add_param(kparams, 'thumbAssetId', thumb_asset_id); client.queue_service_action_call('thumbasset', 'regenerate', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#serve(thumb_asset_id, version = KalturaNotImplemented, thumb_params = KalturaNotImplemented, options = KalturaNotImplemented) ⇒ Object
Serves thumbnail by its id
13180 13181 13182 13183 13184 13185 13186 13187 13188 |
# File 'lib/kaltura_client.rb', line 13180 def serve(thumb_asset_id, version=KalturaNotImplemented, thumb_params=KalturaNotImplemented, =KalturaNotImplemented) kparams = {} client.add_param(kparams, 'thumbAssetId', thumb_asset_id); client.add_param(kparams, 'version', version); client.add_param(kparams, 'thumbParams', thumb_params); client.add_param(kparams, 'options', ); client.queue_service_action_call('thumbasset', 'serve', kparams); return client.get_serve_url(); end |
#serve_by_entry_id(entry_id, thumb_param_id = KalturaNotImplemented) ⇒ Object
Serves thumbnail by entry id and thumnail params id
13169 13170 13171 13172 13173 13174 13175 13176 |
# File 'lib/kaltura_client.rb', line 13169 def serve_by_entry_id(entry_id, thumb_param_id=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entryId', entry_id); # if not set, default thumbnail will be used. client.add_param(kparams, 'thumbParamId', thumb_param_id); client.queue_service_action_call('thumbasset', 'serveByEntryId', kparams); return client.get_serve_url(); end |
#set_as_default(thumb_asset_id) ⇒ Object
Tags the thumbnail as DEFAULT_THUMB and removes that tag from all other thumbnail assets of the entry. Create a new file sync link on the entry thumbnail that points to the thumbnail asset file sync.
13193 13194 13195 13196 13197 13198 13199 13200 13201 |
# File 'lib/kaltura_client.rb', line 13193 def set_as_default(thumb_asset_id) kparams = {} client.add_param(kparams, 'thumbAssetId', thumb_asset_id); client.queue_service_action_call('thumbasset', 'setAsDefault', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#set_content(id, content_resource) ⇒ Object
Update content of thumbnail asset
13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 |
# File 'lib/kaltura_client.rb', line 13143 def set_content(id, content_resource) kparams = {} client.add_param(kparams, 'id', id); client.add_param(kparams, 'contentResource', content_resource); client.queue_service_action_call('thumbasset', 'setContent', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#update(id, thumb_asset) ⇒ Object
Update thumbnail asset
13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 |
# File 'lib/kaltura_client.rb', line 13156 def update(id, thumb_asset) kparams = {} client.add_param(kparams, 'id', id); client.add_param(kparams, 'thumbAsset', thumb_asset); client.queue_service_action_call('thumbasset', 'update', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |