@cordis/routers
Construct API paths using simple JavaScript property accessing and execute requests with method calls.
Installation
npm install @cordis/routers
pnpm install @cordis/routers
yarn add @cordis/routers
Example Usage
const { buildRestRouter } = require('@cordis/router');
const { RestManager } = require('@cordis/rest');
const manager = new RestManager(yourToken);
const router = buildRestRouter(manager);
const user = await router.users[someUserId].get();
console.log(user);
Documentation
You can find documentation for the whole project over at https://cordis.didinele.me
Contributing
Please see the main README.md for info on how to contribute to this package or the other @cordis
packages.
LICENSE
Licensed under the Apache 2.0 license.