source: vendor/google/apiclient-services/src/CustomSearchAPI/Resource/CseSiterestrict.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload project files

  • Property mode set to 100644
File size: 10.6 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\CustomSearchAPI\Resource;
19
20use Google\Service\CustomSearchAPI\Search;
21
22/**
23 * The "siterestrict" collection of methods.
24 * Typical usage is:
25 * <code>
26 * $customsearchService = new Google\Service\CustomSearchAPI(...);
27 * $siterestrict = $customsearchService->cse_siterestrict;
28 * </code>
29 */
30class CseSiterestrict extends \Google\Service\Resource
31{
32 /**
33 * Returns metadata about the search performed, metadata about the engine used
34 * for the search, and the search results. Uses a small set of url patterns.
35 * (siterestrict.listCseSiterestrict)
36 *
37 * @param array $optParams Optional parameters.
38 *
39 * @opt_param string c2coff Enables or disables [Simplified and Traditional
40 * Chinese Search](https://developers.google.com/custom-
41 * search/docs/json_api_reference#chineseSearch). The default value for this
42 * parameter is 0 (zero), meaning that the feature is enabled. Supported values
43 * are: * `1`: Disabled * `0`: Enabled (default)
44 * @opt_param string cr Restricts search results to documents originating in a
45 * particular country. You may use [Boolean
46 * operators](https://developers.google.com/custom-
47 * search/docs/json_api_reference#booleanOperators) in the cr parameter's value.
48 * Google Search determines the country of a document by analyzing: * the top-
49 * level domain (TLD) of the document's URL * the geographic location of the Web
50 * server's IP address See the [Country Parameter
51 * Values](https://developers.google.com/custom-
52 * search/docs/json_api_reference#countryCollections) page for a list of valid
53 * values for this parameter.
54 * @opt_param string cx The Programmable Search Engine ID to use for this
55 * request.
56 * @opt_param string dateRestrict Restricts results to URLs based on date.
57 * Supported values include: * `d[number]`: requests results from the specified
58 * number of past days. * `w[number]`: requests results from the specified
59 * number of past weeks. * `m[number]`: requests results from the specified
60 * number of past months. * `y[number]`: requests results from the specified
61 * number of past years.
62 * @opt_param bool enableAlternateSearchHandler Optional. Enables routing of
63 * Programmable Search Engine requests to an alternate search handler.
64 * @opt_param string exactTerms Identifies a phrase that all documents in the
65 * search results must contain.
66 * @opt_param string excludeTerms Identifies a word or phrase that should not
67 * appear in any documents in the search results.
68 * @opt_param string fileType Restricts results to files of a specified
69 * extension. A list of file types indexable by Google can be found in Search
70 * Console [Help Center](https://support.google.com/webmasters/answer/35287).
71 * @opt_param string filter Controls turning on or off the duplicate content
72 * filter. * See [Automatic Filtering](https://developers.google.com/custom-
73 * search/docs/json_api_reference#automaticFiltering) for more information about
74 * Google's search results filters. Note that host crowding filtering applies
75 * only to multi-site searches. * By default, Google applies filtering to all
76 * search results to improve the quality of those results. Acceptable values
77 * are: * `0`: Turns off duplicate content filter. * `1`: Turns on duplicate
78 * content filter.
79 * @opt_param string gl Geolocation of end user. * The `gl` parameter value is a
80 * two-letter country code. The `gl` parameter boosts search results whose
81 * country of origin matches the parameter value. See the [Country
82 * Codes](https://developers.google.com/custom-
83 * search/docs/json_api_reference#countryCodes) page for a list of valid values.
84 * * Specifying a `gl` parameter value should lead to more relevant results.
85 * This is particularly true for international customers and, even more
86 * specifically, for customers in English- speaking countries other than the
87 * United States.
88 * @opt_param string googlehost **Deprecated**. Use the `gl` parameter for a
89 * similar effect. The local Google domain (for example, google.com, google.de,
90 * or google.fr) to use to perform the search.
91 * @opt_param string highRange Specifies the ending value for a search range. *
92 * Use `lowRange` and `highRange` to append an inclusive search range of
93 * `lowRange...highRange` to the query.
94 * @opt_param string hl Sets the user interface language. * Explicitly setting
95 * this parameter improves the performance and the quality of your search
96 * results. * See the [Interface
97 * Languages](https://developers.google.com/custom-
98 * search/docs/json_api_reference#wsInterfaceLanguages) section of
99 * [Internationalizing Queries and Results
100 * Presentation](https://developers.google.com/custom-
101 * search/docs/json_api_reference#wsInternationalizing) for more information,
102 * and [Supported Interface Languages](https://developers.google.com/custom-
103 * search/docs/json_api_reference#interfaceLanguages) for a list of supported
104 * languages.
105 * @opt_param string hq Appends the specified query terms to the query, as if
106 * they were combined with a logical AND operator.
107 * @opt_param string imgColorType Returns black and white, grayscale,
108 * transparent, or color images. Acceptable values are: * `"color"` * `"gray"` *
109 * `"mono"`: black and white * `"trans"`: transparent background
110 * @opt_param string imgDominantColor Returns images of a specific dominant
111 * color. Acceptable values are: * `"black"` * `"blue"` * `"brown"` * `"gray"` *
112 * `"green"` * `"orange"` * `"pink"` * `"purple"` * `"red"` * `"teal"` *
113 * `"white"` * `"yellow"`
114 * @opt_param string imgSize Returns images of a specified size. Acceptable
115 * values are: * `"huge"` * `"icon"` * `"large"` * `"medium"` * `"small"` *
116 * `"xlarge"` * `"xxlarge"`
117 * @opt_param string imgType Returns images of a type. Acceptable values are: *
118 * `"clipart"` * `"face"` * `"lineart"` * `"stock"` * `"photo"` * `"animated"`
119 * @opt_param string linkSite Specifies that all search results should contain a
120 * link to a particular URL.
121 * @opt_param string lowRange Specifies the starting value for a search range.
122 * Use `lowRange` and `highRange` to append an inclusive search range of
123 * `lowRange...highRange` to the query.
124 * @opt_param string lr Restricts the search to documents written in a
125 * particular language (e.g., `lr=lang_ja`). Acceptable values are: *
126 * `"lang_ar"`: Arabic * `"lang_bg"`: Bulgarian * `"lang_ca"`: Catalan *
127 * `"lang_cs"`: Czech * `"lang_da"`: Danish * `"lang_de"`: German * `"lang_el"`:
128 * Greek * `"lang_en"`: English * `"lang_es"`: Spanish * `"lang_et"`: Estonian *
129 * `"lang_fi"`: Finnish * `"lang_fr"`: French * `"lang_hr"`: Croatian *
130 * `"lang_hu"`: Hungarian * `"lang_id"`: Indonesian * `"lang_is"`: Icelandic *
131 * `"lang_it"`: Italian * `"lang_iw"`: Hebrew * `"lang_ja"`: Japanese *
132 * `"lang_ko"`: Korean * `"lang_lt"`: Lithuanian * `"lang_lv"`: Latvian *
133 * `"lang_nl"`: Dutch * `"lang_no"`: Norwegian * `"lang_pl"`: Polish *
134 * `"lang_pt"`: Portuguese * `"lang_ro"`: Romanian * `"lang_ru"`: Russian *
135 * `"lang_sk"`: Slovak * `"lang_sl"`: Slovenian * `"lang_sr"`: Serbian *
136 * `"lang_sv"`: Swedish * `"lang_tr"`: Turkish * `"lang_zh-CN"`: Chinese
137 * (Simplified) * `"lang_zh-TW"`: Chinese (Traditional)
138 * @opt_param int num Number of search results to return. * Valid values are
139 * integers between 1 and 10, inclusive.
140 * @opt_param string orTerms Provides additional search terms to check for in a
141 * document, where each document in the search results must contain at least one
142 * of the additional search terms.
143 * @opt_param string q Query
144 * @opt_param string relatedSite Deprecated.
145 * @opt_param string rights Filters based on licensing. Supported values
146 * include: `cc_publicdomain`, `cc_attribute`, `cc_sharealike`,
147 * `cc_noncommercial`, `cc_nonderived` and combinations of these. See [typical
148 * combinations](https://wiki.creativecommons.org/wiki/CC_Search_integration).
149 * @opt_param string safe Search safety level. Acceptable values are: *
150 * `"active"`: Enables SafeSearch filtering. * `"off"`: Disables SafeSearch
151 * filtering. (default)
152 * @opt_param string searchType Specifies the search type: `image`. If
153 * unspecified, results are limited to webpages. Acceptable values are: *
154 * `"image"`: custom image search.
155 * @opt_param string siteSearch Specifies a given site which should always be
156 * included or excluded from results (see `siteSearchFilter` parameter, below).
157 * @opt_param string siteSearchFilter Controls whether to include or exclude
158 * results from the site named in the `siteSearch` parameter. Acceptable values
159 * are: * `"e"`: exclude * `"i"`: include
160 * @opt_param int snippetLength Optional. Maximum length of snippet text, in
161 * characters, to be returned with results. Note: this feature is limited to
162 * specific engines. * Valid values are integers between 161 and 1000,
163 * inclusive.
164 * @opt_param string sort The sort expression to apply to the results. The sort
165 * parameter specifies that the results be sorted according to the specified
166 * expression i.e. sort by date. [Example:
167 * sort=date](https://developers.google.com/custom-
168 * search/docs/structured_search#sort-by-attribute).
169 * @opt_param string start The index of the first result to return. The default
170 * number of results per page is 10, so `&start=11` would start at the top of
171 * the second page of results. **Note**: The JSON API will never return more
172 * than 100 results, even if more than 100 documents match the query, so setting
173 * the sum of `start + num` to a number greater than 100 will produce an error.
174 * Also note that the maximum value for `num` is 10.
175 * @return Search
176 * @throws \Google\Service\Exception
177 */
178 public function listCseSiterestrict($optParams = [])
179 {
180 $params = [];
181 $params = array_merge($params, $optParams);
182 return $this->call('list', [$params], Search::class);
183 }
184}
185
186// Adding a class alias for backwards compatibility with the previous class name.
187class_alias(CseSiterestrict::class, 'Google_Service_CustomSearchAPI_Resource_CseSiterestrict');
Note: See TracBrowser for help on using the repository browser.