Crate foru_ms_sdk

Crate foru_ms_sdk 

Source
Expand description

§Foru.ms API v2 SDK

The official Rust SDK for the Foru.ms API v2.

§Getting Started

use foru_ms_sdk::prelude::*;

#[tokio::main]
async fn main() {
    let config = ClientConfig {
        api_key: Some("<value>".to_string()),
        ..Default::default()
    };
    let client = ForumClient::new(config).expect("Failed to build client");
    client
        .auth
        .register(
            &PostAuthRegisterRequest {
                username: "username".to_string(),
                email: "email".to_string(),
                password: "password".to_string(),
                display_name: None,
                roles: None,
                bio: None,
                extended_data: None,
            },
            None,
        )
        .await;
}

§Modules

  • api - Core API types and models
  • client - Client implementations
  • config - Configuration options
  • core - Core utilities and infrastructure
  • error - Error types and handling
  • prelude - Common imports for convenience

Re-exports§

pub use error::ApiError;
pub use api::*;
pub use client::*;
pub use config::*;
pub use core::*;
pub use environment::*;

Modules§

api
API client and types for the Foru.ms API v2
client
config
core
Core client infrastructure
environment
error
prelude
Prelude module for convenient imports