original_string: public static function getRoute($route, $resourceId = null, array $parameters = array(), array $pagination = array())
      {
          foreach ($parameters as $parameter => $value) {
              $route = str_replace('{' . $parameter . '}', $value, $route);
          }
  
          $resourceIdUrl = $resourceId ? '/' . $resourceId : '';
  
          $query_pagination = '';
          if (!empty($pagination))
              $query_pagination = '?' . http_build_query($pagination);
  
          return self::$API_BASE_URL . '/v' . self::API_VERSION . $route . $resourceIdUrl . $query_pagination;
      }
code: public static function getRoute($route, $resourceId = null, array $parameters = array(), array $pagination = array())
      {
          foreach ($parameters as $parameter => $value) {
              $route = str_replace('{' . $parameter . '}', $value, $route);
          }
  
          $resourceIdUrl = $resourceId ? '/' . $resourceId : '';
  
          $query_pagination = '';
          if (!empty($pagination))
              $query_pagination = '?' . http_build_query($pagination);
  
          return self::$API_BASE_URL . '/v' . self::API_VERSION . $route . $resourceIdUrl . $query_pagination;
      }
code_tokens: public static function getRoute ( $ route , $ resourceId = null , array $ parameters = array ( ) , array $ pagination = array ( ) ) { foreach ( $ parameters as $ parameter => $ value ) { $ route = str_replace ( '{' . $ parameter . '}' , $ value , $ route ) ; } $ resourceIdUrl = $ resourceId ? '/' . $ resourceId : '' ; $ query_pagination = '' ; if ( ! empty ( $ pagination ) ) $ query_pagination = '?' . http_build_query ( $ pagination ) ; return self :: $ API_BASE_URL . '/v' . self :: API_VERSION . $ route . $ resourceIdUrl . $ query_pagination ; }
docstring: Get the route to a specified resource.
  
  @param   string $route One of the routes defined above
  @param   string $resourceId The resource id you want to get. If null, will point to the endpoint.
  @param   array $parameters The parameters required by the route.
  @param   array $pagination The pagination parameters (mainly page and per_page keys that will be appended to the
  query parameters of the request.
  
  @return  string  the full URL to the resource
docstring_tokens: Get the route to a specified resource .