1#![allow(dead_code)]
2extern crate self as helldivers2_rs;
3
4use std::sync::OnceLock;
5
6#[macro_export]
7macro_rules! impl_route {
8 ($endpoint:literal, $fn_name:ident, $out_type:ty, $desc:literal) => {
9 #[doc = $desc]
10 #[doc = ""]
11 #[doc = concat!("Endpoint: `", $endpoint, "`")]
12 pub async fn $fn_name() -> $crate::prelude::Result<$out_type> {
13 $crate::middleware::request_blocking::<$out_type>($endpoint).await
14 }
15 };
16}
17
18pub mod middleware;
19pub mod models;
20pub mod prelude;
21
22static SUPER_CLIENT: OnceLock<String> = OnceLock::new();
25static SUPER_CONTACT: OnceLock<String> = OnceLock::new();
27
28pub struct HellApi;
31
32impl HellApi {
33 pub fn init(client: &str, contact: &str) {
36 let _ = SUPER_CLIENT.set(String::from(client));
37 let _ = SUPER_CONTACT.set(String::from(contact));
38 }
39}