https://github.com/ariesclark/modrinth
JavaScript library for accessing the Modrinth API
https://github.com/ariesclark/modrinth
api library minecraft modrinth mods
Last synced: 6 months ago
JSON representation
JavaScript library for accessing the Modrinth API
- Host: GitHub
- URL: https://github.com/ariesclark/modrinth
- Owner: ariesclark
- License: apache-2.0
- Created: 2021-02-12T09:20:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-10T00:42:03.000Z (over 3 years ago)
- Last Synced: 2025-03-08T00:46:25.584Z (7 months ago)
- Topics: api, library, minecraft, modrinth, mods
- Language: TypeScript
- Homepage: https://modrinth.js.org
- Size: 123 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# **Not currently maintained due to a dispute with the Modrinth Team and other related individuals.**
If you're interested in maintaining this package, feel free to contact me on Discord. support inquries will be ignored.# Modrinth.js
JavaScript library for accessing the [**Modrinth**](https://modrinth.com) API.[](https://discord.gg/azqKNq5geD) []()   
**Disclaimer: This package is in no way an official package, nor will you recieve support from the Modrinth Team in any official capacity for using this package. Any and all problems or support should be directed to [Ruby](https://discord.gg/WUgGJhS), our [issue tracker](https://github.com/rubybb/modrinth/issues), or other contributors.**
## Resources
[**Website**](https://modrinth.js.org) -
[**Documentation**](https://modrinth.js.org/) -
[**Source**](https://github.com/rubybb/modrinth/) -
[**Discord**](https://discord.gg/azqKNq5geD)## Install
Available on NPM: [**Modrinth.js**](https://www.npmjs.com/package/modrinth)Ruby's recommended package manager:
[**pnpm: 📦🚀 Fast, disk space efficient package manager**](https://pnpm.js.org/).``pnpm install modrinth`` or ``npm install modrinth``.
## Examples
```ts
import { Modrinth } from "modrinth";const modrinth = new Modrinth({
// GitHub access token, optional.
authorization: "..."
});modrinth.user("rubybb"); // Promise
modrinth.user("suMONnLn"); // Promise
modrinth.users(["rubybb", "jellysquid3"]); // Promise<[User, User]>
modrinth.users(["rubybb", "TEZXhE2U"]); // Promise<[User, User]>modrinth.mod("lambdynamiclights"); // Promise
modrinth.mod("yBW8D80W"); // Promise
modrinth.mods(["lambdynamiclights", "sodium"]); // Promise<[Mod, Mod]>modrinth.version("hKXQNf9z"); // Promise
modrinth.versions(["YuZK7F05", "hKXQNf9z"]); // Promise<[Version, Version>]modrinth.user("jellysquid3").then(async user => {
const mods = await user.mods();
console.log(mods);/*
* something like this. :)
* for the actual object returned, take a look at the documentation.
* https://modrinth.js.org/classes/mod.html
*/
[
{
id: "AANobbMI",
slug: "sodium",
title: "Sodium",
status: "approved",
downloads: 1490,
...
},
...
]
});
```