Skip to content

magitools/forem-wrapper

Repository files navigation

@magitools/forem-wrapper

A Forem API(v1) wrapper.

Current Features:

  • articles (see list of endpoint here)

Usage

To use this package, simply install it in your project by using npm, yarn or pnpm

npm install @magitools/forem-wrapper

You can then instatiate it like so:

import ForemClient from "@magitools/forem-wrapper";

const client = new ForemClient();

you can specify a different forem instance in the constructor if you don't want to send requests to dev.to

const client = new ForemClient("https://your-forem.com/api");

if you need to use endpoints requiring an api-key, you can add one like so:

const client = new ForemClient().setApiKey("your_api_key");

you can view a usage example in the example folder