android-components / / SearchSuggestionClient


class SearchSuggestionClient (source)

Provides an interface to get search suggestions from a given SearchEngine.


Name Summary
FetchException class FetchException : Exception
Exception types for errors caught while getting a list of suggestions
ResponseParserException class ResponseParserException : Exception


Name Summary
<init> SearchSuggestionClient(searchEngine: SearchEngine, fetcher: SearchSuggestionFetcher)
SearchSuggestionClient(context: <ERROR CLASS>, searchEngineManager: SearchEngineManager, fetcher: SearchSuggestionFetcher)


Name Summary
searchEngine var searchEngine: SearchEngine?
searchEngineManager val searchEngineManager: SearchEngineManager?


Name Summary
getSuggestions suspend fun getSuggestions(query: String): List<String>?
Gets search suggestions for a given query

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.