Open globalvisionmedia opened 2 years ago
a lot of APIs have rate limiting but...
If you were to add: $client_options = ['timeout', 'proxy', 'handler'];
then we could use this: composer require spatie/guzzle-rate-limiter-middleware and write apps that include (for example)
$stack = HandlerStack::create(); $stack->push(RateLimiterMiddleware::perSecond(8));
$provider = new Provider([ 'clientId' => MYOB_CLIENT_ID, 'clientSecret' => MYOB_CLIENT_SECRET, 'redirectUri' => CALLBACK_URI, 'username' => USERNAME, 'password' => PASSWORD, 'scopes' => ['CompanyFile'], 'handler' => $stack ]);
a lot of APIs have rate limiting but...
If you were to add: $client_options = ['timeout', 'proxy', 'handler'];
then we could use this: composer require spatie/guzzle-rate-limiter-middleware and write apps that include (for example)
$stack = HandlerStack::create(); $stack->push(RateLimiterMiddleware::perSecond(8));
$provider = new Provider([ 'clientId' => MYOB_CLIENT_ID, 'clientSecret' => MYOB_CLIENT_SECRET, 'redirectUri' => CALLBACK_URI, 'username' => USERNAME, 'password' => PASSWORD, 'scopes' => ['CompanyFile'], 'handler' => $stack ]);