private function buildUrl($queryParams = null)
    {
        $path = '/' . implode('/', $this->path);
        if (isset($queryParams)) {
            $path .= '?' . http_build_query($queryParams);
        }
        return sprintf('%s%s%s', $this->host, $this->version ?: '', $path);
    }
private function buildUrl($queryParams = null)
    {
        $path = '/' . implode('/', $this->path);
        if (isset($queryParams)) {
            $path .= '?' . http_build_query($queryParams);
        }
        return sprintf('%s%s%s', $this->host, $this->version ?: '', $path);
    }
private function buildUrl ( $ queryParams = null ) { $ path = '/' . implode ( '/' , $ this -> path ) ; if ( isset ( $ queryParams ) ) { $ path .= '?' . http_build_query ( $ queryParams ) ; } return sprintf ( '%s%s%s' , $ this -> host , $ this -> version ? : '' , $ path ) ; }
Build the final URL to be passed

@param array $queryParams an array of all the query parameters

@return string
Build the final URL to be passed