Class: Kaltura::KalturaFileAssetService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaFileAssetService
- Defined in:
- lib/kaltura_client.rb
Overview
Manage file assets
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(file_asset) ⇒ Object
Add new file asset.
-
#delete(id) ⇒ Object
Delete file asset by id.
-
#get(id) ⇒ Object
Get file asset by id.
-
#initialize(client) ⇒ KalturaFileAssetService
constructor
A new instance of KalturaFileAssetService.
-
#list(filter, pager = KalturaNotImplemented) ⇒ Object
List file assets by filter and pager.
-
#serve(id) ⇒ Object
Serve file asset by id.
-
#set_content(id, content_resource) ⇒ Object
Set content of file asset.
-
#update(id, file_asset) ⇒ Object
Update file asset by id.
Constructor Details
#initialize(client) ⇒ KalturaFileAssetService
Returns a new instance of KalturaFileAssetService.
10516 10517 10518 |
# File 'lib/kaltura_client.rb', line 10516 def initialize(client) super(client) end |
Instance Method Details
#add(file_asset) ⇒ Object
Add new file asset
10522 10523 10524 10525 10526 10527 10528 10529 10530 |
# File 'lib/kaltura_client.rb', line 10522 def add(file_asset) kparams = {} client.add_param(kparams, 'fileAsset', file_asset); client.queue_service_action_call('fileasset', 'add', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#delete(id) ⇒ Object
Delete file asset by id
10559 10560 10561 10562 10563 10564 10565 10566 10567 |
# File 'lib/kaltura_client.rb', line 10559 def delete(id) kparams = {} client.add_param(kparams, 'id', id); client.queue_service_action_call('fileasset', 'delete', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get(id) ⇒ Object
Get file asset by id
10534 10535 10536 10537 10538 10539 10540 10541 10542 |
# File 'lib/kaltura_client.rb', line 10534 def get(id) kparams = {} client.add_param(kparams, 'id', id); client.queue_service_action_call('fileasset', 'get', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#list(filter, pager = KalturaNotImplemented) ⇒ Object
List file assets by filter and pager
10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 |
# File 'lib/kaltura_client.rb', line 10593 def list(filter, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter); client.add_param(kparams, 'pager', pager); client.queue_service_action_call('fileasset', 'list', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#serve(id) ⇒ Object
Serve file asset by id
10571 10572 10573 10574 10575 10576 |
# File 'lib/kaltura_client.rb', line 10571 def serve(id) kparams = {} client.add_param(kparams, 'id', id); client.queue_service_action_call('fileasset', 'serve', kparams); return client.get_serve_url(); end |
#set_content(id, content_resource) ⇒ Object
Set content of file asset
10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 |
# File 'lib/kaltura_client.rb', line 10580 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('fileasset', 'setContent', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#update(id, file_asset) ⇒ Object
Update file asset by id
10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 |
# File 'lib/kaltura_client.rb', line 10546 def update(id, file_asset) kparams = {} client.add_param(kparams, 'id', id); client.add_param(kparams, 'fileAsset', file_asset); client.queue_service_action_call('fileasset', 'update', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |