osu-collector-node
v1.0.3
Published
An osu!Collector api wrapper
Downloads
7
Readme
Osu-Collector-Node
Osu-Collector-Node is a wrapper for osu!Collector API which is written in typescript.
Installation
npm i osu-collector-node
##
yarn add osu-collector-node
Documentation
Example Usage
const { OsuCollectorNode } = require("osu-collector-node");
const cookie = "your-cookie";
const osuCollector = new OsuCollectorNode().setCookie(cookie);
// Fetch data of current logged-in user.
osuCollector.getUserMe().then(console.log).catch(console.error);
// Fetch metadata (this does not requires a cookie)
osuCollector.getMetadata().then(console.log).catch(console.error);
// Typescript return type example
osuCollector.getUser<"Uploads">({ id: 2051389 }).then(console.log).catch(console.error);
For more information, check the documentation
Contributing
Typings are written manually by me, there's might be typo, missing or errors in props, once found, please open an issue or pull request for enhancement. Big appreciate.