mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-05 06:43:12 +08:00
31 lines
728 B
PHP
31 lines
728 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Common\Service;
|
|
|
|
use Shlinkio\Shlink\Common\Exception\WrongIpException;
|
|
|
|
interface IpLocationResolverInterface
|
|
{
|
|
/**
|
|
* @param string $ipAddress
|
|
* @return array
|
|
* @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;
|
|
}
|