refluxer 0.2.0

Rust API wrapper for Fluxer
Documentation
use serde::Deserialize;

use crate::error::HttpError;
use crate::http::client::HttpClient;
use crate::http::routing::Route;

#[derive(Debug, Clone, Deserialize)]
pub struct GatewayBotInfo {
    pub url: String,
    pub shards: u32,
    pub session_start_limit: SessionStartLimit,
}

#[derive(Debug, Clone, Deserialize)]
pub struct SessionStartLimit {
    pub total: u32,
    pub remaining: u32,
    pub reset_after: u64,
    pub max_concurrency: u32,
}

impl HttpClient {
    pub async fn get_gateway_bot(&self) -> Result<GatewayBotInfo, HttpError> {
        self.request_no_body(Route::GetGatewayBot).await
    }
}