Class: Kaltura::KalturaAttachmentAssetService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaAttachmentAssetService
- Defined in:
- lib/kaltura_plugins/kaltura_attachment_client_plugin.rb
Overview
Retrieve information and invoke actions on attachment Asset
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(entry_id, attachment_asset) ⇒ Object
Add attachment asset.
- #delete(attachment_asset_id) ⇒ Object
- #get(attachment_asset_id) ⇒ Object
-
#get_remote_paths(id) ⇒ Object
Get remote storage existing paths for the asset.
-
#get_url(id, storage_id = KalturaNotImplemented) ⇒ Object
Get download URL for the asset.
-
#initialize(client) ⇒ KalturaAttachmentAssetService
constructor
A new instance of KalturaAttachmentAssetService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List attachment Assets by filter and pager.
-
#serve(attachment_asset_id) ⇒ Object
Serves attachment by its id.
-
#set_content(id, content_resource) ⇒ Object
Update content of attachment asset.
-
#update(id, attachment_asset) ⇒ Object
Update attachment asset.
Constructor Details
#initialize(client) ⇒ KalturaAttachmentAssetService
Returns a new instance of KalturaAttachmentAssetService.
106 107 108 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 106 def initialize(client) super(client) end |
Instance Method Details
#add(entry_id, attachment_asset) ⇒ Object
Add attachment asset
112 113 114 115 116 117 118 119 120 121 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 112 def add(entry_id, ) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.add_param(kparams, 'attachmentAsset', ); client.queue_service_action_call('attachment_attachmentasset', 'add', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#delete(attachment_asset_id) ⇒ Object
206 207 208 209 210 211 212 213 214 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 206 def delete() kparams = {} client.add_param(kparams, 'attachmentAssetId', ); client.queue_service_action_call('attachment_attachmentasset', 'delete', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get(attachment_asset_id) ⇒ Object
183 184 185 186 187 188 189 190 191 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 183 def get() kparams = {} client.add_param(kparams, 'attachmentAssetId', ); client.queue_service_action_call('attachment_attachmentasset', 'get', 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
164 165 166 167 168 169 170 171 172 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 164 def get_remote_paths(id) kparams = {} client.add_param(kparams, 'id', id); client.queue_service_action_call('attachment_attachmentasset', 'getRemotePaths', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#get_url(id, storage_id = KalturaNotImplemented) ⇒ Object
Get download URL for the asset
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 151 def get_url(id, storage_id=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'id', id); client.add_param(kparams, 'storageId', storage_id); client.queue_service_action_call('attachment_attachmentasset', 'getUrl', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List attachment Assets by filter and pager
195 196 197 198 199 200 201 202 203 204 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 195 def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter); client.add_param(kparams, 'pager', pager); client.queue_service_action_call('attachment_attachmentasset', 'list', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#serve(attachment_asset_id) ⇒ Object
Serves attachment by its id
176 177 178 179 180 181 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 176 def serve() kparams = {} client.add_param(kparams, 'attachmentAssetId', ); client.queue_service_action_call('attachment_attachmentasset', 'serve', kparams); return client.get_serve_url(); end |
#set_content(id, content_resource) ⇒ Object
Update content of attachment asset
125 126 127 128 129 130 131 132 133 134 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 125 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('attachment_attachmentasset', 'setContent', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#update(id, attachment_asset) ⇒ Object
Update attachment asset
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 138 def update(id, ) kparams = {} client.add_param(kparams, 'id', id); client.add_param(kparams, 'attachmentAsset', ); client.queue_service_action_call('attachment_attachmentasset', 'update', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |