rrhodium 0.1.0

Lib for building modrinth API getters urls
Documentation
  • Coverage
  • 52.31%
    34 out of 65 items documented15 out of 27 items with examples
  • Size
  • Source code size: 35.98 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.21 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • sergious234/rrhodium
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sergious234

Rrhodium

Crates.io License Documentation

A Rust library for building URLs for the Modrinth API with type-safe builder patterns and proper facet handling.

Features

  • Type-safe URL building: Compile-time guarantees that your API requests are properly constructed
  • Builder pattern: Fluent interface for constructing complex API queries
  • Facet system: Proper handling of Modrinth's CNF (Conjunctive Normal Form) facet requirements

Installation

Add rrhodium to your Cargo.toml:

[dependencies]
rrhodium = "0.1"

Usage

Basic Search Building

use rrhodium::*;

// Build a search URL for projects
let url = SearchBuilder::new()
    .search_type(SearchType::Projects)
    .game_versions(vec!["1.19.2", "1.19.1"])
    .build_url();

Facet Construcction

use rrhodium::*;

FacetsConjunction::new()
    .and(
        FacetsDisjunction::new()
        .or(Facets::Categories("Technology".to_string()))
    )
    .and(
        FacetsDisjunction::new()
        .or(Facets::Categories("Magic".to_string()))
    )
    .and(
        FacetsDisjunction::new()
        .or(Facets::Version("1.19".to_string()))
        .or(Facets::Version("1.19.1".to_string())),
    )

API Coverage

Currently, rhodium supports Modrinth's GET endpoints for:

  • Project search and retrieval
  • Facet-based filtering
  • Various query parameters

Note: Write operations (create/delete/modify projects) are not currently supported and may not be added in the future.