noderinth
Version:
API wrapper for Modrinth
60 lines (45 loc) • 1.57 kB
Markdown
>
>
> There is only typings support currently, API access will be coming in future updates.
An unofficial REST API wrapper, complete with an optional structure-based wrapper for easy interaction with the Modrinth API.
- 100% API coverage
- Full typings supported
- Structure-based
- Support for requests only (no structures, just the parsed responses directly from the API).
> **Note:** Currently supporting Version `2` as a base, however some Version `3` routes are also being accessed (adding support for collections).
# Quick Installation Guide
```
npm install noderinth
```
## REST-Only
### Typescript / Import
```ts
import { RESTModrinth } from "noderinth";
let modrinth = new RESTModrinth();
let result = await modrinth.projects.get("fabric-api");
console.log(result.name); // Fabric API
```
```js
const { RESTModrinth } = require("noderinth");
let modrinth = new RESTModrinth();
let result = await modrinth.projects.get("fabric-api");
console.log(result.name); // Fabric API
```
```ts
import { Modrinth } from "noderinth";
let modrinth = new Modrinth();
let result = await modrinth.projects.get("fabric-api");
console.log(result.name); // Fabric API
```
```js
const { Modrinth } = require("noderinth");
let modrinth = new Modrinth();
let result = await modrinth.projects.get("fabric-api");
console.log(result.name); // Fabric API
```