public function getRateLimit()
	{
		// Build the request path.
		$path = '/rate_limit';

		// Send the request.
		$response = $this->client->get($this->fetchUrl($path));

		// Validate the response code.
		if ($response->code != 200)
		{
			if ($response->code == 404)
			{
				// Unlimited rate for Github Enterprise sites and trusted users.
				return (object) array('limit' => false, 'remaining' => null);
			}

			// Decode the error response and throw an exception.
			$error = json_decode($response->body);
			throw new \DomainException($error->message, $response->code);
		}

		return json_decode($response->body);
	}
public function getRateLimit()
	{
		// Build the request path.
		$path = '/rate_limit';

		// Send the request.
		$response = $this->client->get($this->fetchUrl($path));

		// Validate the response code.
		if ($response->code != 200)
		{
			if ($response->code == 404)
			{
				// Unlimited rate for Github Enterprise sites and trusted users.
				return (object) array('limit' => false, 'remaining' => null);
			}

			// Decode the error response and throw an exception.
			$error = json_decode($response->body);
			throw new \DomainException($error->message, $response->code);
		}

		return json_decode($response->body);
	}
public function getRateLimit ( ) { // Build the request path. $ path = '/rate_limit' ; // Send the request. $ response = $ this -> client -> get ( $ this -> fetchUrl ( $ path ) ) ; // Validate the response code. if ( $ response -> code != 200 ) { if ( $ response -> code == 404 ) { // Unlimited rate for Github Enterprise sites and trusted users. return ( object ) array ( 'limit' => false , 'remaining' => null ) ; } // Decode the error response and throw an exception. $ error = json_decode ( $ response -> body ) ; throw new \ DomainException ( $ error -> message , $ response -> code ) ; } return json_decode ( $ response -> body ) ; }
Method to get the rate limit for the authenticated user.

@return  object  Returns an object with the properties of `limit` and `remaining`. If there is no limit, the
`limit` property will be false.

@since   1.0
@throws  \DomainException
Method to get the rate limit for the authenticated user .