Source of file IRateLimitData.php

Size: 0,747 Bytes - Last Modified: 2019-08-09T18:27:54+00:00

/home/travis/build/zerospam/sdk-framework/src/Response/RateLimit/IRateLimitData.php

12345678910111213141516171819202122232425262728293031323334353637383940414243
<?php
/**
 * Created by PhpStorm.
 * User: aaflalo
 * Date: 18-05-31
 * Time: 16:46.
 */

namespace ZEROSPAM\Framework\SDK\Response\RateLimit;

use Carbon\Carbon;

/**
 * Class RateLimitData.
 *
 * Represent the number of request allowed in a minute
 * How many are still alowed and in the case there is too many done,
 * when  can the next one be done
 */
interface IRateLimitData
{
    /**
     * Getter for maxPerMinute.
     *
     * @return int
     */
    public function getMaxPerMinute(): int;

    /**
     * Getter for currentUsage.
     *
     * @return int
     */
    public function getRemaining(): int;

    /**
     * Getter for endOfThrottle.
     *
     * @return Carbon
     */
    public function getEndOfThrottle(): Carbon;
}