public function request($path, array $parameters = array(), $httpMethod = 'GET', array $options = array())
    {
        $options = array_merge($this->options, $options);

        // create full url
        $url = strtr($options['url'], array(
          ':api_version' => $this->options['api_version'],
          ':protocol'    => $this->options['protocol'],
          ':endpoint'    => $this->options['endpoint'],
          ':path'        => $path
        ));

        // get encoded response
        $response = $this->doRequest($url, $parameters, $httpMethod, $options);
        $this->lastResponse = $response; // for debugging (see getLastResponse)

        // decode response
        $response = $this->decodeResponse($response, $options);

        return $response;
    }
public function request($path, array $parameters = array(), $httpMethod = 'GET', array $options = array())
    {
        $options = array_merge($this->options, $options);

        // create full url
        $url = strtr($options['url'], array(
          ':api_version' => $this->options['api_version'],
          ':protocol'    => $this->options['protocol'],
          ':endpoint'    => $this->options['endpoint'],
          ':path'        => $path
        ));

        // get encoded response
        $response = $this->doRequest($url, $parameters, $httpMethod, $options);
        $this->lastResponse = $response; // for debugging (see getLastResponse)

        // decode response
        $response = $this->decodeResponse($response, $options);

        return $response;
    }
public function request ( $ path , array $ parameters = array ( ) , $ httpMethod = 'GET' , array $ options = array ( ) ) { $ options = array_merge ( $ this -> options , $ options ) ; // create full url $ url = strtr ( $ options [ 'url' ] , array ( ':api_version' => $ this -> options [ 'api_version' ] , ':protocol' => $ this -> options [ 'protocol' ] , ':endpoint' => $ this -> options [ 'endpoint' ] , ':path' => $ path ) ) ; // get encoded response $ response = $ this -> doRequest ( $ url , $ parameters , $ httpMethod , $ options ) ; $ this -> lastResponse = $ response ; // for debugging (see getLastResponse) // decode response $ response = $ this -> decodeResponse ( $ response , $ options ) ; return $ response ; }
Send a request to the server, receive a response,
decode the response and returns an associative array

@param  string   $path           Requested API resource path
@param  array    $parameters     Parameters
@param  string   $httpMethod     HTTP method to use
@param  array    $options        Request options

@return array                    Data
Send a request to the server receive a response decode the response and returns an associative array