#![cfg_attr(
not(test),
deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
)]
#![cfg_attr(target_arch = "wasm32", allow(clippy::arc_with_non_send_sync))]
pub use rs_plugin_common_interfaces::domain as types;
pub use redseat_crypto as crypto;
pub mod client;
pub mod cloud;
pub mod direct;
pub mod error;
pub mod events;
pub mod library;
pub mod server;
pub mod sse;
pub mod transport;
#[cfg(feature = "http")]
pub mod http;
#[cfg(all(feature = "desktop-auth", not(target_arch = "wasm32")))]
pub mod google;
#[cfg(test)]
mod test_support;
pub use client::{
ClientOptions, CloudTokenSource, EventOptions, RedseatClient, ServerEventStream,
ServerTokenSource,
};
pub use cloud::{CloudClient, CloudServer, CloudSession, CloudUser, ServerToken};
pub use error::{Error, ErrorKind, Result};
pub use events::ServerEvent;
pub use library::{LibraryApi, MediaItem, MediaPage};
pub use server::ServerApi;
pub use transport::Transport;
#[cfg(test)]
mod tests {
use super::types::library::{LibraryType, ServerLibrary};
#[test]
fn reads_a_library_as_the_server_sends_it() {
let library: ServerLibrary = serde_json::from_value(serde_json::json!({
"id": "lib1",
"name": "Photos",
"source": "PathProvider",
"type": "photos",
"settings": {}
}))
.unwrap();
assert_eq!(library.kind, LibraryType::Photos);
}
}