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.
Go to file
Dominik Nakamura 46b7d960e1
chore(deps): update dependencies
Most notably updating to tokio-tungstenite v0.21.
3 months ago
.config Fix spelling errors copied from obs-websocket 2 years ago
.github chore(ci): switch back to official cargo-deny action 4 months ago
.vscode Replace `dotenv` with `dotenvy` 2 years ago
examples Use format shorthand in more places 1 year ago
src chore: fix new clippy lints 3 months ago
tests Add features from obs-websocket v5.3 5 months ago
.editorconfig Check all feature combinations in the CI 3 years ago
.gitignore Upload coverage to GitHub Pages instead of codecov 3 years ago
CHANGELOG.md Add features from obs-websocket v5.3 5 months ago
Cargo.toml chore(deps): update dependencies 3 months ago
Justfile Adjust Justfile back to the main branch 2 years ago
LICENSE Initial commit 3 years ago
README.md Bump up version number to 0.11.5 8 months ago
deny.toml Bump minimum dependency versions 5 months ago
release.toml Update cargo-release configuration 1 year ago
rustfmt.toml Update dependencies 11 months ago

README.md

OBWS - The obws (obvious) remote control library for OBS

Build Status Repository Documentation Code Coverage

Remote control OBS with the obs-websocket plugin from Rust 🦀.

Usage

Add obws to your project with cargo add obws@0.11.5 or add it manually to your Cargo.toml:

[dependencies]
obws = "0.11.5"

In addition, you will need to use the latest tokio runtime to use this library as it makes heavy use of async/await and is bound to this runtime.

Example

Here we connect to a OBS instance, get some version information and log in to access the whole API and lastly print out a list of available scenes.

For more usage instructions see the docs or check out the examples.

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("password")).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(())
}

License

This project is licensed under MIT License (or http://opensource.org/licenses/MIT).