battlebit_api/
lib.rs

1#![doc = include_str!("../DOCS_README.md")]
2
3mod enums;
4mod endpoints;
5mod error;
6
7#[cfg(feature="async")]
8mod api_async;
9
10#[cfg(not(feature="async"))]
11mod api;
12
13#[cfg(feature="async")]
14pub use api_async::BBApi;
15
16#[cfg(not(feature="async"))]
17pub use api::BBApi;
18
19pub use error::Error;
20pub use endpoints::{ServerData, Leaderboard, Player, Clan};
21pub use enums::*;
22
23#[cfg(test)]
24mod tests {
25    use super::*;
26
27    #[test]
28    fn server_list() {
29        let api = api::BBApi::default();
30        if let Err(e) = api.server_list() {
31            panic!("{e}");
32        }
33    }
34}