rzap_ng/
lib.rs

1//! # rzap-ng
2//!
3//! This library provides an interface to control shocker devices via [OpenShock](http://openshock.org)'s API
4//!
5//! > **Note**
6//! > This is an un-official API interface, and a (hopefully temporary) fork of
7//! > [`LostQuasar/rzap`].
8//!
9//! [`LostQuasar/rzap`]: https://github.com/LostQuasar/rzap
10//!
11//! ## Example
12//!
13//! A simple request to retrieve the API key user's id
14//!
15//! ```no_run
16//! use rzap_ng::api::OpenShockAPI;
17//! use dotenv::dotenv;
18//!
19//! #[tokio::main]
20//! async fn main() {
21//! dotenv().ok();
22//! let user_test_id = dotenv::var("USER_TEST_ID").expect("missing USER_TEST_ID");
23//! let openshock_token = dotenv::var("OPENSHOCK_TOKEN").expect("missing OPENSHOCK_TOKEN");
24//!
25//! let openshock_api = OpenShockAPI::new(None, openshock_token).unwrap();
26//! println!("{}", openshock_api.get_user_info(None).await.unwrap().unwrap().id);
27//! }
28//! ```
29//!
30
31pub mod api;
32pub mod api_builder;
33pub mod data_type;
34pub mod error;