obws/lib.rs
1//! # OBWS - The obws (obvious) remote control library for OBS
2//!
3//! Remote control OBS with the [obs-websocket] plugin from Rust 🦀.
4//!
5//! [obs-websocket]: https://github.com/Palakis/obs-websocket
6//!
7//! ## Example
8//!
9//! ```no_run
10//! use anyhow::Result;
11//! use obws::Client;
12//!
13//! #[tokio::main]
14//! async fn main() -> Result<()> {
15//! /// Connect to the OBS instance through obs-websocket.
16//! let client = Client::connect("localhost", 4455, Some("password")).await?;
17//!
18//! /// Get and print out version information of OBS and obs-websocket.
19//! let version = client.general().version().await?;
20//! println!("{:#?}", version);
21//!
22//! /// Get a list of available scenes and print them out.
23//! let scene_list = client.scenes().list().await?;
24//! println!("{:#?}", scene_list);
25//!
26//! Ok(())
27//! }
28//! ```
29//!
30//! ## Differences to obs-websocket API design
31//!
32//! You may notice that several functions are named differently from the original `obs-websocket`
33//! documentation. To help you find the right functions, have a look at [`docs::mapping`].
34
35#![warn(missing_docs, rust_2018_idioms, clippy::all)]
36
37pub use self::client::Client;
38
39pub mod client;
40pub mod common;
41#[cfg(doc)]
42pub mod docs;
43pub mod error;
44#[cfg(feature = "events")]
45pub mod events;
46pub mod requests;
47pub mod responses;
48
49mod serde;