A Forem API(v1) wrapper.
- articles (see list of endpoint here)
To use this package, simply install it in your project by using npm, yarn or pnpm
npm install @magitools/forem-wrapperYou 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