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