Skip to main content

Crate apifreaks

Crate apifreaks 

Source
Expand description

§APIFreaks APIs SDK

The official Rust SDK for the APIFreaks APIs.

§Getting Started

use apifreaks::prelude::*;

#[tokio::main]
async fn main() {
    let config = ClientConfig {
        ..Default::default()
    };
    let client = ApiFreaks::new(config).expect("Failed to build client");
    client
        .geolocation_lookup(
            &GeolocationLookupQueryRequest {
                api_key: "apiKey".to_string(),
                format: None,
                ip: None,
                lang: None,
                fields: None,
                excludes: None,
                include: 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 error::BuildError;
pub use api::*;
pub use client::*;
pub use config::*;
pub use core::*;
pub use environment::*;

Modules§

api
API client and types for the APIFreaks APIs
client
config
core
Core client infrastructure
environment
error
prelude
Prelude module for convenient imports