1.2.0 • Published 2 years ago

@cordis/rest v1.2.0

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

@cordis/rest

GitHub npm TypeScript

Cordis' REST utilities for the Discord API

Note: Props to https://github.com/spec-tacles/spectacles.js for the Mutex logic.

Installation

  • npm install @cordis/rest
  • pnpm install @cordis/rest
  • yarn add @cordis/rest

Example Usage

const { Rest } = require('@cordis/rest');

const main = async () => {
  const rest = new Rest('token');

  const someUser = await rest.get('/users/223703707118731264');
  const someOtherUser = await rest.make({
    path: '/users/198536269586890752',
    method: 'get'
  });

  console.log(someUser, someOtherUser);
};

main();

Documentation

You can find documentation for the whole project over at https://cordis.js.org

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.