This commit is contained in:
2022-10-22 00:27:36 +02:00
parent 9c8319e114
commit 6aea04ee8e
3 changed files with 1221 additions and 2 deletions

View File

@@ -1,3 +1,18 @@
fn main() {
println!("Hello, world!");
use anyhow::Result;
use obws::Client;
#[tokio::main]
async fn main() -> Result<()> {
// Connect to the OBS instance through obs-websocket.
let client = Client::connect("localhost", 4455, Some("OBS")).await?;
// Get and print out version information of OBS and obs-websocket.
let version = client.general().version().await?;
println!("{:#?}", version);
// Get a list of available scenes and print them out.
let scene_list = client.scenes().list().await?;
println!("{:#?}", scene_list);
Ok(())
}