customsearch
v1
|
#include <customsearch_service.h>
Public Member Functions | |
CseResource_ListMethod (const CustomsearchService *_service_, client::AuthorizationCredential *_credential_) | |
virtual | ~CseResource_ListMethod () |
void | clear_sort () |
const string & | get_sort () const |
string * | mutable_sort () |
void | set_sort (const string &value) |
void | clear_link_site () |
const string & | get_link_site () const |
string * | mutable_linkSite () |
void | set_link_site (const string &value) |
void | clear_hq () |
const string & | get_hq () const |
string * | mutable_hq () |
void | set_hq (const string &value) |
void | clear_search_type () |
const string & | get_search_type () const |
string * | mutable_searchType () |
void | set_search_type (const string &value) |
void | clear_file_type () |
const string & | get_file_type () const |
string * | mutable_fileType () |
void | set_file_type (const string &value) |
void | clear_related_site () |
const string & | get_related_site () const |
string * | mutable_relatedSite () |
void | set_related_site (const string &value) |
void | clear_site_search () |
const string & | get_site_search () const |
string * | mutable_siteSearch () |
void | set_site_search (const string &value) |
void | clear_exclude_terms () |
const string & | get_exclude_terms () const |
string * | mutable_excludeTerms () |
void | set_exclude_terms (const string &value) |
void | clear_exact_terms () |
const string & | get_exact_terms () const |
string * | mutable_exactTerms () |
void | set_exact_terms (const string &value) |
void | clear_num () |
int32 | get_num () const |
void | set_num (int32 value) |
void | clear_img_type () |
const string & | get_img_type () const |
string * | mutable_imgType () |
void | set_img_type (const string &value) |
void | clear_c2coff () |
const string & | get_c2coff () const |
string * | mutable_c2coff () |
void | set_c2coff (const string &value) |
void | clear_filter () |
const string & | get_filter () const |
string * | mutable_filter () |
void | set_filter (const string &value) |
void | clear_high_range () |
const string & | get_high_range () const |
string * | mutable_highRange () |
void | set_high_range (const string &value) |
void | clear_hl () |
const string & | get_hl () const |
string * | mutable_hl () |
void | set_hl (const string &value) |
void | clear_gl () |
const string & | get_gl () const |
string * | mutable_gl () |
void | set_gl (const string &value) |
void | clear_googlehost () |
const string & | get_googlehost () const |
string * | mutable_googlehost () |
void | set_googlehost (const string &value) |
void | clear_img_size () |
const string & | get_img_size () const |
string * | mutable_imgSize () |
void | set_img_size (const string &value) |
void | clear_cr () |
const string & | get_cr () const |
string * | mutable_cr () |
void | set_cr (const string &value) |
void | clear_or_terms () |
const string & | get_or_terms () const |
string * | mutable_orTerms () |
void | set_or_terms (const string &value) |
void | clear_date_restrict () |
const string & | get_date_restrict () const |
string * | mutable_dateRestrict () |
void | set_date_restrict (const string &value) |
void | clear_rights () |
const string & | get_rights () const |
string * | mutable_rights () |
void | set_rights (const string &value) |
void | clear_q () |
const string & | get_q () const |
string * | mutable_q () |
void | set_q (const string &value) |
void | clear_cx () |
const string & | get_cx () const |
string * | mutable_cx () |
void | set_cx (const string &value) |
void | clear_low_range () |
const string & | get_low_range () const |
string * | mutable_lowRange () |
void | set_low_range (const string &value) |
void | clear_lr () |
const string & | get_lr () const |
string * | mutable_lr () |
void | set_lr (const string &value) |
void | clear_img_dominant_color () |
const string & | get_img_dominant_color () const |
string * | mutable_imgDominantColor () |
void | set_img_dominant_color (const string &value) |
void | clear_img_color_type () |
const string & | get_img_color_type () const |
string * | mutable_imgColorType () |
void | set_img_color_type (const string &value) |
void | clear_safe () |
const string & | get_safe () const |
string * | mutable_safe () |
void | set_safe (const string &value) |
void | clear_site_search_filter () |
const string & | get_site_search_filter () const |
string * | mutable_siteSearchFilter () |
void | set_site_search_filter (const string &value) |
void | clear_start () |
uint32 | get_start () const |
void | set_start (uint32 value) |
virtual util::Status | AppendVariable (const StringPiece &variable_name, const client::UriTemplateConfig &config, string *target) |
virtual util::Status | AppendOptionalQueryParameters (string *target) |
util::Status | ExecuteAndParseResponse (Search *data) |
![]() | |
CustomsearchServiceBaseRequest (const client::ClientService *service, client::AuthorizationCredential *credential, client::HttpRequest::HttpMethod method, const StringPiece &uri_template) | |
virtual | ~CustomsearchServiceBaseRequest () |
void | clear_xgafv () |
const string & | get_xgafv () const |
string *mutable_ | $Xgafv () |
void | set_xgafv (const string &value) |
void | clear_access_token () |
const string & | get_access_token () const |
string * | mutable_accessToken () |
void | set_access_token (const string &value) |
void | clear_alt () |
const string & | get_alt () const |
string * | mutable_alt () |
void | set_alt (const string &value) |
void | clear_callback () |
const string & | get_callback () const |
string * | mutable_callback () |
void | set_callback (const string &value) |
void | clear_fields () |
const string & | get_fields () const |
string * | mutable_fields () |
void | set_fields (const string &value) |
void | clear_key () |
const string & | get_key () const |
string * | mutable_key () |
void | set_key (const string &value) |
void | clear_oauth_token () |
const string & | get_oauth_token () const |
string * | mutable_oauthToken () |
void | set_oauth_token (const string &value) |
void | clear_pretty_print () |
bool | get_pretty_print () const |
void | set_pretty_print (bool value) |
void | clear_quota_user () |
const string & | get_quota_user () const |
string * | mutable_quotaUser () |
void | set_quota_user (const string &value) |
void | clear_upload_type () |
const string & | get_upload_type () const |
string * | mutable_uploadType () |
void | set_upload_type (const string &value) |
void | clear_upload_protocol () |
const string & | get_upload_protocol () const |
string * | mutable_uploadProtocol () |
void | set_upload_protocol (const string &value) |
Additional Inherited Members | |
![]() | |
void | AddJsonContentToRequest (const client::JsonCppData *content) |
Implements the list method.
This class uses the Command Pattern. Construct an instance with the required parameters, then set any additional optional parameters by using the attribute setters. To invoke the method, call Execute
.
No authorization scopes are required for this method.
google_customsearch_api::CseResource_ListMethod::CseResource_ListMethod | ( | const CustomsearchService * | _service_, |
client::AuthorizationCredential * | _credential_ | ||
) |
The standard constructor takes all the required method parameters.
[in] | <em>service</em> | The service instance to send to when executed. |
[in] | <em>credential</em> | If not NULL, the credential to authorize with. In practice this is supplied by the user code that is creating the method instance. |
|
virtual |
Standard destructor.
|
virtual |
Appends the optional query parameters to the target URL.
[in,out] | target | The URL string to append to. |
Reimplemented from google_customsearch_api::CustomsearchServiceBaseRequest.
|
virtual |
Appends variable value to the target string.
This is a helper function used to resolve templated variables in the URI.
[in] | variable_name | The name of the templated variable. |
[in] | config | A pass-through parameter used for lists and maps. |
[in,out] | target | The string to append the value to. |
Reimplemented from google_customsearch_api::CustomsearchServiceBaseRequest.
|
inline |
Clears the 'c2coff
' attribute so it is no longer set.
|
inline |
Clears the 'cr
' attribute so it is no longer set.
|
inline |
Clears the 'cx
' attribute so it is no longer set.
|
inline |
Clears the 'dateRestrict
' attribute so it is no longer set.
|
inline |
Clears the 'exactTerms
' attribute so it is no longer set.
|
inline |
Clears the 'excludeTerms
' attribute so it is no longer set.
|
inline |
Clears the 'fileType
' attribute so it is no longer set.
|
inline |
Clears the 'filter
' attribute so it is no longer set.
|
inline |
Clears the 'gl
' attribute so it is no longer set.
|
inline |
Clears the 'googlehost
' attribute so it is no longer set.
|
inline |
Clears the 'highRange
' attribute so it is no longer set.
|
inline |
Clears the 'hl
' attribute so it is no longer set.
|
inline |
Clears the 'hq
' attribute so it is no longer set.
|
inline |
Clears the 'imgColorType
' attribute so it is no longer set.
|
inline |
Clears the 'imgDominantColor
' attribute so it is no longer set.
|
inline |
Clears the 'imgSize
' attribute so it is no longer set.
|
inline |
Clears the 'imgType
' attribute so it is no longer set.
|
inline |
Clears the 'linkSite
' attribute so it is no longer set.
|
inline |
Clears the 'lowRange
' attribute so it is no longer set.
|
inline |
Clears the 'lr
' attribute so it is no longer set.
|
inline |
Clears the 'num
' attribute so it is no longer set.
|
inline |
Clears the 'orTerms
' attribute so it is no longer set.
|
inline |
Clears the 'q
' attribute so it is no longer set.
|
inline |
Clears the 'relatedSite
' attribute so it is no longer set.
|
inline |
Clears the 'rights
' attribute so it is no longer set.
|
inline |
Clears the 'safe
' attribute so it is no longer set.
|
inline |
Clears the 'searchType
' attribute so it is no longer set.
|
inline |
Clears the 'siteSearch
' attribute so it is no longer set.
|
inline |
Clears the 'siteSearchFilter
' attribute so it is no longer set.
|
inline |
Clears the 'sort
' attribute so it is no longer set.
|
inline |
Clears the 'start
' attribute so it is no longer set.
|
inline |
Executes the method and parses the response into a data object on success.
[out] | data | Loads from the response payload JSON data on success. |
|
inline |
Gets the optional 'c2coff
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'cr
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'cx
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'dateRestrict
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'exactTerms
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'excludeTerms
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'fileType
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'filter
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'gl
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'googlehost
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'highRange
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'hl
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'hq
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'imgColorType
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'imgDominantColor
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'imgSize
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'imgType
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'linkSite
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'lowRange
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'lr
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'num
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'orTerms
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'q
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'relatedSite
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'rights
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'safe
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'searchType
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'siteSearch
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'siteSearchFilter
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'sort
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'start
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets a modifiable pointer to the optional c2coff
' attribute.
|
inline |
Gets a modifiable pointer to the optional cr
' attribute.
|
inline |
Gets a modifiable pointer to the optional cx
' attribute.
|
inline |
Gets a modifiable pointer to the optional dateRestrict
' attribute.
|
inline |
Gets a modifiable pointer to the optional exactTerms
' attribute.
|
inline |
Gets a modifiable pointer to the optional excludeTerms
' attribute.
|
inline |
Gets a modifiable pointer to the optional fileType
' attribute.
|
inline |
Gets a modifiable pointer to the optional filter
' attribute.
|
inline |
Gets a modifiable pointer to the optional gl
' attribute.
|
inline |
Gets a modifiable pointer to the optional googlehost
' attribute.
|
inline |
Gets a modifiable pointer to the optional highRange
' attribute.
|
inline |
Gets a modifiable pointer to the optional hl
' attribute.
|
inline |
Gets a modifiable pointer to the optional hq
' attribute.
|
inline |
Gets a modifiable pointer to the optional imgColorType
' attribute.
|
inline |
Gets a modifiable pointer to the optional imgDominantColor
' attribute.
|
inline |
Gets a modifiable pointer to the optional imgSize
' attribute.
|
inline |
Gets a modifiable pointer to the optional imgType
' attribute.
|
inline |
Gets a modifiable pointer to the optional linkSite
' attribute.
|
inline |
Gets a modifiable pointer to the optional lowRange
' attribute.
|
inline |
Gets a modifiable pointer to the optional lr
' attribute.
|
inline |
Gets a modifiable pointer to the optional orTerms
' attribute.
|
inline |
Gets a modifiable pointer to the optional q
' attribute.
|
inline |
Gets a modifiable pointer to the optional relatedSite
' attribute.
|
inline |
Gets a modifiable pointer to the optional rights
' attribute.
|
inline |
Gets a modifiable pointer to the optional safe
' attribute.
|
inline |
Gets a modifiable pointer to the optional searchType
' attribute.
|
inline |
Gets a modifiable pointer to the optional siteSearch
' attribute.
|
inline |
Gets a modifiable pointer to the optional siteSearchFilter
' attribute.
|
inline |
Gets a modifiable pointer to the optional sort
' attribute.
|
inline |
Sets the 'c2coff
' attribute.
[in] | value | Enables or disables Simplified and Traditional Chinese Search. |
1
: Disabled. 0
|
inline |
Sets the 'cr
' attribute.
[in] | value | Restricts search results to documents originating in a particular country. You may use Boolean operators |
in the cr parameter's value.
Google Search determines the country of a document by analyzing:
See the Country Parameter Values page for a list of valid values for this parameter.
|
inline |
Sets the 'cx
' attribute.
[in] | value | The custom search engine ID to use for this request. |
|
inline |
Sets the 'dateRestrict
' attribute.
[in] | value | Restricts results to URLs based on date. Supported values include: |
d[number]
: requests results from the specified number of past days.w[number]
: requests results from the specified number of past weeks.m[number]
: requests results from the specified number of past months.y[number]
: requests results from the specified number of past years.
|
inline |
Sets the 'exactTerms
' attribute.
[in] | value | Identifies a phrase that all documents in the search results must contain. |
|
inline |
Sets the 'excludeTerms
' attribute.
[in] | value | Identifies a word or phrase that should not appear in any documents in the search results. |
|
inline |
Sets the 'fileType
' attribute.
[in] | value | Restricts results to files of a specified extension. A list of file types indexable by Google can be found in Search Console Help Center. |
|
inline |
Sets the 'filter
' attribute.
[in] | value | Controls turning on or off the duplicate content filter. |
0
: Turns off duplicate content filter. 1
|
inline |
Sets the 'gl
' attribute.
[in] | value | Geolocation of end user. |
gl
parameter value is a two-letter country code. The gl
parameter boosts search results whose country of origin matches the parameter value. See the Country Codespage for a list of valid values.
gl
parameter value should lead to more relevant results. This is particularly true for international customers and, even more specifically, for customers in English- speaking countries other than the United States.
|
inline |
Sets the 'googlehost
' attribute.
[in] | value | Deprecated. Use the gl parameter for a similar effect. |
The local Google domain (for example, google.com, google.de, or google.fr) to use to perform the search.
|
inline |
Sets the 'highRange
' attribute.
[in] | value | Specifies the ending value for a search range. |
lowRange
and highRange
to append an inclusive search range of lowRange...highRange
to the query.
|
inline |
Sets the 'hl
' attribute.
[in] | value | Sets the user interface language. |
|
inline |
Sets the 'hq
' attribute.
[in] | value | Appends the specified query terms to the query, as if they were combined with a logical AND operator. |
|
inline |
Sets the 'imgColorType
' attribute.
[in] | value | Returns black and white, grayscale, transparent, or color images. Acceptable values are: |
"color"
"gray"
"mono"
: black and white"trans"
: transparent background.
|
inline |
Sets the 'imgDominantColor
' attribute.
[in] | value | Returns images of a specific dominant color. Acceptable values are: |
"black"
"blue"
"brown"
"gray"
"green"
"orange"
"pink"
"purple"
"red"
"teal"
"white"
"yellow"
.
|
inline |
Sets the 'imgSize
' attribute.
[in] | value | Returns images of a specified size. Acceptable values are: |
"huge"
"icon"
"large"
"medium"
"small"
"xlarge"
"xxlarge"
.
|
inline |
Sets the 'imgType
' attribute.
[in] | value | Returns images of a type. Acceptable values are: |
"clipart"
"face"
"lineart"
"stock"
"photo"
"animated"
.
|
inline |
Sets the 'linkSite
' attribute.
[in] | value | Specifies that all search results should contain a link to a particular URL. |
|
inline |
Sets the 'lowRange
' attribute.
[in] | value | Specifies the starting value for a search range. Use lowRange and highRange to append an inclusive search range of lowRange...highRange to the query. |
|
inline |
Sets the 'lr
' attribute.
[in] | value | Restricts the search to documents written in a particular language (e.g., lr=lang_ja ). |
Acceptable values are:
"lang_ar"
: Arabic"lang_bg"
: Bulgarian"lang_ca"
: Catalan"lang_cs"
: Czech"lang_da"
: Danish"lang_de"
: German"lang_el"
: Greek"lang_en"
: English"lang_es"
: Spanish"lang_et"
: Estonian"lang_fi"
: Finnish"lang_fr"
: French"lang_hr"
: Croatian"lang_hu"
: Hungarian"lang_id"
: Indonesian"lang_is"
: Icelandic"lang_it"
: Italian"lang_iw"
: Hebrew"lang_ja"
: Japanese"lang_ko"
: Korean"lang_lt"
: Lithuanian"lang_lv"
: Latvian"lang_nl"
: Dutch"lang_no"
: Norwegian"lang_pl"
: Polish"lang_pt"
: Portuguese"lang_ro"
: Romanian"lang_ru"
: Russian"lang_sk"
: Slovak"lang_sl"
: Slovenian"lang_sr"
: Serbian"lang_sv"
: Swedish"lang_tr"
: Turkish"lang_zh-CN"
: Chinese (Simplified)"lang_zh-TW"
: Chinese (Traditional).
|
inline |
Sets the 'num
' attribute.
[in] | value | Number of search results to return. |
|
inline |
Sets the 'orTerms
' attribute.
[in] | value | Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms. |
|
inline |
Sets the 'q
' attribute.
[in] | value | Query. |
|
inline |
Sets the 'relatedSite
' attribute.
[in] | value | Specifies that all search results should be pages that are related to the specified URL. |
|
inline |
Sets the 'rights
' attribute.
[in] | value | Filters based on licensing. Supported values include: cc_publicdomain , cc_attribute , cc_sharealike , cc_noncommercial , cc_nonderived and combinations of these. See typical combinations. |
|
inline |
Sets the 'safe
' attribute.
[in] | value | Search safety level. Acceptable values are: |
"active"
: Enables SafeSearch filtering."off"
: Disables SafeSearch filtering. (default).
|
inline |
Sets the 'searchType
' attribute.
[in] | value | Specifies the search type: image . If unspecified, results are limited to webpages. |
Acceptable values are:
"image"
: custom image search.
|
inline |
Sets the 'siteSearch
' attribute.
[in] | value | Specifies a given site which should always be included or excluded from results (see siteSearchFilter parameter, below). |
|
inline |
Sets the 'siteSearchFilter
' attribute.
[in] | value | Controls whether to include or exclude results from the site named in the siteSearch parameter. |
Acceptable values are:
"e"
: exclude"i"
: include.
|
inline |
Sets the 'sort
' attribute.
[in] | value | The sort expression to apply to the results. |
|
inline |
Sets the 'start
' attribute.
[in] | value | The index of the first result to return. The default number of results per page is 10, so =11 would start at the top of the second page of results. Note: The JSON API will never return more than 100 results, even if more than 100 documents match the query, so setting the sum of start + num to a number greater than 100 will produce an error. Also note that the maximum value for num is 10. |