public function buildRequestUrl($resource, $parameters = array()) {
    foreach ($parameters as $property => $value) {
      if (is_bool($value)) {
        $parameters[$property] = $value ? 'true' : 'false';
      }
    }
    $query = empty($parameters) ? '' : '?' . http_build_query($parameters, NULL, '&');
    return sprintf('%s/%s%s', self::ENDPOINT, $resource, $query);
  }