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

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

Upload project files

  • Property mode set to 100644
File size: 11.0 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;
19
20use Google\Client;
21
22/**
23 * Service definition for CustomSearchAPI (v1).
24 *
25 * <p>
26 * Searches over a website or collection of websites</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://developers.google.com/custom-search/v1/introduction" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class CustomSearchAPI extends \Google\Service
36{
37
38
39 public $cse;
40 public $cse_siterestrict;
41 public $rootUrlTemplate;
42
43 /**
44 * Constructs the internal representation of the CustomSearchAPI service.
45 *
46 * @param Client|array $clientOrConfig The client used to deliver requests, or a
47 * config array to pass to a new Client instance.
48 * @param string $rootUrl The root URL used for requests to the service.
49 */
50 public function __construct($clientOrConfig = [], $rootUrl = null)
51 {
52 parent::__construct($clientOrConfig);
53 $this->rootUrl = $rootUrl ?: 'https://customsearch.googleapis.com/';
54 $this->rootUrlTemplate = $rootUrl ?: 'https://customsearch.UNIVERSE_DOMAIN/';
55 $this->servicePath = '';
56 $this->batchPath = 'batch';
57 $this->version = 'v1';
58 $this->serviceName = 'customsearch';
59
60 $this->cse = new CustomSearchAPI\Resource\Cse(
61 $this,
62 $this->serviceName,
63 'cse',
64 [
65 'methods' => [
66 'list' => [
67 'path' => 'customsearch/v1',
68 'httpMethod' => 'GET',
69 'parameters' => [
70 'c2coff' => [
71 'location' => 'query',
72 'type' => 'string',
73 ],
74 'cr' => [
75 'location' => 'query',
76 'type' => 'string',
77 ],
78 'cx' => [
79 'location' => 'query',
80 'type' => 'string',
81 ],
82 'dateRestrict' => [
83 'location' => 'query',
84 'type' => 'string',
85 ],
86 'enableAlternateSearchHandler' => [
87 'location' => 'query',
88 'type' => 'boolean',
89 ],
90 'exactTerms' => [
91 'location' => 'query',
92 'type' => 'string',
93 ],
94 'excludeTerms' => [
95 'location' => 'query',
96 'type' => 'string',
97 ],
98 'fileType' => [
99 'location' => 'query',
100 'type' => 'string',
101 ],
102 'filter' => [
103 'location' => 'query',
104 'type' => 'string',
105 ],
106 'gl' => [
107 'location' => 'query',
108 'type' => 'string',
109 ],
110 'googlehost' => [
111 'location' => 'query',
112 'type' => 'string',
113 ],
114 'highRange' => [
115 'location' => 'query',
116 'type' => 'string',
117 ],
118 'hl' => [
119 'location' => 'query',
120 'type' => 'string',
121 ],
122 'hq' => [
123 'location' => 'query',
124 'type' => 'string',
125 ],
126 'imgColorType' => [
127 'location' => 'query',
128 'type' => 'string',
129 ],
130 'imgDominantColor' => [
131 'location' => 'query',
132 'type' => 'string',
133 ],
134 'imgSize' => [
135 'location' => 'query',
136 'type' => 'string',
137 ],
138 'imgType' => [
139 'location' => 'query',
140 'type' => 'string',
141 ],
142 'linkSite' => [
143 'location' => 'query',
144 'type' => 'string',
145 ],
146 'lowRange' => [
147 'location' => 'query',
148 'type' => 'string',
149 ],
150 'lr' => [
151 'location' => 'query',
152 'type' => 'string',
153 ],
154 'num' => [
155 'location' => 'query',
156 'type' => 'integer',
157 ],
158 'orTerms' => [
159 'location' => 'query',
160 'type' => 'string',
161 ],
162 'q' => [
163 'location' => 'query',
164 'type' => 'string',
165 ],
166 'relatedSite' => [
167 'location' => 'query',
168 'type' => 'string',
169 ],
170 'rights' => [
171 'location' => 'query',
172 'type' => 'string',
173 ],
174 'safe' => [
175 'location' => 'query',
176 'type' => 'string',
177 ],
178 'searchType' => [
179 'location' => 'query',
180 'type' => 'string',
181 ],
182 'siteSearch' => [
183 'location' => 'query',
184 'type' => 'string',
185 ],
186 'siteSearchFilter' => [
187 'location' => 'query',
188 'type' => 'string',
189 ],
190 'snippetLength' => [
191 'location' => 'query',
192 'type' => 'integer',
193 ],
194 'sort' => [
195 'location' => 'query',
196 'type' => 'string',
197 ],
198 'start' => [
199 'location' => 'query',
200 'type' => 'integer',
201 ],
202 ],
203 ],
204 ]
205 ]
206 );
207 $this->cse_siterestrict = new CustomSearchAPI\Resource\CseSiterestrict(
208 $this,
209 $this->serviceName,
210 'siterestrict',
211 [
212 'methods' => [
213 'list' => [
214 'path' => 'customsearch/v1/siterestrict',
215 'httpMethod' => 'GET',
216 'parameters' => [
217 'c2coff' => [
218 'location' => 'query',
219 'type' => 'string',
220 ],
221 'cr' => [
222 'location' => 'query',
223 'type' => 'string',
224 ],
225 'cx' => [
226 'location' => 'query',
227 'type' => 'string',
228 ],
229 'dateRestrict' => [
230 'location' => 'query',
231 'type' => 'string',
232 ],
233 'enableAlternateSearchHandler' => [
234 'location' => 'query',
235 'type' => 'boolean',
236 ],
237 'exactTerms' => [
238 'location' => 'query',
239 'type' => 'string',
240 ],
241 'excludeTerms' => [
242 'location' => 'query',
243 'type' => 'string',
244 ],
245 'fileType' => [
246 'location' => 'query',
247 'type' => 'string',
248 ],
249 'filter' => [
250 'location' => 'query',
251 'type' => 'string',
252 ],
253 'gl' => [
254 'location' => 'query',
255 'type' => 'string',
256 ],
257 'googlehost' => [
258 'location' => 'query',
259 'type' => 'string',
260 ],
261 'highRange' => [
262 'location' => 'query',
263 'type' => 'string',
264 ],
265 'hl' => [
266 'location' => 'query',
267 'type' => 'string',
268 ],
269 'hq' => [
270 'location' => 'query',
271 'type' => 'string',
272 ],
273 'imgColorType' => [
274 'location' => 'query',
275 'type' => 'string',
276 ],
277 'imgDominantColor' => [
278 'location' => 'query',
279 'type' => 'string',
280 ],
281 'imgSize' => [
282 'location' => 'query',
283 'type' => 'string',
284 ],
285 'imgType' => [
286 'location' => 'query',
287 'type' => 'string',
288 ],
289 'linkSite' => [
290 'location' => 'query',
291 'type' => 'string',
292 ],
293 'lowRange' => [
294 'location' => 'query',
295 'type' => 'string',
296 ],
297 'lr' => [
298 'location' => 'query',
299 'type' => 'string',
300 ],
301 'num' => [
302 'location' => 'query',
303 'type' => 'integer',
304 ],
305 'orTerms' => [
306 'location' => 'query',
307 'type' => 'string',
308 ],
309 'q' => [
310 'location' => 'query',
311 'type' => 'string',
312 ],
313 'relatedSite' => [
314 'location' => 'query',
315 'type' => 'string',
316 ],
317 'rights' => [
318 'location' => 'query',
319 'type' => 'string',
320 ],
321 'safe' => [
322 'location' => 'query',
323 'type' => 'string',
324 ],
325 'searchType' => [
326 'location' => 'query',
327 'type' => 'string',
328 ],
329 'siteSearch' => [
330 'location' => 'query',
331 'type' => 'string',
332 ],
333 'siteSearchFilter' => [
334 'location' => 'query',
335 'type' => 'string',
336 ],
337 'snippetLength' => [
338 'location' => 'query',
339 'type' => 'integer',
340 ],
341 'sort' => [
342 'location' => 'query',
343 'type' => 'string',
344 ],
345 'start' => [
346 'location' => 'query',
347 'type' => 'integer',
348 ],
349 ],
350 ],
351 ]
352 ]
353 );
354 }
355}
356
357// Adding a class alias for backwards compatibility with the previous class name.
358class_alias(CustomSearchAPI::class, 'Google_Service_CustomSearchAPI');
Note: See TracBrowser for help on using the repository browser.