[][src]Struct roku_ecp::SearchRequest

pub struct SearchRequest<'a> {
    pub keyword: &'a str,
    pub is_title: bool,
    pub search_type: Option<SearchType>,
    pub tmsid: Option<&'a str>,
    pub season: Option<u32>,
    pub show_unavailable: bool,
    pub match_any: bool,
    pub provider_ids: Option<&'a [&'a str]>,
    pub providers: Option<&'a [&'a str]>,
    pub launch: bool,
}

Describes a search to the Roku Search UI to find and (optionally) launch content from an available provider.

Fields

keyword: &'a str

The content title, channel name, person name, or keyword to be searched.

is_title: bool

Treat self.keyword as a title. This is the exact content title, channel name, person name, or keyword to be matched (ASCII case-insensitive).

search_type: Option<SearchType>

Type of item being searched. This parameter is recommended as otherwise the search results are unconstrained and may cause the desired item to not be found due to result limits

tmsid: Option<&'a str>

A TMS ID for a movie, TV show, or person. If known, this parameter is recommended to be passed in conjunction with the search_type parameter as this should most likely provide the desired search result.

season: Option<u32>

A season number for a TV show (series), e.g. 1, 2, 3, ... If specified for a tv-show search, and the TV show is found, the specified season will be picked in the Seasons list to be launched. If not specified or not found, the default (typically most recent) season will be selected.

show_unavailable: bool

Allows the general keyword search results to include upcoming movie / tv-shows that are not currently available on Roku.

match_any: bool

If there are multiple results matching the query, automatically selects the arbitrary first result. If this is not specified, the search will stop if the results do not indicate a unique result.

provider_ids: Option<&'a [&'a str]>

One or more Roku channel IDs specifying the preferred/target provider. The search will iterate through the ids until a matching provider is found.

providers: Option<&'a [&'a str]>

One or more Roku channel titles specifying the preferred/target provider. Titles must be a full case-insensitive match. The search will iterate through the channel titles until a matching provider is found.

launch: bool

Specifies that if the search content is found and a specified provider is found/installed, the provider's channel should be launched.

Implementations

impl<'a> SearchRequest<'a>[src]

pub fn new(keyword: &'a str) -> SearchRequest<'a>[src]

Creates a search request for a specific keyword.

pub fn search_type(mut self: Self, search_type: SearchType) -> SearchRequest<'a>[src]

Specify the type of item being searched.

pub fn provider_ids(mut self: Self, ids: &'a [&'a str]) -> SearchRequest<'a>[src]

Have the search prioritize a list of providers from their IDs. The search will go down the list until a listed provider is found.

pub fn providers(mut self: Self, titles: &'a [&'a str]) -> SearchRequest<'a>[src]

Have the search prioritize a list of providers from their title. The search will go down the list until a listed provider is found.

pub fn season(mut self: Self, season: u32) -> SearchRequest<'a>[src]

Set the season of a TV show to search for.

pub fn tmsid(mut self: Self, id: &'a str) -> SearchRequest<'a>[src]

Set the TMS ID for a movie, TV show, or person.

pub fn match_any(mut self: Self) -> SearchRequest<'a>[src]

Automatically select the first result from the search query.

pub fn title(mut self: Self) -> SearchRequest<'a>[src]

Treat the Search keyword as a title instead.

pub fn launch(mut self: Self) -> SearchRequest<'a>[src]

Launch the search result, if found with a specified provider that's installed.

pub fn show_unavailable(mut self: Self) -> SearchRequest<'a>[src]

Include unavailable listing in search results.

Trait Implementations

impl<'a> Debug for SearchRequest<'a>[src]

impl<'a> Default for SearchRequest<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SearchRequest<'a>[src]

impl<'a> Send for SearchRequest<'a>[src]

impl<'a> Sync for SearchRequest<'a>[src]

impl<'a> Unpin for SearchRequest<'a>[src]

impl<'a> UnwindSafe for SearchRequest<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]