blockpalettes-client

Crates.ioblockpalettes-client
lib.rsblockpalettes-client
version0.1.1
created_at2025-10-17 23:38:23.857484+00
updated_at2025-10-17 23:45:28.067322+00
descriptionUnofficial Rust client for BlockPalettes with built-in HTTP and scraping support
homepage
repositoryhttps://github.com/walker84837/blockpalettes-client
max_upload_size
id1888588
size99,067
winlogon (walker84837)

documentation

README

blockpalettes-client

crates.io version docs.rs documentation crates.io license crates.io downloads dependency status

Unofficial Rust client for BlockPalettes with built-in HTTP and scraping support.

Why blockpalettes-client Exists

https://blockpalettes.com is great for exploring Minecraft block color palettes, but its search interface is limited:

  • You can only search for one block at a time;
  • Filtering by multiple blocks or automating repeated searches is not supported;
  • Some data, like similar palettes or full block lists, is only accessible via the HTML pages, not the API;

This library solves these issues by:

  • Allowing multi-block searches for palettes;
  • Providing convenient methods to fetch popular blocks and palette details;
  • Supporting similar palette retrieval;
  • Scraping additional data directly from the website when necessary.

Installation

Use cargo add:

cargo add blockpalettes-client

Usage

Here's a very basic example of how to use blockpalettes-client to search for blocks:

use blockpalettes_client::BlockPalettesClient;
use reqwest::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let http_client = Client::new();
    let client = BlockPalettesClient::new(http_client);

    match client.search_blocks("stone").await {
        Ok(blocks) => println!("Found blocks: {:?}", blocks),
        Err(e) => eprintln!("Error searching blocks: {}", e),
    }

    Ok(())
}

Note: This is a minimal example. Please refer to the docs.rs documentation for the full API and more detailed usage.

Disclaimers

Because there isn't proper documentation for the API:

  • If it changes its APIs, internal structure, or adds CAPTCHA verification, parts of this library may stop working (like HTML scraping). Make an issue if this happens.
  • I'm not sure if the website has ANY sort of rate limiting. Please do not make requests too frequently to avoid overloading the website.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

This project is licensed under dual-licensed under the MIT License and the Apache 2.0 license, either at your choice. See the LICENSE-MIT and LICENSE-APACHE file for details.

Commit count: 0

cargo fmt