SearchableHome

class SearchableHome : PlatformTrait, SearchableHomeTrait.Attributes


Trait for Searchable Home API.

Summary

Public functions

suspend List<String>

Command to get recent searches.

suspend List<String>

Command to get the search suggestions.

suspend SearchableHomeTrait.SearchCommand.SearchCommandResponse
search(query: String?)

Command to search the home.

Public properties

open TraitFactory<SearchableHome>

Inherited functions

From com.google.home.google.PlatformTrait
ObjectCommand
<REQUEST : Any?> createObjectCommand(
    commandId: String,
    request: PlatformTraitPayload<REQUEST>
)
suspend Unit
sendCommand(commandId: String)
suspend Unit
<REQUEST : Any?> sendCommand(
    commandId: String,
    request: PlatformTraitPayload<REQUEST>
)
suspend RESPONSE
<RESPONSE : Any?> sendCommand(
    commandId: String,
    responseParser: Parser<RESPONSE>
)
suspend RESPONSE
<REQUEST : Any?, RESPONSE : Any?> sendCommand(
    commandId: String,
    request: PlatformTraitPayload<REQUEST>,
    responseParser: Parser<RESPONSE>
)
suspend Unit
<T : Any?> write(parser: Parser<T>, attributes: T, useTimedInteraction: Boolean)

Public functions

getRecentSearches

suspend fun getRecentSearches(): List<String>

Command to get recent searches.

getSearchSuggestions

suspend fun getSearchSuggestions(): List<String>

Command to get the search suggestions.

search

suspend fun search(query: String? = null): SearchableHomeTrait.SearchCommand.SearchCommandResponse

Command to search the home.

Public properties

factory

open val factoryTraitFactory<SearchableHome>