2017 © Pedro Peláez
 

library callkeeper

Sequential API call/access rate keeper to be under limited rate.

image

hirokws/callkeeper

Sequential API call/access rate keeper to be under limited rate.

  • Thursday, February 1, 2018
  • by HiroKws
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Callkeeper

Limit API calling to keep under limited rate per an unit time., (*1)

This implement is logic without using timer. So simple and light weight., (*2)

単位時間内でAPIの呼び出し回数を制限する。, (*3)

タイマーを使用しない簡単なロジックで実装しているため、シンプルで軽い。, (*4)

Laravelのワーカーとして利用するために開発したもの。APIコントロールは1常駐プロセスで行うと簡単に実現できる。, (*5)

Usage

require __DIR__ . '/vendor/autoload.php';

use Callkeeper\Callkeeper;

...

/* Initialize */
$keep = new Callkeeper(3, 3000); // 3 times per 3,000 ms (3 seconds)

/* check and wait if needed */
$keep->limit();

$response = WebApiCalling(...);

...

Caution

This is simple keeper, so it is not thread safe. Also not async calling safe., (*6)

This is for sequential calling for single system from one process/thread., (*7)

License

MIT License., (*8)

Copyright reserved by Hirohisa Kawase., (*9)

Addition

Sorry for no test. It is hard to write tests for this type library... :P :D, (*10)

The Versions

01/02 2018

dev-master

9999999-dev

Sequential API call/access rate keeper to be under limited rate.

  Sources   Download

MIT MIT License

09/01 2017

1.0.3

1.0.3.0

Sequential API call/access rate keeper to be under limited rate.

  Sources   Download

MIT License

02/12 2016

1.0.2

1.0.2.0

Sequential API call/access rate keeper to be under limited rate.

  Sources   Download

MIT License

02/12 2016

1.0.1

1.0.1.0

Sequential API call/access rate keeper to be under limited rate.

  Sources   Download

MIT License

02/12 2016

1.0.0

1.0.0.0

Sequential API call/access rate keeper to be under limited rate.

  Sources   Download

MIT License