Skip to content

Assistants-Technologies/Compare-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple tool to listen for changes to the endpoint API!

Install

yarn add compare-api 
//or
npm i compare-api

Usage

const CompareAPI = require('compare-api');
const APIListener = new CompareAPI({
    apiUrl: 'https://assistantscenter.com/api/test/',
    timeout: 10000,
    successStatus: 200,
    onCheck: () => console.log('Checking!'),
});

APIListener.start();

APIListener.events.on('dataChanged', ({oldData, newData}) =>{
    console.log(oldData, newData);
});

APIListener.events.on('fetchError', ({message, code}) =>{
    console.log(message, code);
});

Screenshot from usage sample

License

The project is under MIT licence.

About

A simple tool to listen for changes to the endpoint API!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published