Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

curse-api-js

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curse-api-js

A modern NodeJS library to easily retrieve informations using the CurseForge API

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

Curse-API-JS

🚀 A modern NodeJS wrapper library to easily retrieve informations using the new CurseForge API. An equivalent to the Curse API, a PHP Library made by mTxServ.

Available on NPM here.

Please do not forget to star the project if you like/use it ⭐

Dependencies

  • Node >= 18

This library has been made to be lightweight and to not depend on any other package, for the best reliability. This way, you can safely use it for all of your projects without hassle.

Installation

npm install curse-api-js

Example

const { curseClient } = require("curse-api-js");

const curse = new curseClient()

curse.setToken(<your_api_key>) // https://console.curseforge.com/?#/api-keys

// Get the 30 most popular mods for Minecraft 1.19
curse.Minecraft.getMods('1.19')

Methods

CurseAPIJS will support all the games available on CurseForge. For now, only Minecraft is available so all the methods will use Minecraft as an example. Feel free to suggest what will be the next game!

// Sets your personal/team token to access CurseForge API, mandatory.
curse.setToken(<your_api_key>)

// Access the specified game methods, e.g Minecraft
curse.Minecraft

// Returns all the Minecraft versions with their corresponding ID to perform more complex operations afterwards
curse.Minecraft.getVersions()

/**
*   Returns mods for the specified version
*   {string} mandatory - version slug ("1.19" for example), only major versions
*   {int}    optional  - filter you wish to use among those enum values: https://docs.curseforge.com/?javascript#tocS_ModsSearchSortField
/
curse.Minecraft.getMods(<versionSlug>, <filter>)

// Not yet implemented
curse.Minecraft.getFeaturedMods()

Keywords

minecraft

FAQs

Package last updated on 19 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts