private function request($method, $function, $extra = [])
    {
        $response = null;
        try {
            $response = $this->httpRequest->{$method}($function, $extra)->getBody();

            return json_decode($response, false);
        } catch (ClientException $e) {
            $this->handleError($e->getResponse());
        }
    }
private function request($method, $function, $extra = [])
    {
        $response = null;
        try {
            $response = $this->httpRequest->{$method}($function, $extra)->getBody();

            return json_decode($response, false);
        } catch (ClientException $e) {
            $this->handleError($e->getResponse());
        }
    }
private function request ( $ method , $ function , $ extra = [ ] ) { $ response = null ; try { $ response = $ this -> httpRequest -> { $ method } ( $ function , $ extra ) -> getBody ( ) ; return json_decode ( $ response , false ) ; } catch ( ClientException $ e ) { $ this -> handleError ( $ e -> getResponse ( ) ) ; } }
Perform the specified request.

@param string $method Either GET, POST, PUT, DELETE, PATCH
@param string $function The endpoint to call.
@param array $extra Any query string information.

@return mixed
@throws Exceptions\IpboardInvalidApiKey
@throws Exceptions\IpboardMemberEmailExists
@throws Exceptions\IpboardMemberIdInvalid
@throws Exceptions\IpboardMemberInvalidGroup
@throws Exceptions\IpboardMemberUsernameExists
@throws Exceptions\IpboardThrottled
@throws \Exception
Perform the specified request .