Nav apraksta

Customsearch.php 10KB

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