Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

curseforge

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curseforge - npm Package Compare versions

Comparing version 0.2.1 to 1.0.0

docs/.nojekyll

19

CHANGELOG.md

@@ -0,1 +1,20 @@

# [1.0.0](https://github.com/guillaumearm/curseforge/compare/v0.2.1...v1.0.0) (2021-10-07)
### Code Refactoring
* change imports to get better documentation ([f1ebf4c](https://github.com/guillaumearm/curseforge/commit/f1ebf4ca6322116368eca14fbf9983ed48fcba8f))
### Reverts
* Revert "docs: refactor ts type to interface" ([35bcc11](https://github.com/guillaumearm/curseforge/commit/35bcc11a6a7951e6a7772f88937055e81059f687))
### BREAKING CHANGES
*
## [0.2.1](https://github.com/guillaumearm/curseforge/compare/v0.2.0...v0.2.1) (2021-10-05)

@@ -2,0 +21,0 @@

19

dist/index.d.ts
import { AddonInfo, MinecraftVersionInfo, ModloaderBasicInfo, ModloaderInfo } from './types';
declare const api: {
MinecraftVersionList: () => Promise<MinecraftVersionInfo[]>;
MinecraftVersionInfo: (mcVersion: string) => Promise<MinecraftVersionInfo>;
MinecraftModSearch: (gameVersion: string, searchFilter: string) => Promise<AddonInfo[]>;
MinecraftModpackSearch: (gameVersion: string, searchFilter: string) => Promise<AddonInfo>;
ModloaderList: () => Promise<ModloaderBasicInfo[]>;
ModloaderInfo: (loaderVersion: string) => Promise<ModloaderInfo>;
AddonInfo: (addonId: string | number) => Promise<AddonInfo>;
AddonFilesInfo: (addonId: string | number) => Promise<unknown>;
};
export { api };
export declare const fetchMinecraftVersionList: () => Promise<MinecraftVersionInfo[]>;
export declare const fetchMinecraftVersionInfo: (mcVersion: string) => Promise<MinecraftVersionInfo>;
export declare const fetchMinecraftModSearch: (gameVersion: string, searchFilter: string) => Promise<AddonInfo[]>;
export declare const fetchMinecraftModpackSearch: (gameVersion: string, searchFilter: string) => Promise<AddonInfo>;
export declare const fetchModloaderList: () => Promise<ModloaderBasicInfo[]>;
export declare const fetchModloaderInfo: (loaderVersion: string) => Promise<ModloaderInfo>;
export declare const fetchAddonInfo: (addonId: string | number) => Promise<AddonInfo>;
export declare const fetchAddonFilesInfo: (addonId: string | number) => Promise<unknown>;
export * from './types';

@@ -27,3 +27,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.api = void 0;
exports.fetchAddonFilesInfo = exports.fetchAddonInfo = exports.fetchModloaderInfo = exports.fetchModloaderList = exports.fetchMinecraftModpackSearch = exports.fetchMinecraftModSearch = exports.fetchMinecraftVersionInfo = exports.fetchMinecraftVersionList = void 0;
var axios_1 = __importDefault(require("axios"));

@@ -51,33 +51,38 @@ var CURSEFORGE_API_URL = 'https://addons-ecs.forgesvc.net/api/v2';

};
var api = {
MinecraftVersionList: function () {
return curseforge('/minecraft/version');
},
MinecraftVersionInfo: function (mcVersion) {
return curseforge("/minecraft/version/" + mcVersion);
},
MinecraftModSearch: function (gameVersion, searchFilter) {
return curseforge('/addon/search', {
params: __assign(__assign({}, SEARCH_BASE_PARAMS), { gameVersion: gameVersion, searchFilter: searchFilter, sectionId: SECTIONS.MOD }),
});
},
MinecraftModpackSearch: function (gameVersion, searchFilter) {
return curseforge('/addon/search', {
params: __assign(__assign({}, SEARCH_BASE_PARAMS), { gameVersion: gameVersion, searchFilter: searchFilter, sectionId: SECTIONS.MODPACK }),
});
},
ModloaderList: function () {
return curseforge('/minecraft/modloader');
},
ModloaderInfo: function (loaderVersion) {
return curseforge("/minecraft/modloader/" + loaderVersion);
},
AddonInfo: function (addonId) {
return curseforge("/addon/" + addonId);
},
AddonFilesInfo: function (addonId) {
return curseforge("/addon/" + addonId + "/files");
},
var fetchMinecraftVersionList = function () {
return curseforge('/minecraft/version');
};
exports.api = api;
exports.fetchMinecraftVersionList = fetchMinecraftVersionList;
var fetchMinecraftVersionInfo = function (mcVersion) {
return curseforge("/minecraft/version/" + mcVersion);
};
exports.fetchMinecraftVersionInfo = fetchMinecraftVersionInfo;
var fetchMinecraftModSearch = function (gameVersion, searchFilter) {
return curseforge('/addon/search', {
params: __assign(__assign({}, SEARCH_BASE_PARAMS), { gameVersion: gameVersion, searchFilter: searchFilter, sectionId: SECTIONS.MOD }),
});
};
exports.fetchMinecraftModSearch = fetchMinecraftModSearch;
var fetchMinecraftModpackSearch = function (gameVersion, searchFilter) {
return curseforge('/addon/search', {
params: __assign(__assign({}, SEARCH_BASE_PARAMS), { gameVersion: gameVersion, searchFilter: searchFilter, sectionId: SECTIONS.MODPACK }),
});
};
exports.fetchMinecraftModpackSearch = fetchMinecraftModpackSearch;
var fetchModloaderList = function () {
return curseforge('/minecraft/modloader');
};
exports.fetchModloaderList = fetchModloaderList;
var fetchModloaderInfo = function (loaderVersion) {
return curseforge("/minecraft/modloader/" + loaderVersion);
};
exports.fetchModloaderInfo = fetchModloaderInfo;
var fetchAddonInfo = function (addonId) {
return curseforge("/addon/" + addonId);
};
exports.fetchAddonInfo = fetchAddonInfo;
var fetchAddonFilesInfo = function (addonId) {
return curseforge("/addon/" + addonId + "/files");
};
exports.fetchAddonFilesInfo = fetchAddonFilesInfo;
__exportStar(require("./types"), exports);
{
"name": "curseforge",
"version": "0.2.1",
"description": "a Curserforge user-friendly API wrapper",
"version": "1.0.0",
"description": "Non-official Javascript/Typescript bindings for the Curseforge API",
"author": "Guillaume ARM <trapcodien@gmail.com>",

@@ -14,2 +14,3 @@ "homepage": "https://github.com/guillaumearm/curseforge#readme",

"dist/*",
"docs/*",
"package.json",

@@ -21,5 +22,7 @@ "README.md",

"scripts": {
"build": "echo Typescript compilation... && tsc",
"build": "tsc",
"build:docs": "rimraf docs && typedoc --tsconfig tsconfig.json --out docs src/index.ts && prettier ./docs --write",
"build:all": "yarn run build && yarn run build:docs",
"build:watch": "yarn run build --watch",
"rebuild": "yarn run clean && echo Typescript compilation... && tsc",
"rebuild": "yarn run clean && yarn run build",
"build:check": "tsc --noEmit",

@@ -59,2 +62,4 @@ "check": "yarn run build:check && yarn run lint:all",

"ts-node": "^10.2.1",
"typedoc": "^0.22.5",
"typedoc-plugin-markdown": "^3.11.3",
"typescript": "^4.4.2"

@@ -61,0 +66,0 @@ },

@@ -1,5 +0,11 @@

# a Curserforge user-friendly API wrapper
# Curserforge API bindings
Warning: This is a WIP project for now, so the implementation and the documentation are not completed yet.
This is the non-official Javascript/Typescript bindings for the [Curseforge API](https://curseforgeapi.docs.apiary.io/)
**Warning: This is WIP project, not all bindings are supported.**
### Full documentation
[**Link to the latest documentation**](https://github.com/guillaumearm/curseforge/blob/master/docs/modules.md)
### Installation

@@ -11,2 +17,8 @@

or
```bash
yarn add -D curseforge
```
### Usage

@@ -18,5 +30,11 @@

curseforge.api.MinecraftVersionInfo('1.16.5').then((mcInfo: MinecraftVersionInfo) => {
curseforge.fetch.MinecraftVersionInfo('1.16.5').then((mcInfo: MinecraftVersionInfo) => {
console.log('=>', mcInfo);
});
```
### Other informations
API url: [https://addons-ecs.forgesvc.net/api/v2](https://addons-ecs.forgesvc.net/api/v2)
API official documentation: [https://curseforgeapi.docs.apiary.io/](https://curseforgeapi.docs.apiary.io/)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc