You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
obws/examples/simple.rs

26 lines
533 B
Rust

use std::env;
use anyhow::Result;
use obws::client::Client;
#[tokio::main]
async fn main() -> Result<()> {
dotenv::dotenv().ok();
env::set_var("RUST_LOG", "obws=debug");
pretty_env_logger::init();
let client = Client::connect("localhost", 4444).await?;
let version = client.general().get_version().await?;
println!("{:#?}", version);
client.login(env::var("OBS_PASSWORD").ok()).await?;
let scene_list = client.scenes().get_scene_list().await?;
println!("{:#?}", scene_list);
Ok(())
}