framesmith 0.1.0

A Rust library for controlling Samsung Frame TVs over the local network
Documentation
mod auth_token_store;
mod discover;
mod error;
mod file_auth_token_store;
mod frame_tv;
mod frame_tv_api;
mod frame_tv_connection_builder;
mod frame_tv_impl;
#[allow(dead_code)]
mod frame_tv_transport;
#[allow(dead_code)]
pub(crate) mod protocol;
#[allow(dead_code)]
pub(crate) mod transport;
pub mod types;

pub use auth_token_store::AuthTokenStore;
pub use discover::discover;
pub use error::Error;
pub use file_auth_token_store::FileAuthTokenStore;
pub use frame_tv::FrameTv;
pub use frame_tv_connection_builder::FrameTvConnectionBuilder;
pub use types::*;

/// Fetch device info via the REST API (port 8001). No auth token required.
pub async fn get_device_info(host: std::net::IpAddr) -> Result<DeviceInfo, Error> {
    let client = transport::tls_config::make_reqwest_client();
    let rest = transport::rest_client::RestClient::new(host, client);
    rest.get_device_info().await
}

#[cfg(test)]
mod tests;