Build the Query URL

@param query Film to search for
@return URL
552162
private String buildSearchUrl(String query) {
        StringBuilder url = new StringBuilder(MM_URL)
                .append(MM_PARAM_QST).append(MM_QUERY).append(encoder(query))
                .append(MM_PARAM_AMP).append(MM_API).append(apiKey);

        LOG.trace("MovieMeter URL: {}", url);
        return url.toString();
    }
538621
function buildPath (basePath, queryParams) {
    basePath = basePath.concat('?')
    var url = basePath.concat(queryString.stringify(queryParams))
    return url
  }
122595
def build_url(query_params: nil)
      url = [add_version(''), *@url_path].join('/')
      url = build_query_params(url, query_params) if query_params
      URI.parse("#{@host}#{url}")
    end
1166194
protected function buildQueryString($query)
    {
        if (defined('PHP_QUERY_RFC3986')) {
            return http_build_query($query, null, '&', PHP_QUERY_RFC3986);
        }

        // @codeCoverageIgnoreStart
        return str_replace('+', '%20', http_build_query($query, null, '&'));
        // @codeCoverageIgnoreEnd
    }
934680
private static String buildUrlWithQueryString(String url, Map<String, String> queryParas) {
		if (queryParas == null || queryParas.isEmpty())
			return url;
		
		StringBuilder sb = new StringBuilder(url);
		boolean isFirst;
		if (!url.contains("?")) {
			isFirst = true;
			sb.append("?");
		}
		else {
			isFirst = false;
		}
		
		for (Entry<String, String> entry : queryParas.entrySet()) {
			if (isFirst) isFirst = false;	
			else sb.append("&");
			
			String key = entry.getKey();
			String value = entry.getValue();
			if (StrKit.notBlank(value))
				try {value = URLEncoder.encode(value, CHARSET);} catch (UnsupportedEncodingException e) {throw new RuntimeException(e);}
			sb.append(key).append("=").append(value);
		}
		return sb.toString();
	}
882880
public QueryRequestBuilder<T,ID> query(QueryExpression query)
    {
        return new QueryRequestBuilder<T, ID>(version,type,entityName,query.build());
    }
266401
public List<MediaQuery> parseMediaQuery(String query) {
        try {
            // input from string
            CSSInputStream input = CSSInputStream.stringStream(query);
            input.setBase(new URL("file://media/query/url")); //this URL should not be used, just for safety
            // create parser
            CSSParser parser = createParserForInput(input);
            // visitor
            CSSParserVisitorImpl visitor = new CSSParserVisitorImpl();
            return visitor.visitMedia(parser.media());
        } catch (IOException e) {
            log.error("I/O error during media query parsing: {}", e.getMessage());
            return null;
        }/* catch (CSSException e) {
            log.warn("Malformed media query {}", query);
            return null;
        } */ catch (RecognitionException e) {
            log.warn("Malformed media query {}", query);
            return null;
        }
    }
86889
private String formatQueryUrl(String index, String type, String id, Object query) {
        String queryUrl = String.format(fullQueryTemplate,
                index == null ? "_all" : index,
                type == null ? "_all" : type,
                id == null ? "" : id,
                toQueryParams(query));

        return queryUrl.endsWith("?") ? queryUrl.substring(0, queryUrl.length() - 1) : queryUrl;
    }
318744
def construct_url(self):
        """"""
        path = [self.path]
        path.extend(self.params)

        # Build URL
        url = self.client.base_url + '/'.join(
            str(value) for value in path
            if value
        )

        # Append query parameters (if defined)
        query = self.encode_query(self.query)

        if query:
            url += '?' + query

        return url
696533
@NonNull
    public Searcher setQuery(@NonNull Query query) {
        this.query = query;
        this.query.setPage(0);
        return this;
    }
635356
public static WaybackRequest createUrlQueryRequest(String url, String start, String end) {
		WaybackRequest r = new WaybackRequest();
		r.setUrlQueryRequest();
		r.setRequestUrl(url);
		r.setStartTimestamp(start);
		r.setEndTimestamp(end);
		return r;
	}
120422
private function buildGetUrl($url, array $query = [])
    {
        // Merge global and request queries
        $query = array_merge(
            Arr::get($this->config, 'query', []),
            $query
        );

        // Append query
        if ($query = http_build_query($query)) {
            $url .= strpos($url, '?') ? $query : "?{$query}";
        }

        return $url;
    }
688663
public static Intent findLocation(String query) {
        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
        String data = String.format("geo:0,0?q=%s", query);
        intent.setData(Uri.parse(data));
        return intent;
    }
394073
public function build(&$query)
    {
        unset($query['view']);
        $segments = array();

        if (isset($query['layout'])) {
            $query['layout'] = urldecode($query['layout']);
            $segments = explode('/', $query['layout']);
        }

        unset($query['layout']);

        return $segments;
    }
940790
function(query) {
        var url;

        if (query && query.users().length) {
            // When one or more users are specified, use the global images endpoint
            url = this.getResourceUrl({
                path: '/images',
                user: null
            });
        } else {
            url = this.getUserUrl();
            url.setPath(url.getPath() + '/images');
        }

        if (query) {
            url.setQueryString(query.toString());
        }

        return url;
    }
643993
@Override
    public SqlQueryResult build(String query) throws IOException, ParserNotFoundException {
        Operation result = (Operation) super.parse(query);

        // sql
        StringBuffer sql = new StringBuffer(result.getOperate());
        sql.delete(sql.length() - 2, sql.length());
        sql.delete(0, 2);

        return new SqlQueryResult(query, sql.toString(), (List<Object>) result.getValue());
    }
1116121
def buildURL(self, action, **query):
        """"""
        base = urlparse.urljoin(self.server.base_url, action)
        return appendArgs(base, query)