crocdb
v0.1.3
Published
A CLI and library for querying CrocDB.
Downloads
8
Readme
crocdb
A library and CLI tool for using the CrocDB API.
Installation
npm i crocdbOr, to have the crocdb CLI command available everywhere, install globally:
npm i -g crocdbCLI
Run crocdb help to see a list of available commands, and crocdb help [command] to see help for individual commands.
You can also view the CrocDB API documentation for more details and examples.
Examples
Get the first 5 results for NES, SNES, or N64 games containing "mario" released in the US region:
crocdb search \ --title-human "%mario%" \ --platform NES SNES N64 \ --regions US \ --limit 5[ { "gameid": 1386, "slug": "dr-mario-japan-2-usa-en-rev-1-us-jp-nes-nes", "original_name": "Dr. Mario (Japan, USA) (En) (Rev 1)", ... } ... ]Get the available platforms from CrocDB:
crocdb platforms{ "NES": "Nintendo", "SNES": "Super Nintendo", "GB": "GameBoy", "GBC": "GameBoy Color", ... }Get the available regions from CrocDB:
crocdb regions{ "US": "USA", "EU": "Europe", "JP": "Japan", "NS": "Not specified", "ANY": "World" }
API
These are equivalent to the CLI commands above:
import { api } from "crocdb";
api.search({
titleHuman: "%mario%",
platform: ["NES", "SNES", "N64"],
regions: ["US"],
limit: 5,
}).then(result => console.log(result));
api.platforms().then(result => console.log(result));
api.regions().then(result => console.log(result));