Class: Kaltura::KalturaSearchService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaSearchService
- Defined in:
- lib/kaltura_client.rb
Overview
Search service allows you to search for media in various media providers
This service is being used mostly by the CW component
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
- #external_login(search_source, user_name, password) ⇒ KalturaSearchAuthData
-
#get_media_info(search_result) ⇒ KalturaSearchResult
Retrieve extra information about media found in search action Some providers return only part of the fields needed to create entry from, use this action to get the rest of the fields.
-
#initialize(client) ⇒ KalturaSearchService
constructor
A new instance of KalturaSearchService.
-
#search(search, pager = KalturaNotImplemented) ⇒ KalturaSearchResultResponse
Search for media in one of the supported media providers.
-
#search_url(media_type, url) ⇒ KalturaSearchResult
Search for media given a specific URL Kaltura supports a searchURL action on some of the media providers.
Constructor Details
#initialize(client) ⇒ KalturaSearchService
Returns a new instance of KalturaSearchService.
4227 4228 4229 |
# File 'lib/kaltura_client.rb', line 4227 def initialize(client) super(client) end |
Instance Method Details
#external_login(search_source, user_name, password) ⇒ KalturaSearchAuthData
4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 |
# File 'lib/kaltura_client.rb', line 4232 def external_login(search_source, user_name, password) kparams = {} client.add_param(kparams, 'searchSource', search_source) client.add_param(kparams, 'userName', user_name) client.add_param(kparams, 'password', password) client.queue_service_action_call('search', 'externalLogin', 'KalturaSearchAuthData', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#get_media_info(search_result) ⇒ KalturaSearchResult
Retrieve extra information about media found in search action Some providers return only part of the fields needed to create entry from, use this action to get the rest of the fields.
4247 4248 4249 4250 4251 4252 4253 4254 4255 |
# File 'lib/kaltura_client.rb', line 4247 def get_media_info(search_result) kparams = {} client.add_param(kparams, 'searchResult', search_result) client.queue_service_action_call('search', 'getMediaInfo', 'KalturaSearchResult', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#search(search, pager = KalturaNotImplemented) ⇒ KalturaSearchResultResponse
Search for media in one of the supported media providers
4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 |
# File 'lib/kaltura_client.rb', line 4259 def search(search, pager=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'search', search) client.add_param(kparams, 'pager', pager) client.queue_service_action_call('search', 'search', 'KalturaSearchResultResponse', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |
#search_url(media_type, url) ⇒ KalturaSearchResult
Search for media given a specific URL Kaltura supports a searchURL action on some of the media providers. This action will return a KalturaSearchResult object based on a given URL (assuming the media provider is supported)
4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 |
# File 'lib/kaltura_client.rb', line 4274 def search_url(media_type, url) kparams = {} client.add_param(kparams, 'mediaType', media_type) client.add_param(kparams, 'url', url) client.queue_service_action_call('search', 'searchUrl', 'KalturaSearchResult', kparams) if (client.is_multirequest) return nil end return client.do_queue() end |