laftel-rs

Crates.iolaftel-rs
lib.rslaftel-rs
version0.0.2
created_at2026-01-19 15:13:10.760616+00
updated_at2026-01-21 17:32:58.259533+00
descriptionA Rust wrapper for the Laftel.net API
homepage
repositoryhttps://github.com/KakouLabs/Laftel-rs
max_upload_size
id2054789
size96,960
(KimKyuRae)

documentation

README

Laftel.rs

Unofficial Rust Laftel.net API Wrapper

Crates.io Docs.rs License


📦 Installation

Add this to your Cargo.toml:

[dependencies]
laftel-rs = "0.1.0"
tokio = { version = "1.0", features = ["full"] } # For async support

🛠️ Usage

Asynchronous (Default)

use laftel_rs::LaftelClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = LaftelClient::new()?;
    
    // Search for anime
    let results = client.search_anime("전생슬").await?;
    
    if let Some(first) = results.first() {
        println!("Found: {} ({})", first.name, first.url());
        
        // Get detailed information
        let info = client.get_anime_info(first.id).await?;
        println!("Summary: {}", info.content);
    }
    
    Ok(())
}

Synchronous (Blocking)

use laftel_rs::blocking::LaftelBlockingClient;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = LaftelBlockingClient::new()?;
    
    let results = client.search_anime("전생슬")?;
    for result in results {
        println!("- {}", result.name);
    }
    
    Ok(())
}

📜 License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

🤝 Acknowledgments

Inspired by the original Python implementation.

Commit count: 29

cargo fmt