// Retrieves Questions for a Referral Partner Survey
973380
func (r Account_Partner_Referral_Prospect) GetSurveyQuestions() (resp []datatypes.Survey_Question, err error) {
	err = r.Session.DoRequest("SoftLayer_Account_Partner_Referral_Prospect", "getSurveyQuestions", nil, &r.Options, &resp)
	return
}
407520
func (r Marketplace_Partner) GetAllPublishedPartners(searchTerm *string) (resp []datatypes.Marketplace_Partner, err error) {
	params := []interface{}{
		searchTerm,
	}
	err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllPublishedPartners", params, &r.Options, &resp)
	return
}
907038
func (q *KnowledgeQAService) Get(req KnowledgeQARequest) (*KnowledgeQAResponse, error) {

	val := url.Values{}
	val.Set("q", req.QAText)

	var knowRes KnowledgeQAResponse
	res, err := q.client.get(q.ctx, KnowledgeQAURL, val, &knowRes)
	if err != nil {
		return nil, err
	}

	defer res.Body.Close()

	return &knowRes, nil
}
842756
func RetrieveAllProposals(client *http.Client, APIRootPath, URLParams string) (
	*pitypes.Proposals, error) {
	// Constructs the full vetted proposals API URL
	URLpath := APIRootPath + piapi.RouteAllVetted + URLParams
	data, err := HandleGetRequests(client, URLpath)
	if err != nil {
		return nil, err
	}

	var publicProposals pitypes.Proposals
	err = json.Unmarshal(data, &publicProposals)
	if err != nil || len(publicProposals.Data) == 0 {
		return &publicProposals, err
	}

	// Constructs the full vote status API URL
	URLpath = APIRootPath + piapi.RouteAllVoteStatus + URLParams
	data, err = HandleGetRequests(client, URLpath)
	if err != nil {
		return nil, err
	}

	var votesInfo pitypes.Votes
	err = json.Unmarshal(data, &votesInfo)
	if err != nil {
		return nil, err
	}

	// Append the votes status information to the respective proposals if it exists.
	for _, val := range publicProposals.Data {
		for k := range votesInfo.Data {
			if val.TokenVal == votesInfo.Data[k].Token {
				val.ProposalVotes = votesInfo.Data[k]
				// exits the second loop after finding a match.
				break
			}
		}
	}

	return &publicProposals, nil
}
750588
func (s *UserService) GetSelf() (*User, *Response, error) {
	const apiEndpoint = "rest/api/2/myself"
	req, err := s.client.NewRequest("GET", apiEndpoint, nil)
	if err != nil {
		return nil, nil, err
	}
	var user User
	resp, err := s.client.Do(req, &user)
	if err != nil {
		return nil, resp, NewJiraError(resp, err)
	}
	return &user, resp, nil
}
236202
func (c *CDN) ScanCdnService(resp interface{}) (err error) {
	req := c.cdnReq.Clone().(*Request)
	req.Action = DescribeCdnServiceAction
	err = c.rpc.Query(req, resp)
	return
}
57456
func (item *Item) GetHeader() {
	client := &http.Client{}
	req, err := http.NewRequest("HEAD", item.Link, nil)
	// set user agent
	req.Header.Set("User-Agent", globalUa)

	// set referer
	req.Header.Set("Referer", "http://www.google.com/")
	if err != nil {
		return
	}

	// do head request
	resp, err := client.Do(req)

	if err == nil {
		header := make(map[string]string)
		for key, val := range resp.Header {
			header[key] = val[0]
		}
		item.Header = header
	}
}
1070520
func (c *Client) AnswerCallbackQuery(callbackQueryID string, opts ...sendOption) error {
	req := url.Values{}
	req.Set("callback_query_id", callbackQueryID)
	for _, opt := range opts {
		opt(req)
	}
	var success bool
	return c.doRequest("answerCallbackQuery", req, &success)
}
67512
func (api *API) Query(ctx context.Context, req *QueryRequest) (QueryResponse, error) {
	span, ctx := tracing.StartSpanFromContext(ctx, "API.Query")
	defer span.Finish()

	if err := api.validate(apiQuery); err != nil {
		return QueryResponse{}, errors.Wrap(err, "validating api method")
	}

	q, err := pql.NewParser(strings.NewReader(req.Query)).Parse()
	if err != nil {
		return QueryResponse{}, errors.Wrap(err, "parsing")
	}
	execOpts := &execOptions{
		Remote:          req.Remote,
		ExcludeRowAttrs: req.ExcludeRowAttrs, // NOTE: Kept for Pilosa 1.x compat.
		ExcludeColumns:  req.ExcludeColumns,  // NOTE: Kept for Pilosa 1.x compat.
		ColumnAttrs:     req.ColumnAttrs,     // NOTE: Kept for Pilosa 1.x compat.
	}
	resp, err := api.server.executor.Execute(ctx, req.Index, q, req.Shards, execOpts)
	if err != nil {
		return QueryResponse{}, errors.Wrap(err, "executing")
	}

	return resp, nil
}
906244
func (l *Client) GetQuery(alias string) (Query, error) {
	res := ApiResp{}
	data := Query{}

	// make the request
	err := l.Get(parseLyticsURL(queryEndpoint, map[string]string{"id": alias}), nil, nil, &res, &data)
	if err != nil {
		return data, err
	}

	return data, nil
}
1064424
func (r User_Customer_Security_Answer) GetQuestion() (resp datatypes.User_Security_Question, err error) {
	err = r.Session.DoRequest("SoftLayer_User_Customer_Security_Answer", "getQuestion", nil, &r.Options, &resp)
	return
}
721534
func Referer(c *colly.Collector) {
	c.OnResponse(func(r *colly.Response) {
		r.Ctx.Put("_referer", r.Request.URL.String())
	})
	c.OnRequest(func(r *colly.Request) {
		if ref := r.Ctx.Get("_referer"); ref != "" {
			r.Headers.Set("Referer", ref)
		}
	})
}
1252788
func (bot *BotAPI) AnswerInlineQuery(config InlineConfig) (APIResponse, error) {
	v := url.Values{}

	v.Add("inline_query_id", config.InlineQueryID)
	v.Add("cache_time", strconv.Itoa(config.CacheTime))
	v.Add("is_personal", strconv.FormatBool(config.IsPersonal))
	v.Add("next_offset", config.NextOffset)
	data, err := json.Marshal(config.Results)
	if err != nil {
		return APIResponse{}, err
	}
	v.Add("results", string(data))
	v.Add("switch_pm_text", config.SwitchPMText)
	v.Add("switch_pm_parameter", config.SwitchPMParameter)

	bot.debugLog("answerInlineQuery", v, nil)

	return bot.MakeRequest("answerInlineQuery", v)
}
345364
func (r Survey) TakeSurvey(responses []datatypes.Survey_Response) (resp bool, err error) {
	params := []interface{}{
		responses,
	}
	err = r.Session.DoRequest("SoftLayer_Survey", "takeSurvey", params, &r.Options, &resp)
	return
}
326667
func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Marketplace_Partner, err error) {
	params := []interface{}{
		non,
	}
	err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getFeaturedPartners", params, &r.Options, &resp)
	return
}
1145725
func (r Survey) GetStatus() (resp datatypes.Survey_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Survey", "getStatus", nil, &r.Options, &resp)
	return
}
874212
func (t *TrendService) GetSearch(req TrendSearchRequest) (*TrendSearchResponse, error) {

	v := url.Values{}
	if err := validation(req.Keyword); err != nil {
		return nil, err
	}
	v.Set("keyword", *req.Keyword)

	if req.GenreID != nil {
		v.Set("genreId", strconv.Itoa(*req.GenreID))
	}
	if req.Lang != nil {
		v.Set("lang", *req.Lang)
	}
	if req.StartNo != nil {
		v.Set("s", strconv.Itoa(*req.StartNo))
	}
	if req.Num != nil {
		v.Set("n", strconv.Itoa(*req.Num))
	}

	var trendRes TrendSearchResponse
	res, err := t.client.get(t.ctx, TrendSearchURL, v, &trendRes)
	if err != nil {
		return nil, err
	}

	defer res.Body.Close()

	return &trendRes, nil
}