This package has been deprecated

Author message:

Use @foxochat/rest instead

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

0.1.15 • Public • Published

Foxogram REST

The HTTP REST API client for foxogram.js

Installation

Install with npm / yarn / pnpm:

npm install @foxogram/rest
yarn add @foxogram/rest
pnpm add @foxogram/rest

Usage

import REST from "@foxogram/rest";
import { APIRoutes, RouteUrlsMap } from "@foxogram/api-types";

const rest = new REST({
  baseURL: RouteUrlsMap.production.api,
})

rest.token = TOKEN;

try {
  await rest.post(APIRoutes.messages(CHANNEL_ID), {
    body: {
      content: "floof by coof",
    },
  });
} catch (error) {
  console.error(error);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @foxogram/rest

Weekly Downloads

5

Version

0.1.15

License

MIT

Unpacked Size

23 kB

Total Files

20

Last publish

Collaborators

  • kasefuchs
  • nelifs