protected function buildQuery($id = null, $action = null, array $parameters = array())
    {
        $parameters = http_build_query(array_merge($parameters, $this->credentials));

        $query = $id ? sprintf("%s/%s", $this->apiUrl, $id) : $this->apiUrl;
        $query = $action ? sprintf("%s/%s/?%s", $query, $action, $parameters) : sprintf("%s/?%s", $query, $parameters);

        return $query;
    }
protected function buildQuery($id = null, $action = null, array $parameters = array())
    {
        $parameters = http_build_query(array_merge($parameters, $this->credentials));

        $query = $id ? sprintf("%s/%s", $this->apiUrl, $id) : $this->apiUrl;
        $query = $action ? sprintf("%s/%s/?%s", $query, $action, $parameters) : sprintf("%s/?%s", $query, $parameters);

        return $query;
    }
protected function buildQuery ( $ id = null , $ action = null , array $ parameters = array ( ) ) { $ parameters = http_build_query ( array_merge ( $ parameters , $ this -> credentials ) ) ; $ query = $ id ? sprintf ( "%s/%s" , $ this -> apiUrl , $ id ) : $ this -> apiUrl ; $ query = $ action ? sprintf ( "%s/%s/?%s" , $ query , $ action , $ parameters ) : sprintf ( "%s/?%s" , $ query , $ parameters ) ; return $ query ; }
Builds the API url according to the parameters.

@param integer $id         The Id of the element to work with (optional).
@param string  $action     The action to perform (optional).
@param array   $parameters An array of parameters (optional).

@return string The built API url.
Builds the API url according to the parameters .