Comparing version 0.2.1 to 1.0.0
@@ -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 @@ |
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/) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
38421
11
270
0
39
16