insta-logger
v1.0.1
Published
Instatus logger that logs activities and list it
Downloads
2
Readme
insta-logger
Description
insta-logger is a lightweight logging package for Instatus API integration. It provides an easy-to-use interface for logging and create events.
Installation
To install insta-logger, simply run the following command:
npm install insta-logger
Usage
To use insta-logger in your project, import it as follows:
import { InstaLog } from "insta-logger";
Then, you can start creating and listing events using the provided methods:
- Initialize the logger with your access token:
const logger = new InstaLog("access_token");
- Creating event:
await logger.createEvent({ ...event }); // The event data as specified by the Event interface
- Listing Events:
const events = await logger.listEvents({ ...filters }); // The optional filters, to filter the returned events as you want