Modrinth API is a simple library for using Modrinth's API in Rust projects

Overview

Ferinth

github badge crates badge docs.rs

Ferinth is a simple library for using 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
  • User authentication
  • Get current user (constrained by lack of user authentication)

Unfortunately, I am not planning to implement any of these features in version 1 due to poor documentation. I will add these features in version 2.

Use

The major version of this crate's version directly corresponds to the API version it uses. So if you want to use the Modrinth API version 1, then specify this crate version as "1", and so on.
After you have decided the API version to use, you can add this crate to your Cargo.toml like so

[dependencies]
ferinth = "1"
You might also like...
A simple message based networking library for the bevy framework

Spicy Networking for Bevy bevy_spicy_networking is a solution to the "How do I connect multiple clients to a single server" problem in your bevy games

A simple web server(and library) to display server stats over HTTP and Websockets/SSE or stream it to other systems.

x-server-stats A simple web server(and library) to display server stats over HTTP and Websockets/SSE or stream it to other systems. x-server(in x-serv

The gRPC library for Rust built on C Core library and futures

gRPC-rs gRPC-rs is a Rust wrapper of gRPC Core. gRPC is a high performance, open source universal RPC framework that puts mobile and HTTP/2 first. Sta

A µTP (Micro/uTorrent Transport Library) library implemented in Rust

rust-utp A Micro Transport Protocol library implemented in Rust. API documentation Overview The Micro Transport Protocol is a reliable transport proto

Cross-platform, low level networking using the Rust programming language.

libpnet Linux ∪ OS X Build Status: Windows Build Status: Discussion and support: #libpnet on freenode / #rust-networking on irc.mozilla.org / #rust on

Implementing Bendersnatch curve using Arkwork's framework in Rust.

This is a reference implementation of Bendersnatch curve using Arkwork's framework in Rust. The spec of the curve is available here. There was also a Python reference implementation here.

WIP / POC for using the BL602 wifi blob from Rust

BL602 Wifi Rust This is work in progress and currently more a proof of concept. The code is awfully hacked together - just enough to make it work. It

Examples of interacting with a Polkadot node using Rust

Examples of interacting with a Polkadot node Some examples of using JSON RPC to interact with a Polkadot node, working up to manually building and sub

RusTCP is an attempt to rewrite some of the PyTCP stack functionality using Rust language.
RusTCP is an attempt to rewrite some of the PyTCP stack functionality using Rust language.

RusTCP is an attempt to rewrite some of the PyTCP stack functionality using Rust language. Currently, the main goal of this project is to create a stable IPv6 platform that could be used to facilitate the process of labing the SRv6 technology.

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
A simple API gateway written in Rust, using the Hyper and Reqwest libraries.

API Gateway A simple API gateway written in Rust, using the Hyper and Reqwest libraries. This gateway can be used to forward requests to different bac

Adão Raul 3 Apr 24, 2023
Testing interactions with other NFT projects locally is difficult

Terra NFT Stub contract Testing interactions with other NFT projects locally is difficult. Terra NFT Stub makes things a bit easier by providing a con

smaster0517 5 Apr 6, 2022
Simple VPN implemented using rust

fubuki Simple VPN implemented using rust fubuki是类似与tincVPN的简单组网工具 不支持对等NAT 支持的平台: Windows Linux 工作机制 它由一台拥有公网IP的服务器来维持各个内网客户端的实际地址映射,在客户端和客户端之间实现P2P通信

XTY 84 Dec 31, 2022
Obtain (wildcard) certificates from let's encrypt using dns-01 without the need for API access to your DNS provider.

Agnos Presentation Agnos is a single-binary program allowing you to easily obtain certificates (including wildcards) from Let's Encrypt using DNS-01 c

Arthur Carcano 246 Dec 20, 2022
Fake rest is a fake API generator using a config file to help you develop clients.

About Fake-Rest is a fake API generator using a config file to help you develop clients. It's EASY AS HELL. Usage It's very simple to use. just create

Benyamin Eskandari 9 Feb 1, 2023
The Safe Network Core. API message definitions, routing and nodes, client core api.

safe_network The Safe Network Core. API message definitions, routing and nodes, client core api. License This Safe Network repository is licensed unde

MaidSafe 101 Dec 19, 2022
Proxy copilot api to openai's gpt-4 api

Proxying Copilot API to OpenAI's GPT-4 API Usage Start the Server export GHU_TOKEN=ghu_xxxx; ./copilot2chat Or sh start.sh start # start the server th

Smark 3 Dec 6, 2023
A generic Rust based Bigtable connection library implemented using gRPC

A generic Rust based Bigtable connection library refactored out the solana mono-repo so that can be shared for different applications.

Lijun Wang 3 Sep 25, 2022
A library-first, lightweight, high-performance, cloud-native supported API gateway🪐 by RUST

Preview version, will not guarantee the stability of the API! Do NOT use in production environment! A library-first, lightweight, high-performance, cl

Ideal World 4 May 7, 2023
Client library for the Challonge REST API

Client library for the Challonge REST API

Victor Polevoy 2 Jul 5, 2022