// GetQueryParams returns a copy of all query params currently set for the request
977207
func (r *request) GetQueryParams() url.Values {
	var result = make(url.Values)
	for key, value := range r.query {
		result[key] = append([]string{}, value...)
	}
	return result
}
946157
func getFiltersQuery(f filters.Args) (url.Values, error) {
	query := url.Values{}
	if f.Len() > 0 {
		filterJSON, err := filters.ToJSON(f)
		if err != nil {
			return query, err
		}
		query.Set("filters", filterJSON)
	}
	return query, nil
}
603085
func (ctx *Context) GETParams() map[string][]string {
	res := make(map[string][]string)
	ctx.Request.URI().QueryArgs().VisitAll(func(key, value []byte) {
		res[string(key)] = append(res[string(key)], string(value))
	})
	return res
}
1190160
func (w *WebService) QueryParameter(name, description string) *Parameter {
	return QueryParameter(name, description)
}
429776
func (api *Client) GetApplications(query ...*GetApplicationsQuery) ([]*Application, error) {
	var options *GetApplicationsQuery
	if len(query) > 0 {
		options = query[0]
	}
	result, _, err := api.makeRequest(http.MethodGet, api.concatUserPath(applicationsPath), &[]*Application{}, options)
	if err != nil {
		return nil, err
	}
	return *(result.(*[]*Application)), nil
}
540696
func GetParameters() (logToConsole bool, logID string, logLevel string, logFormat string, compressedTagsVersion claimsheader.CompressionType) {

	logLevel = os.Getenv(constants.EnvLogLevel)
	if logLevel == "" {
		logLevel = "info"
	}

	logFormat = os.Getenv(constants.EnvLogFormat)
	if logLevel == "" {
		logFormat = "json"
	}

	if console := os.Getenv(constants.EnvLogToConsole); console == constants.EnvLogToConsoleEnable {
		logToConsole = true
	}

	logID = os.Getenv(constants.EnvLogID)

	compressedTagsVersion = claimsheader.CompressionTypeNone
	if console := os.Getenv(constants.EnvCompressedTags); console != string(claimsheader.CompressionTypeNone) {
		if console == string(claimsheader.CompressionTypeV1) {
			compressedTagsVersion = claimsheader.CompressionTypeV1
		} else if console == string(claimsheader.CompressionTypeV2) {
			compressedTagsVersion = claimsheader.CompressionTypeV2
		}
	}

	return
}
1055259
func getParams(genericParams map[string]interface{}) (map[string]string, error) {
	params := map[string]string{}
	for key, value := range genericParams {
		strVal, isString := value.(string)
		if !isString {
			return nil, fmt.Errorf("expected string, saw %v for '%s'", value, key)
		}
		params[key] = strVal
	}
	return params, nil
}
807929
func _getResourceParams(r *raml.Resource, params []string) []string {
	if r == nil {
		return params
	}

	matches := reResourceParam.FindAllString(r.URI, -1)
	for _, match := range matches {
		matchEscaped := commons.NormalizeIdentifier(match[1 : len(match)-1])
		params = append(params, matchEscaped)
	}

	return _getResourceParams(r.Parent, params)
}
495579
func (c *Client) SearchQueries(ctx context.Context, options *SearchQueryOptions) (*QuerySearch, error) {
	if options == nil || options.Query == "" {
		return nil, ErrInvalidQuery
	}

	var querySearch QuerySearch

	req, err := c.NewRequest("GET", querySearchPath, options, nil)
	if err != nil {
		return nil, err
	}

	if err := c.Do(ctx, req, &querySearch); err != nil {
		return nil, err
	}

	return &querySearch, nil
}
574807
func ContextQueryParams(c *APIContext) map[string][]string {
	qp, ok := c.Get("QueryParams")
	if ok == false {
		qp = make(map[string][]string)
		c.Set("QueryParams", qp)
	}
	return qp.(map[string][]string)
}
419486
func ExtractQueryParams(queryParams map[string]interface{}) (query string, args []interface{}) {
	for key, value := range queryParams {
		if query == "" {
			query += key
		} else {
			query += " AND " + key
		}
		args = append(args, value)
	}
	return
}
99672
func (o *QueryOptions) URLQueryParameters() URLQueryParameters {
	var queryParams URLQueryParameters
	if o.IsSTU3Sort {
		keys := make([]string, len(o.Sort))
		for i := range o.Sort {
			if o.Sort[i].Descending {
				keys[i] = fmt.Sprintf("-%s", o.Sort[i].Parameter.Name)
			} else {
				keys[i] = o.Sort[i].Parameter.Name
			}
		}
		queryParams.Add(SortParam, strings.Join(keys, ","))
	} else {
		for _, sort := range o.Sort {
			sortParamKey := SortParam
			if sort.Descending {
				sortParamKey += ":desc"
			}
			queryParams.Add(sortParamKey, sort.Parameter.Name)
		}
	}
	queryParams.Set(OffsetParam, strconv.Itoa(o.Offset))
	queryParams.Set(CountParam, strconv.Itoa(o.Count))
	for _, incl := range o.Include {
		queryParams.Add(IncludeParam, fmt.Sprintf("%s:%s", incl.Resource, incl.Parameter.Name))
	}
	for _, incl := range o.RevInclude {
		queryParams.Add(RevIncludeParam, fmt.Sprintf("%s:%s", incl.Resource, incl.Parameter.Name))
	}
	return queryParams
}
718259
func (o *GeneralOptions) getParameters() (params map[string]string, err error) {
	ps := make(map[string]string)
	if o.Term != "" {
		ps["term"] = o.Term
	}
	if o.Limit.Valid {
		ps["limit"] = fmt.Sprintf("%v", o.Limit.Int64)
	}
	if o.Offset.Valid {
		ps["offset"] = fmt.Sprintf("%v", o.Offset.Int64)
	}
	if o.Sort.Valid {
		ps["sort"] = fmt.Sprintf("%v", o.Sort.Int64)
	}
	if o.CategoryFilter != "" {
		ps["category_filter"] = o.CategoryFilter
	}
	if o.RadiusFilter.Valid {
		ps["radius_filter"] = fmt.Sprintf("%v", o.RadiusFilter.Float64)
	}
	if o.DealsFilter.Valid {
		ps["deals_filter"] = fmt.Sprintf("%v", o.DealsFilter.Bool)
	}
	return ps, nil
}
148045
func getQueries(raw []string) []string {
	var res []string

	for _, q := range raw {
		for _, qs := range strings.Split(q, ";") {
			if nq := strings.TrimSpace(qs); len(nq) > 0 {
				res = append(res, nq+";")
			}
		}
	}

	return res
}
542240
func (f VariableFilter) QueryParams() map[string][]string {
	qp := url.Values{}
	if f.ID != nil {
		qp.Add("id", f.ID.String())
	}

	if f.OrganizationID != nil {
		qp.Add("orgID", f.OrganizationID.String())
	}

	if f.Organization != nil {
		qp.Add("org", *f.Organization)
	}

	return qp
}
682858
func (cb *CacheBusters) AppendQueryParam(path string, name string) string {
	token := cb.Get(path)
	if token == "" {
		return path
	}
	return path + "?" + name + "=" + token
}
83262
func (c *Client) GetQueries(ctx context.Context, options *QueryOptions) (*QuerySearch, error) {
	var querySearch QuerySearch

	req, err := c.NewRequest("GET", queryPath, options, nil)
	if err != nil {
		return nil, err
	}

	if err := c.Do(ctx, req, &querySearch); err != nil {
		return nil, err
	}

	return &querySearch, nil
}