1.0.4 • Published 7 years ago

simple-rlm v1.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

SimpleRateLimitManager

A simple ratelimit manager

Greenkeeper badge Build Status Scrutinizer Code Quality npm version MIT Licence Open Source Love TypeScript

forthebadge

What is it?

it's a deadsimple ratelimit manager. It does what it says. it contains one function called call which has a few setup options.

Get Started

install the wrapper by entering: npm install --save simple-rlm

proceed by importing the wrapper and creating the SimpleRateLimitManager object.

import RateManager from 'simple-rlm'


/** Create Wrapper Object */
const rlm = new RateManager(1000, 3600)

rlm.call('wait', (callsLeft, periodLeft, error) => {
    if (err) {
        console.log(err)
    } else {
        //perform the thing you want to do
    }
})

For the documentation and example click here