diff --git a/composer.json b/composer.json index 6453a48..146d016 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,9 @@ } ], "require": { - "php": ">=5.6" + "php": ">=5.6", + "ext-curl": "*", + "ext-json": "*" }, "require-dev": { "phpunit/phpunit": "~4.4", diff --git a/lib/Client.php b/lib/Client.php index 4b34b5b..2609a39 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -16,11 +16,11 @@ * * Quickly and easily access any REST or REST-like API. * - * @method Response get($body = null, $query = null, $headers = null) - * @method Response post($body = null, $query = null, $headers = null) - * @method Response patch($body = null, $query = null, $headers = null) - * @method Response put($body = null, $query = null, $headers = null) - * @method Response delete($body = null, $query = null, $headers = null) + * @method Response get($body = null, $query = null, $headers = null, $retryOnLimit = null) + * @method Response post($body = null, $query = null, $headers = null, $retryOnLimit = null) + * @method Response patch($body = null, $query = null, $headers = null, $retryOnLimit = null) + * @method Response put($body = null, $query = null, $headers = null, $retryOnLimit = null) + * @method Response delete($body = null, $query = null, $headers = null, $retryOnLimit = null) * * @method Client version($value) * @method Client|Response send() @@ -123,14 +123,14 @@ * @method Client subusers() * @method Client reputations() * - * Supressions + * Suppressions * @method Client suppression() * @method Client global() * @method Client blocks() * @method Client bounces() * @method Client invalid_emails() * @method Client spam_reports() - * @method Client unsubcribes() + * @method Client unsubscribes() * * Templates * @method Client templates() @@ -432,6 +432,7 @@ private function parseResponse($channel, $content) * @param array $headers original headers * * @return Response response object + * @throws InvalidRequest */ private function retryRequest(array $responseHeaders, $method, $url, $body, $headers) { @@ -562,6 +563,7 @@ public function _($name = null) * @param array $args parameters passed with the method call * * @return Client|Response|Response[]|null object + * @throws InvalidRequest */ public function __call($name, $args) { diff --git a/lib/Exception/InvalidRequest.php b/lib/Exception/InvalidRequest.php index 4b25f13..07c8e33 100644 --- a/lib/Exception/InvalidRequest.php +++ b/lib/Exception/InvalidRequest.php @@ -7,7 +7,7 @@ * * Thrown when invalid payload was constructed, which could not reach SendGrid server. * - * @package SendGrid\Exceptions + * @package SendGrid\Exception */ class InvalidRequest extends \Exception {