Modrinth API is a simple library for using, you guessed it, the Modrinth API in Rust projects

Overview

Modrinth API

Modrinth API is a simple library for using, you guessed it, the Modrinth API in Rust projects. It uses reqwest as its HTTP(S) client and deserialises responses to typed structs using serde.

As of now, the following features have been implemented

This means that the following features have not yet been implemented

  • Search mods (expected in 1.1.0)
  • User authentication
  • Get current user (constrained by lack of user authentication)

Use

To use the Modrinth API, you first need to decide which version of the API you want to use. The current version, v1, is only for the beta. A new better documented version, v2, is expected in the coming months and will be supported in version modrinth-api v2. The major version of this crate's version directly corresponds to the API version it supports. After you have decided the API version to use, you can add this library under the [dependencies] section in your Cargo.toml.

You might also like...
 Achieve it! How you ask? Well, it's pretty simple; just use greatness!
Achieve it! How you ask? Well, it's pretty simple; just use greatness!

Greatness! Achieve it! How you ask? Well, it's pretty simple; just use greatness! Disclaimer I do not believe that greatness is the best. It fits a me

Simple programming language that speaks the ones you already know!

Simple programming language that speaks the ones you already know!

Rust library that can be reset if you think it's slow

GoodbyeKT Rust library that can be reset if you think it's slow

Edgelord is a library for Cloudflare Workers. You can scaffold a basic bot for discord, slack, etc.

Edge Computing + chūnibyō = Edgelord ✨ 👿 Edgelord Edgelord is now working. You can contribute for it. Edgelord is a Rust library for cloudflare worke

A Simple, But amazing telegram bot, Made using the Rust language!

Telegram bot in Rust A fun Telegram bot made using Rust language.

A tool to calculate mean and standard deviation from multiple tests using PageSpeed Insights API.

psi-sample PSI Test tool is an open source tool to assist web developers that runs Page Speed Insight test manually! Installing To install the psi-tes

Blazingly fast spam classification API built using Rocket Web Framework.

Telegram Antispam API Blazingly fast spam classification API built using Rocket Web Framework. Notes The classifier works in aggressive mode, it can s

This contract implements simple vote for the best coffe in indonesia using near protocol.

vote-coffe-near Description This contract implements simple vote for the best coffe in indonesia using near protocol. Contract in contract/src/lib.rs

A simple, fast and fully-typed JSPaste API wrapper for Rust

rspaste A simple, fast and fully-typed JSPaste API wrapper for Rust. aidak.tk » Installation Put the desired version of the crate into the dependencie

Comments
  • Allow getting a Version with a file hash

    Allow getting a Version with a file hash

    opened by 4JX 8
  • V2 bringup

    V2 bringup

    This is still a WIP, but I might as well open it already. V1 to V2 migration guide can be found here

    • Routes have been corrected to account for the new naming (mod > project).
    • Checked for feature parity with the API repo and added/renamed accordingly

    To consider:

    • The wording of comments, methods and structs is most likely going to need to be changed as mods are now called projects in preparation for modpack support
    • permissions in TeamMember is defined here
    • Using #[serde(deny_unknown_fields)] to catch inconsistencies earlier may be useful
    • Re-export Bytes to avoid having to explicitly add it to the dependency list if not used anywhere else.

    I'd want to see support added for using filters in the queries. Maybe something like the following could work to still keep the text based ones simple:

    struct Query {}
    
    impl From<String> for Query {}
    

    And then some logic inside each function (get_mod, list_mods, etc) to handle the filters that are valid for the endpoint being reached.

    opened by 4JX 5
  • Implements `/search` endpoint

    Implements `/search` endpoint

    This pull request implements the /search endpoint according to the Modrinth API Specification.

    In order to implement said endpoint, a new helper method for HTTP GET was created, get_with_optional_query, since either meilisearch or labirinth doesn't handle the passing of empty optional queries (e.g &facets=[], &filters="", &version="", etc.), that method solves that function by filtering the key-value pairs that have a value of None out, and as such they aren't added to the request.

    It also adds utilities for safely interacting with the facet api, FacetBuilder and ModrinthFacet.

    This API is subject to change, since this is my first time writing rust code and I don't know what is idiomatic or not.

    opened by roridev 2
  • Remove option from file hashes

    Remove option from file hashes

    Corresponding to the current API specs (and I read it in the announcement channel of Modrinth's Discord) all old versions got their file hashes generated

    opened by Eskaan 0
Owner
Hobby student developer Currently working on Rust Former Flutter/Dart and Python developer
null
Ocular seeks to be the preferred cosmos client library UX for Rust projects

Ocular seeks to be the preferred cosmos client library UX for Rust projects. It is strongly based on lens, a go client library for blockchains built with the Cosmos SDK.

Peggy JV, Inc 34 Dec 26, 2022
This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you specified.

prae This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you spec

null 96 Dec 4, 2022
The batteries for core that you never knew you needed.

core+ The batteries for core that you never knew you needed: core+ coreplus documentation Core+ contains types that make it possible to write no_std l

Lachlan Sneff 12 May 11, 2022
Tells you how many years you need to wait until your subatomic xeon crystal synchronizer has doubled in plasma inversion efficiency on the Goldberg-Moleman scale or whatever.

about Tells you how many years you need to wait until your subatomic xeon crystal synchronizer has doubled in plasma inversion efficiency on the Goldb

null 2 Dec 3, 2021
Ever got frustrated when you realize that the for loop you were writing

for_each_repeat Ever got frustrated when you realize that the for loop you were writing... fn foo(mut iter: impl Iterator<Item=i32>) { for i in it

null 1 Jun 18, 2022
A tool that, like, screams at you when you say like

Dislike Do you, like,... dislike constantly saying "like" as much as I do? Then, like,... you've come the right place! This tool is like EXACTLY what

ElKowar 27 Jun 27, 2022
Gathering some metrics about github projects

rust-metrics This is an experimental project to start gathering metrics about github organizations and repositories. The goal is to get an idea of var

null 51 Apr 9, 2022
Wally is a modern package manager for Roblox projects inspired by Cargo

Wally is a package manager for Roblox inspired by Cargo (Rust) and npm (JavaScript). It brings the familiar, community-oriented world of sharing code from other communities into the Roblox ecosystem.

Uplift Games 194 Jan 3, 2023
A repository containing dozens of projects requiring vastly different skillsets.

The 100 Project Challenge A repository containing dozens of projects requiring vastly different skillsets. All the projects that I might add to this r

null 4 Jun 21, 2022
Simple async library for triggering IFTTT events using webhooks.

IFTTT Webhook A simple Rust async library for triggering IFTTT events using webhooks. Installation Installation can be performed using cargo add: carg

Leo Dutra 1 Mar 11, 2021