Class: Kaltura::KalturaFlavorAssetService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

Retrieve information and invoke actions on Flavor Asset

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaFlavorAssetService

Returns a new instance of KalturaFlavorAssetService.



1739
1740
1741
# File 'lib/kaltura_client.rb', line 1739

def initialize(client)
	super(client)
end

Instance Method Details

#add(entry_id, flavor_asset) ⇒ KalturaFlavorAsset

Add flavor asset

Returns:



1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
# File 'lib/kaltura_client.rb', line 1745

def add(entry_id, flavor_asset)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'flavorAsset', flavor_asset)
	client.queue_service_action_call('flavorasset', 'add', 'KalturaFlavorAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#convert(entry_id, flavor_params_id, priority = 0) ⇒ Object

Add and convert new Flavor Asset for Entry with specific Flavor Params

Returns:



1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
# File 'lib/kaltura_client.rb', line 1758

def convert(entry_id, flavor_params_id, priority=0)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'flavorParamsId', flavor_params_id)
	client.add_param(kparams, 'priority', priority)
	client.queue_service_action_call('flavorasset', 'convert', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(id) ⇒ Object

Delete Flavor Asset by ID

Returns:



1772
1773
1774
1775
1776
1777
1778
1779
1780
# File 'lib/kaltura_client.rb', line 1772

def delete(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('flavorasset', 'delete', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete_local_content(asset_id) ⇒ Object

delete all local file syncs for this asset

Returns:



1784
1785
1786
1787
1788
1789
1790
1791
1792
# File 'lib/kaltura_client.rb', line 1784

def delete_local_content(asset_id)
	kparams = {}
	client.add_param(kparams, 'assetId', asset_id)
	client.queue_service_action_call('flavorasset', 'deleteLocalContent', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#export(asset_id, storage_profile_id) ⇒ KalturaFlavorAsset

manually export an asset

Returns:



1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
# File 'lib/kaltura_client.rb', line 1796

def export(asset_id, storage_profile_id)
	kparams = {}
	client.add_param(kparams, 'assetId', asset_id)
	client.add_param(kparams, 'storageProfileId', storage_profile_id)
	client.queue_service_action_call('flavorasset', 'export', 'KalturaFlavorAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(id) ⇒ KalturaFlavorAsset

Get Flavor Asset by ID

Returns:



1809
1810
1811
1812
1813
1814
1815
1816
1817
# File 'lib/kaltura_client.rb', line 1809

def get(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('flavorasset', 'get', 'KalturaFlavorAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_by_entry_id(entry_id) ⇒ array

Get Flavor Assets for Entry

Returns:

  • (array)


1821
1822
1823
1824
1825
1826
1827
1828
1829
# File 'lib/kaltura_client.rb', line 1821

def get_by_entry_id(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.queue_service_action_call('flavorasset', 'getByEntryId', 'KalturaFlavorAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_download_url(id, use_cdn = false) ⇒ string

Get download URL for the Flavor Asset

Returns:

  • (string)


1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
# File 'lib/kaltura_client.rb', line 1833

def get_download_url(id, use_cdn=false)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'useCdn', use_cdn)
	client.queue_service_action_call('flavorasset', 'getDownloadUrl', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_flavor_assets_with_params(entry_id) ⇒ array

Get Flavor Asset with the relevant Flavor Params (Flavor Params can exist without Flavor Asset & vice versa)

Returns:

  • (array)


1846
1847
1848
1849
1850
1851
1852
1853
1854
# File 'lib/kaltura_client.rb', line 1846

def get_flavor_assets_with_params(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.queue_service_action_call('flavorasset', 'getFlavorAssetsWithParams', 'KalturaFlavorAssetWithParams', 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



1858
1859
1860
1861
1862
1863
1864
1865
1866
# File 'lib/kaltura_client.rb', line 1858

def get_remote_paths(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('flavorasset', 'getRemotePaths', 'KalturaRemotePathListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_url(id, storage_id = KalturaNotImplemented, force_proxy = false, options = KalturaNotImplemented) ⇒ string

Get download URL for the asset

Returns:

  • (string)


1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
# File 'lib/kaltura_client.rb', line 1870

def get_url(id, storage_id=KalturaNotImplemented, force_proxy=false, options=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'storageId', storage_id)
	client.add_param(kparams, 'forceProxy', force_proxy)
	client.add_param(kparams, 'options', options)
	client.queue_service_action_call('flavorasset', 'getUrl', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_volume_map(flavor_id) ⇒ file

Get volume map by entry id

Returns:

  • (file)


1885
1886
1887
1888
1889
1890
# File 'lib/kaltura_client.rb', line 1885

def get_volume_map(flavor_id)
	kparams = {}
	client.add_param(kparams, 'flavorId', flavor_id)
	client.queue_service_action_call('flavorasset', 'getVolumeMap', 'file', kparams)
	return client.get_serve_url()
end

#get_web_playable_by_entry_id(entry_id) ⇒ array

Get web playable Flavor Assets for Entry

Returns:

  • (array)


1894
1895
1896
1897
1898
1899
1900
1901
1902
# File 'lib/kaltura_client.rb', line 1894

def get_web_playable_by_entry_id(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.queue_service_action_call('flavorasset', 'getWebPlayableByEntryId', 'KalturaFlavorAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaFlavorAssetListResponse

List Flavor Assets by filter and pager



1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
# File 'lib/kaltura_client.rb', line 1906

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('flavorasset', 'list', 'KalturaFlavorAssetListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#reconvert(id) ⇒ Object

Reconvert Flavor Asset by ID

Returns:



1919
1920
1921
1922
1923
1924
1925
1926
1927
# File 'lib/kaltura_client.rb', line 1919

def reconvert(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('flavorasset', 'reconvert', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#serve_ad_stitch_cmd(asset_id, ffprobe_json = KalturaNotImplemented, duration = KalturaNotImplemented) ⇒ string

serve cmd line to transcode the ad

Returns:

  • (string)


1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
# File 'lib/kaltura_client.rb', line 1931

def serve_ad_stitch_cmd(asset_id, ffprobe_json=KalturaNotImplemented, duration=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'assetId', asset_id)
	client.add_param(kparams, 'ffprobeJson', ffprobe_json)
	client.add_param(kparams, 'duration', duration)
	client.queue_service_action_call('flavorasset', 'serveAdStitchCmd', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#set_as_source(asset_id) ⇒ Object

Set a given flavor as the original flavor

Returns:



1945
1946
1947
1948
1949
1950
1951
1952
1953
# File 'lib/kaltura_client.rb', line 1945

def set_as_source(asset_id)
	kparams = {}
	client.add_param(kparams, 'assetId', asset_id)
	client.queue_service_action_call('flavorasset', 'setAsSource', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#set_content(id, content_resource) ⇒ KalturaFlavorAsset

Update content of flavor asset

Returns:



1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
# File 'lib/kaltura_client.rb', line 1957

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('flavorasset', 'setContent', 'KalturaFlavorAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update(id, flavor_asset) ⇒ KalturaFlavorAsset

Update flavor asset

Returns:



1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
# File 'lib/kaltura_client.rb', line 1970

def update(id, flavor_asset)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'flavorAsset', flavor_asset)
	client.queue_service_action_call('flavorasset', 'update', 'KalturaFlavorAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end