android-components / mozilla.components.browser.search.suggestions / SearchSuggestionClient

SearchSuggestionClient

class SearchSuggestionClient (source)

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

Exceptions

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

Constructors

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

Properties

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

Functions

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.