Class: Kaltura::Service::FlavorParamsService

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

Overview

The Flavor Params service is responsible for adding and managing flavor params

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

#add(flavor_params) ⇒ Kaltura::FlavorParams

Adds a new Flavor param.

Parameters:

Returns:

  • (Kaltura::FlavorParams)

    Returns the flavor params object as stored in the Kaltura system. Would be helpful to store the ID for later use.

Raises:



19
20
21
22
23
# File 'lib/kaltura/service/flavor_params_service.rb', line 19

def add(flavor_params)
	kparams = {}
	client.add_param(kparams, 'flavorParams', flavor_params)
	perform_request('flavorParams','add',kparams,false)
end

#delete(id) ⇒ nil

Deletes the requested flavor param.

Parameters:

  • id (Integer)

    The flavor param id.

Returns:

  • (nil)

    Returns nothing.

Raises:



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

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

#get(id) ⇒ Kaltura::FlavorParams

Retrieves a flavor param.

Parameters:

  • id (Integer)

    The flavor param ID.

Returns:

Raises:



34
35
36
37
38
# File 'lib/kaltura/service/flavor_params_service.rb', line 34

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

#get_by_conversion_profile_id(conversion_profile_id) ⇒ Array

Retrieves all flavor params from a specific Conversion Profile.

Parameters:

  • conversion_profile_id (Integer)

    The conversion profile ID.

Returns:

  • (Array)

    Returns an array of Flavor Params with a specific conversion profile.

Raises:



104
105
106
107
108
# File 'lib/kaltura/service/flavor_params_service.rb', line 104

def get_by_conversion_profile_id(conversion_profile_id)
	kparams = {}
	client.add_param(kparams, 'conversionProfileId', conversion_profile_id)
	perform_request('flavorParams','getByConversionProfileId',kparams,false)
end

#list(filter = nil, pager = nil) ⇒ Kaltura::Response::FlavorParamsListResponse

Lists flavor params by filter with paging support. In addition, all system default parameters will be listed as well.

Parameters:

Returns:

Raises:



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

def list(filter=nil, pager=nil)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	perform_request('flavorParams','list',kparams,false)
end

#update(id, flavor_params) ⇒ Kaltura::FlavorParams

Updates an existing flavor params object. As with other Kaltura API update actions, it is best to instantiate a new flavor params object instead of retrieving the existing one. You only add fields for the fields you wish to change.

Parameters:

  • id (Integer)

    The flavor param ID.

  • A (Kaltura::FlavorParams)

    newly instantiated flavor params object that contains the fields you wish to change on the existing flavor params object.

Returns:

Raises:



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

def update(id, flavor_params)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'flavorParams', flavor_params)
	perform_request('flavorParams','update',kparams,false)
end