original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Builds the records API url according to the parameters .