Class: Kaltura::KalturaShortLinkService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaShortLinkService
- Defined in:
- lib/kaltura_plugins/kaltura_short_link_client_plugin.rb
Overview
Short link service
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(short_link) ⇒ KalturaShortLink
Allows you to add a short link object.
-
#delete(id) ⇒ KalturaShortLink
Mark the short link as deleted.
-
#get(id) ⇒ KalturaShortLink
Retrieve an short link object by id.
-
#goto(id, proxy = false) ⇒ file
Serves short link.
-
#initialize(client) ⇒ KalturaShortLinkService
constructor
A new instance of KalturaShortLinkService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaShortLinkListResponse
List short link objects by filter and pager.
-
#update(id, short_link) ⇒ KalturaShortLink
Update existing short link.
Constructor Details
#initialize(client) ⇒ KalturaShortLinkService
Returns a new instance of KalturaShortLinkService.
233 234 235 |
# File 'lib/kaltura_plugins/kaltura_short_link_client_plugin.rb', line 233 def initialize(client) super(client) end |
Instance Method Details
#add(short_link) ⇒ KalturaShortLink
Allows you to add a short link object
239 240 241 242 243 244 245 246 247 |
# File 'lib/kaltura_plugins/kaltura_short_link_client_plugin.rb', line 239 def add(short_link) kparams = {} client.add_param(kparams, 'shortLink', short_link) client.queue_service_action_call('shortlink_shortlink', 'add', 'KalturaShortLink', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#delete(id) ⇒ KalturaShortLink
Mark the short link as deleted
251 252 253 254 255 256 257 258 259 |
# File 'lib/kaltura_plugins/kaltura_short_link_client_plugin.rb', line 251 def delete(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('shortlink_shortlink', 'delete', 'KalturaShortLink', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get(id) ⇒ KalturaShortLink
Retrieve an short link object by id
263 264 265 266 267 268 269 270 271 |
# File 'lib/kaltura_plugins/kaltura_short_link_client_plugin.rb', line 263 def get(id) kparams = {} client.add_param(kparams, 'id', id) client.queue_service_action_call('shortlink_shortlink', 'get', 'KalturaShortLink', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#goto(id, proxy = false) ⇒ file
Serves short link
275 276 277 278 279 280 281 |
# File 'lib/kaltura_plugins/kaltura_short_link_client_plugin.rb', line 275 def goto(id, proxy=false) kparams = {} client.add_param(kparams, 'id', id) client.add_param(kparams, 'proxy', proxy) client.queue_service_action_call('shortlink_shortlink', 'goto', 'file', kparams) return client.get_serve_url() end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaShortLinkListResponse
List short link objects by filter and pager
285 286 287 288 289 290 291 292 293 294 |
# File 'lib/kaltura_plugins/kaltura_short_link_client_plugin.rb', line 285 def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'filter', filter) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('shortlink_shortlink', 'list', 'KalturaShortLinkListResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#update(id, short_link) ⇒ KalturaShortLink
Update existing short link
298 299 300 301 302 303 304 305 306 307 |
# File 'lib/kaltura_plugins/kaltura_short_link_client_plugin.rb', line 298 def update(id, short_link) kparams = {} client.add_param(kparams, 'id', id) client.add_param(kparams, 'shortLink', short_link) client.queue_service_action_call('shortlink_shortlink', 'update', 'KalturaShortLink', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |