@fuwa/rest
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@fuwa/rest

A minimal, yet feature-complete, client for Discord's public REST API. Uses undici internally.

Installation

# using yarn
$ yarn add @fuwa/rest
# or pnpm
$ pnpm add @fuwa/rest
# or even npm
$ npm install --save @fuwa/rest

Usage

import { REST } from '@fuwa/rest';

const client = new REST("my_token");

await client.patch("/users/@me", {
  body: {
    username: "fuwa_l0v3r"
  },
});

// want it simpler? here you go:
await client.editCurrentUser({
  username: "fuwa_l0v3r_shorthand"
});

Documentation

All endpoints under REST are represented by their name in the Discord Developer Docs.

Documentation is planned and on the roadmap. Check back here later.

Links

Readme

Keywords

none

Package Sidebar

Install

npm i @fuwa/rest

Weekly Downloads

4

Version

0.4.0

License

MIT

Unpacked Size

252 kB

Total Files

42

Last publish

Collaborators

  • splatterxl