private function queryPublic($method, array $request = array())
    {
        // build the POST data string
        $postdata = http_build_query($request, '', '&');
        // make request
        curl_setopt($this->curl, CURLOPT_URL, $this->url . '/' . $this->version . '/public/' . $method);
        curl_setopt($this->curl, CURLOPT_POSTFIELDS, $postdata);
        curl_setopt($this->curl, CURLOPT_HTTPHEADER, array());
        $result = curl_exec($this->curl);
        if($result===false)
            throw new \Exception('CURL error: ' . curl_error($this->curl));
        // decode results
        $result = json_decode($result, true);
        if(!is_array($result))
            throw new \Exception('JSON decode error');
        return $result;
    }
private function queryPublic($method, array $request = array())
    {
        // build the POST data string
        $postdata = http_build_query($request, '', '&');
        // make request
        curl_setopt($this->curl, CURLOPT_URL, $this->url . '/' . $this->version . '/public/' . $method);
        curl_setopt($this->curl, CURLOPT_POSTFIELDS, $postdata);
        curl_setopt($this->curl, CURLOPT_HTTPHEADER, array());
        $result = curl_exec($this->curl);
        if($result===false)
            throw new \Exception('CURL error: ' . curl_error($this->curl));
        // decode results
        $result = json_decode($result, true);
        if(!is_array($result))
            throw new \Exception('JSON decode error');
        return $result;
    }
private function queryPublic ( $ method , array $ request = array ( ) ) { // build the POST data string $ postdata = http_build_query ( $ request , '' , '&' ) ; // make request curl_setopt ( $ this -> curl , CURLOPT_URL , $ this -> url . '/' . $ this -> version . '/public/' . $ method ) ; curl_setopt ( $ this -> curl , CURLOPT_POSTFIELDS , $ postdata ) ; curl_setopt ( $ this -> curl , CURLOPT_HTTPHEADER , array ( ) ) ; $ result = curl_exec ( $ this -> curl ) ; if ( $ result === false ) throw new \ Exception ( 'CURL error: ' . curl_error ( $ this -> curl ) ) ; // decode results $ result = json_decode ( $ result , true ) ; if ( ! is_array ( $ result ) ) throw new \ Exception ( 'JSON decode error' ) ; return $ result ; }
Query public methods

@param string $method method name
@param array $request request parameters
@return array request result on success
@throws \Exception
Query public methods