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

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

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

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

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

@param integer|string $domain     The id or the name of the domain.
@param integer        $recordId   The Id of the record 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 records API url according to the parameters .