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.



1701
1702
1703
# File 'lib/kaltura_client.rb', line 1701

def initialize(client)
	super(client)
end

Instance Method Details

#add(entry_id, flavor_asset) ⇒ KalturaFlavorAsset

Add flavor asset

Returns:



1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
# File 'lib/kaltura_client.rb', line 1707

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:



1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
# File 'lib/kaltura_client.rb', line 1720

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:



1734
1735
1736
1737
1738
1739
1740
1741
1742
# File 'lib/kaltura_client.rb', line 1734

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:



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

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:



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

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:



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

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)


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

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)


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

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)


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

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



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

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)


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

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)


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

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)


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

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



1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
# File 'lib/kaltura_client.rb', line 1868

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:



1881
1882
1883
1884
1885
1886
1887
1888
1889
# File 'lib/kaltura_client.rb', line 1881

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)


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

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:



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

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:



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

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:



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

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