[][src]Struct ha_api::HomeAssistantAPI

pub struct HomeAssistantAPI { /* fields omitted */ }

Implementations

impl HomeAssistantAPI[src]

pub fn new(instance_urls: Vec<String>) -> Self[src]

pub fn auth_token(
    &mut self,
    oauth_token: String,
    refresh_token: String,
    token_expiration: u64
) -> Result<(), Error>
[src]

pub fn auth_authorization_code(
    &mut self,
    authorization_code: String
) -> Result<(), Error>
[src]

pub fn auth_long_lived_token(
    &mut self,
    long_lived_token: String
) -> Result<(), Error>
[src]

pub fn need_refresh(&self) -> bool[src]

pub fn refresh_token(&mut self) -> Result<(), Error>[src]

pub fn register_device(
    &mut self,
    device_data: DeviceRegistrationRequest
) -> Result<(), Error>
[src]

pub fn register_sensor(
    &mut self,
    sensor_data: SensorRegistrationData
) -> Result<(), Error>
[src]

pub fn update_sensor(
    &mut self,
    sensor_data: SensorUpdateData
) -> Result<(), Error>
[src]

Trait Implementations

impl Debug for HomeAssistantAPI[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, U> Into<U> for T where
    U: From<T>, 
[src]

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.