Updated IpLocation resolver to be able to provide limits in order to apply sleeps

This commit is contained in:
Alejandro Celaya
2018-08-02 23:02:48 +02:00
parent d54b823c88
commit ed859767a8
4 changed files with 48 additions and 0 deletions

View File

@@ -13,4 +13,18 @@ interface IpLocationResolverInterface
* @throws WrongIpException
*/
public function resolveIpLocation(string $ipAddress): array;
/**
* Returns the interval in seconds that needs to be waited when the API limit is reached
*
* @return int
*/
public function getApiInterval(): int;
/**
* Returns the limit of requests that can be performed to the API in a specific interval, or null if no limit exists
*
* @return int|null
*/
public function getApiLimit(): ?int;
}