[][src]Struct roku_ecp::Device

pub struct Device { /* fields omitted */ }

An HTTP client that communicates with a Roku device.

Implementations

impl Device[src]

pub async fn launch<'a>(
    &self,
    app_id: &str,
    parameters: Option<&[(&'a str, &'a str)]>
) -> Result<(), Error>
[src]

Launches a channel and passes the parameters given. This call will only launch installed channels.

pub async fn install<'a>(
    &self,
    app_id: &str,
    parameters: Option<&[(&'a str, &'a str)]>
) -> Result<(), Error>
[src]

Installs and launches a channel along with passing any given parameters.

impl Device[src]

pub async fn key_press_string(&self, text: &str) -> Result<(), Error>[src]

Sends a key press event for each character in the string.

pub async fn key_down(&self, key: Key) -> Result<(), Error>[src]

Equivalent to pressing the remote control key.

pub async fn key_up(&self, key: Key) -> Result<(), Error>[src]

Equivalent to releasing the remote control key.

pub async fn key_press(&self, key: Key) -> Result<(), Error>[src]

Equivalent to pressing down and releasing the remote control key.

impl Device[src]

pub async fn icon(&self, app_id: &str) -> Result<Icon, Error>[src]

Returns an icon corresponding to the Roku application identified by the app ID.

pub async fn active_app(&self) -> Result<ActiveApp, Error>[src]

Returns information on the currently opened app.

pub async fn apps(&self) -> Result<Vec<App>, Error>[src]

Returns information on all currently installed apps.

impl Device[src]

pub async fn device_info(&self) -> Result<DeviceInfo, Error>[src]

Retrieves device information similar to that returned by roDeviceInfo for BrightScript.

impl Device[src]

pub async fn media_player(&self) -> Result<MediaPlayer, Error>[src]

Information on the current media player state. This includes the current stream segment and position of the content being played, the running time of the content, audio format, and buffering.

impl Device[src]

pub async fn search(&self, search: SearchRequest<'_>) -> Result<(), Error>[src]

Sends a URL query string from the search properties given.

impl Device[src]

pub fn new<T>(ip: T) -> Result<Device, Error> where
    T: ToSocketAddrs + Display
[src]

Create an HTTP client to communicate with a Roku device. This assumes the device URL is http://ROKU_IP_HERE:8060.

pub fn from_url(url: &str) -> Result<Device, Error>[src]

Creates an HTTP client with a specified URL to communicate with a Roku device. Use this if the default URL (http://ROKU_IP_HERE:8060) is not usable to you.

pub async fn ping(&self) -> Result<(), Error>[src]

Pings the Roku device to check if the device is online.

Trait Implementations

impl Debug for Device[src]

Auto Trait Implementations

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]