Class: Kaltura::Service::FlavorAssetService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/kaltura/service/flavor_asset_service.rb

Overview

The Flavor Asset Service allows you to retrieve information and invoke actions on flavor assets.

Examples:

Add a new flavor to a media entry:

client.flavor_asset_service.convert('1_qa32a3ax',22)

Retrieve a flavor by flavor_id:

client.flavor_asset_service.get('0_as35a2r3a')

Retrieve all flavors for a media entry:

client.flavor_asset_service.get_by_entry_id('1_qa32a3ax')

Retrieve all the web playable flavors for a media entry:

client.flavor_asset_service.get_web_playable_by_entry_id('1_qa32a3ax')

Reconvert a specific Flavor:

client.flavor_asset_service.get('0_as35a2r3a')

Delete a Flavor:

client.flavor_asset_service.delete('0_as35a2r3a')

Retrieve a URL to download a specific flavor:

client.flavor_asset_service.get_download_url('0_as35a2r3a')

Instance Attribute Summary

Attributes inherited from BaseService

#client

Instance Method Summary collapse

Methods inherited from BaseService

#initialize, #perform_request

Constructor Details

This class inherits a constructor from Kaltura::Service::BaseService

Instance Method Details

#convert(entry_id, flavor_params_id) ⇒ nil

Add and convert a new flavor asset for a specified entry given a flavor param.

Parameters:

  • entry_id (String)

    The media entry ID to add a new flavor asset to.

  • flavor_params_id (Integer)

    The flavor params ID for conversion type.

Returns:

  • (nil)

    Returns nothing.

Raises:



87
88
89
90
91
92
# File 'lib/kaltura/service/flavor_asset_service.rb', line 87

def convert(entry_id, flavor_params_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'flavorParamsId', flavor_params_id)
	perform_request('flavorAsset','convert',kparams,false)
end

#delete(id) ⇒ nil

Removes a flavor asset.

Parameters:

  • id (String)

    Flavor asset to remove.

Returns:

  • (nil)

    Returns nothing.

Raises:



118
119
120
121
122
# File 'lib/kaltura/service/flavor_asset_service.rb', line 118

def delete(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	perform_request('flavorAsset','delete',kparams,false)
end

#get(id) ⇒ Kaltura::FlavorAsset

Retrieves an individual flavor asset by ID.

Parameters:

  • id (String)

    A flavor asset ID closely resembles an entry_id as Kaltura flavors are very close in nature to entries.

Returns:

Raises:



41
42
43
44
45
# File 'lib/kaltura/service/flavor_asset_service.rb', line 41

def get(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	perform_request('flavorAsset','get',kparams,false)
end

#get_by_entry_id(entry_id) ⇒ Array

Retrieves an enumerable collection of flavor assets given a media entry id.

Parameters:

  • entry_id (String)

    The media entry ID to seek flavors for.

Returns:

  • (Array)

    Returns an array of the flavor assets for a given media entry.

Raises:



56
57
58
59
60
# File 'lib/kaltura/service/flavor_asset_service.rb', line 56

def get_by_entry_id(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	perform_request('flavorAsset','getByEntryId',kparams,false)
end

#get_download_url(id) ⇒ String

Gets a downloadable URL for a flavor asset.

Parameters:

  • id (String)

    The flavor asset id.

Returns:

  • (String)

    a URL that can be used to download the requested flavor.

Raises:



133
134
135
136
137
# File 'lib/kaltura/service/flavor_asset_service.rb', line 133

def get_download_url(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	perform_request('flavorAsset','getDownloadUrl',kparams,false)
end

#get_flavor_assets_with_params(entry_id) ⇒ Array

Retrieves an enumerable collection of Flavor Assets + Flavor Params given a media entry.

Parameters:

  • entry_id (String)

    The media entry to retrieve flavors from.

Returns:

  • (Array)

    Returns a collection of Flavor Assets + Flavor Params.

Raises:



148
149
150
151
152
# File 'lib/kaltura/service/flavor_asset_service.rb', line 148

def get_flavor_assets_with_params(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	perform_request('flavorAsset','getFlavorAssetsWithParams',kparams,false)
end

#get_web_playable_by_entry_id(entry_id) ⇒ Array

Retrieves an enumerable collection of flavor assets that are playable within the KDP for a given media entry ID.

Parameters:

  • entry_id (String)

    The media entry ID to seek flavors for.

Returns:

  • (Array)

    Returns an array of the flavor assets for a given media entry.

Raises:



71
72
73
74
75
# File 'lib/kaltura/service/flavor_asset_service.rb', line 71

def get_web_playable_by_entry_id(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	perform_request('flavorAsset','getWebPlayableByEntryId',kparams,false)
end

#reconvert(id) ⇒ nil

Reconvert a specific flavor asset.

Parameters:

  • id (String)

    The flavor asset id.

Returns:

  • (nil)

    Returns nothing.

Raises:



103
104
105
106
107
# File 'lib/kaltura/service/flavor_asset_service.rb', line 103

def reconvert(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	perform_request('flavorAsset','reconvert',kparams,false)
end