framesmith 0.1.0

A Rust library for controlling Samsung Frame TVs over the local network
Documentation
use crate::protocol::ws_message::WsOutgoing;

impl WsOutgoing {
    pub fn remote_key_press(key_code: &str) -> Self {
        Self {
            method: "ms.remote.control",
            params: super::ws_message::WsOutgoingParams::RemoteControl {
                cmd: "Press".to_string(),
                data_of_cmd: key_code.to_string(),
                option: "false".to_string(),
                type_of_remote: "SendRemoteKey".to_string(),
            },
        }
    }

    pub fn remote_key_release(key_code: &str) -> Self {
        Self {
            method: "ms.remote.control",
            params: super::ws_message::WsOutgoingParams::RemoteControl {
                cmd: "Release".to_string(),
                data_of_cmd: key_code.to_string(),
                option: "false".to_string(),
                type_of_remote: "SendRemoteKey".to_string(),
            },
        }
    }
}