1.1.2 • Published 2 years ago

icmodsapi v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ICModsAPI

license npm downloads npm version

Simple Node.js module that allows you to interact with the ICMods API.

Installation

npm i --save icmodsapi

Usage API

Get full description for mod

import ICModsAPI from 'icmodsapi';

(async () => {
	const mod = await ICModsAPI.getModInfo(22);
	// or ICModsAPI.description
	console.log(mod);
})();

Get List Mods

const mods = await ICModsAPI.list(ICModsAPI.Sort.POPULAR, 0, 20);
console.log(mods);
const mods = await ICModsAPI.listForIds([22, 299]);
console.log(mods);

Search mods

const mods = await ICModsAPI.searchMods("industrial");
console.log(mods);

const mods = await ICModsAPI.searchModsAtTag("global");
console.log(mods);

const mods = await ICModsAPI.searchModsFromAuthor(2);
console.log(mods);

Get Image

import { writeFileSync } from "fs";

//...

const mod = await ICModsAPI.getModInfo(22);
writeFileSync("fileName.png", await ICModsAPI.getImage(mod.icon), { encoding: "binary" });

License(MIT)

See the LICENSE file for details.

1.1.1

2 years ago

1.1.2

2 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago