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) ⇒ KalturaAttachmentAsset
Add attachment asset.
-
#delete(attachment_asset_id) ⇒ Object
[].
- #get(attachment_asset_id) ⇒ KalturaAttachmentAsset
-
#get_remote_paths(id) ⇒ KalturaRemotePathListResponse
Get remote storage existing paths for the asset.
-
#get_url(id, storage_id = KalturaNotImplemented) ⇒ string
Get download URL for the asset.
-
#initialize(client) ⇒ KalturaAttachmentAssetService
constructor
A new instance of KalturaAttachmentAssetService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaAttachmentAssetListResponse
List attachment Assets by filter and pager.
-
#serve(attachment_asset_id, serve_options = KalturaNotImplemented) ⇒ file
Serves attachment by its id.
-
#set_content(id, content_resource) ⇒ KalturaAttachmentAsset
Update content of attachment asset.
-
#update(id, attachment_asset) ⇒ KalturaAttachmentAsset
Update attachment asset.
Constructor Details
#initialize(client) ⇒ KalturaAttachmentAssetService
Returns a new instance of KalturaAttachmentAssetService.
157 158 159 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 157 def initialize(client) super(client) end |
Instance Method Details
#add(entry_id, attachment_asset) ⇒ KalturaAttachmentAsset
Add attachment asset
163 164 165 166 167 168 169 170 171 172 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 163 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', 'KalturaAttachmentAsset', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#delete(attachment_asset_id) ⇒ Object
Returns [].
175 176 177 178 179 180 181 182 183 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 175 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) ⇒ KalturaAttachmentAsset
186 187 188 189 190 191 192 193 194 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 186 def get() kparams = {} client.add_param(kparams, 'attachmentAssetId', ) client.queue_service_action_call('attachment_attachmentasset', 'get', 'KalturaAttachmentAsset', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_remote_paths(id) ⇒ KalturaRemotePathListResponse
Get remote storage existing paths for the asset
198 199 200 201 202 203 204 205 206 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 198 def get_remote_paths(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('attachment_attachmentasset', 'getRemotePaths', 'KalturaRemotePathListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_url(id, storage_id = KalturaNotImplemented) ⇒ string
Get download URL for the asset
210 211 212 213 214 215 216 217 218 219 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 210 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', 'string', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaAttachmentAssetListResponse
List attachment Assets by filter and pager
223 224 225 226 227 228 229 230 231 232 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 223 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', 'KalturaAttachmentAssetListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#serve(attachment_asset_id, serve_options = KalturaNotImplemented) ⇒ file
Serves attachment by its id
236 237 238 239 240 241 242 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 236 def serve(, =KalturaNotImplemented) kparams = {} client.add_param(kparams, 'attachmentAssetId', ) client.add_param(kparams, 'serveOptions', ) client.queue_service_action_call('attachment_attachmentasset', 'serve', 'file', kparams) return client.get_serve_url() end |
#set_content(id, content_resource) ⇒ KalturaAttachmentAsset
Update content of attachment asset
246 247 248 249 250 251 252 253 254 255 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 246 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', 'KalturaAttachmentAsset', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update(id, attachment_asset) ⇒ KalturaAttachmentAsset
Update attachment asset
259 260 261 262 263 264 265 266 267 268 |
# File 'lib/kaltura_plugins/kaltura_attachment_client_plugin.rb', line 259 def update(id, ) kparams = {} client.add_param(kparams, 'id', id) client.add_param(kparams, 'attachmentAsset', ) client.queue_service_action_call('attachment_attachmentasset', 'update', 'KalturaAttachmentAsset', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |