@magitools/forem-wrapper
v0.0.1
Published
A Forem V1 Api Wrapper
Downloads
1
Readme
@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 (also accessible as a demo here)