Class: Kaltura::KalturaThumbAssetService

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

Overview

Retrieve information and invoke actions on Thumb Asset

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaThumbAssetService

Returns a new instance of KalturaThumbAssetService.



4827
4828
4829
# File 'lib/kaltura_client.rb', line 4827

def initialize(client)
	super(client)
end

Instance Method Details

#add(entry_id, thumb_asset) ⇒ KalturaThumbAsset

Add thumbnail asset

Returns:



4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
# File 'lib/kaltura_client.rb', line 4833

def add(entry_id, thumb_asset)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'thumbAsset', thumb_asset)
	client.queue_service_action_call('thumbasset', 'add', 'KalturaThumbAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#add_from_image(entry_id, file_data) ⇒ KalturaThumbAsset

Returns:



4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
# File 'lib/kaltura_client.rb', line 4845

def add_from_image(entry_id, file_data)
	kparams = {}
	kfiles = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kfiles, 'fileData', file_data)
	client.queue_service_action_call('thumbasset', 'addFromImage', 'KalturaThumbAsset', kparams, kfiles)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#add_from_url(entry_id, url) ⇒ KalturaThumbAsset

Returns:



4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
# File 'lib/kaltura_client.rb', line 4858

def add_from_url(entry_id, url)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'url', url)
	client.queue_service_action_call('thumbasset', 'addFromUrl', 'KalturaThumbAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(thumb_asset_id) ⇒ Object

Returns [].

Returns:



4870
4871
4872
4873
4874
4875
4876
4877
4878
# File 'lib/kaltura_client.rb', line 4870

def delete(thumb_asset_id)
	kparams = {}
	client.add_param(kparams, 'thumbAssetId', thumb_asset_id)
	client.queue_service_action_call('thumbasset', 'delete', '', 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:



4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
# File 'lib/kaltura_client.rb', line 4882

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

#generate(entry_id, thumb_params, source_asset_id = KalturaNotImplemented) ⇒ KalturaThumbAsset

Returns:



4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
# File 'lib/kaltura_client.rb', line 4894

def generate(entry_id, thumb_params, source_asset_id=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'thumbParams', thumb_params)
	client.add_param(kparams, 'sourceAssetId', source_asset_id)
	client.queue_service_action_call('thumbasset', 'generate', 'KalturaThumbAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#generate_by_entry_id(entry_id, dest_thumb_params_id) ⇒ KalturaThumbAsset

Returns:



4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
# File 'lib/kaltura_client.rb', line 4907

def generate_by_entry_id(entry_id, dest_thumb_params_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'destThumbParamsId', dest_thumb_params_id)
	client.queue_service_action_call('thumbasset', 'generateByEntryId', 'KalturaThumbAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(thumb_asset_id) ⇒ KalturaThumbAsset

Returns:



4919
4920
4921
4922
4923
4924
4925
4926
4927
# File 'lib/kaltura_client.rb', line 4919

def get(thumb_asset_id)
	kparams = {}
	client.add_param(kparams, 'thumbAssetId', thumb_asset_id)
	client.queue_service_action_call('thumbasset', 'get', 'KalturaThumbAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_by_entry_id(entry_id) ⇒ array

Returns:

  • (array)


4930
4931
4932
4933
4934
4935
4936
4937
4938
# File 'lib/kaltura_client.rb', line 4930

def get_by_entry_id(entry_id)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.queue_service_action_call('thumbasset', 'getByEntryId', 'KalturaThumbAsset', 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



4942
4943
4944
4945
4946
4947
4948
4949
4950
# File 'lib/kaltura_client.rb', line 4942

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

#get_url(id, storage_id = KalturaNotImplemented, thumb_params = KalturaNotImplemented) ⇒ string

Get download URL for the asset

Returns:

  • (string)


4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
# File 'lib/kaltura_client.rb', line 4954

def get_url(id, storage_id=KalturaNotImplemented, thumb_params=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'storageId', storage_id)
	client.add_param(kparams, 'thumbParams', thumb_params)
	client.queue_service_action_call('thumbasset', 'getUrl', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

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

List Thumbnail Assets by filter and pager



4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
# File 'lib/kaltura_client.rb', line 4968

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

#regenerate(thumb_asset_id) ⇒ KalturaThumbAsset

Returns:



4980
4981
4982
4983
4984
4985
4986
4987
4988
# File 'lib/kaltura_client.rb', line 4980

def regenerate(thumb_asset_id)
	kparams = {}
	client.add_param(kparams, 'thumbAssetId', thumb_asset_id)
	client.queue_service_action_call('thumbasset', 'regenerate', 'KalturaThumbAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#serve(thumb_asset_id, version = KalturaNotImplemented, thumb_params = KalturaNotImplemented, options = KalturaNotImplemented) ⇒ file

Serves thumbnail by its id

Returns:

  • (file)


4992
4993
4994
4995
4996
4997
4998
4999
5000
# File 'lib/kaltura_client.rb', line 4992

def serve(thumb_asset_id, version=KalturaNotImplemented, thumb_params=KalturaNotImplemented, options=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'thumbAssetId', thumb_asset_id)
	client.add_param(kparams, 'version', version)
	client.add_param(kparams, 'thumbParams', thumb_params)
	client.add_param(kparams, 'options', options)
	client.queue_service_action_call('thumbasset', 'serve', 'file', kparams)
	return client.get_serve_url()
end

#serve_by_entry_id(entry_id, thumb_param_id = KalturaNotImplemented) ⇒ file

Serves thumbnail by entry id and thumbnail params id

Returns:

  • (file)


5004
5005
5006
5007
5008
5009
5010
# File 'lib/kaltura_client.rb', line 5004

def serve_by_entry_id(entry_id, thumb_param_id=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id)
	client.add_param(kparams, 'thumbParamId', thumb_param_id)
	client.queue_service_action_call('thumbasset', 'serveByEntryId', 'file', kparams)
	return client.get_serve_url()
end

#set_as_default(thumb_asset_id) ⇒ Object

Tags the thumbnail as DEFAULT_THUMB and removes that tag from all other thumbnail assets of the entry. Create a new file sync link on the entry thumbnail that points to the thumbnail asset file sync.

Returns:



5015
5016
5017
5018
5019
5020
5021
5022
5023
# File 'lib/kaltura_client.rb', line 5015

def set_as_default(thumb_asset_id)
	kparams = {}
	client.add_param(kparams, 'thumbAssetId', thumb_asset_id)
	client.queue_service_action_call('thumbasset', 'setAsDefault', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#set_content(id, content_resource) ⇒ KalturaThumbAsset

Update content of thumbnail asset

Returns:



5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
# File 'lib/kaltura_client.rb', line 5027

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

#update(id, thumb_asset) ⇒ KalturaThumbAsset

Update thumbnail asset

Returns:



5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
# File 'lib/kaltura_client.rb', line 5040

def update(id, thumb_asset)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'thumbAsset', thumb_asset)
	client.queue_service_action_call('thumbasset', 'update', 'KalturaThumbAsset', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end