Nav apraksta

Kgsearch.php 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 Kgsearch (v1).
  19. *
  20. * <p>
  21. * Searches the Google Knowledge Graph for entities.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://developers.google.com/knowledge-graph/" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_Kgsearch extends Google_Service
  31. {
  32. public $entities;
  33. /**
  34. * Constructs the internal representation of the Kgsearch service.
  35. *
  36. * @param Google_Client $client
  37. */
  38. public function __construct(Google_Client $client)
  39. {
  40. parent::__construct($client);
  41. $this->rootUrl = 'https://kgsearch.googleapis.com/';
  42. $this->servicePath = '';
  43. $this->version = 'v1';
  44. $this->serviceName = 'kgsearch';
  45. $this->entities = new Google_Service_Kgsearch_Resource_Entities(
  46. $this,
  47. $this->serviceName,
  48. 'entities',
  49. array(
  50. 'methods' => array(
  51. 'search' => array(
  52. 'path' => 'v1/entities:search',
  53. 'httpMethod' => 'GET',
  54. 'parameters' => array(
  55. 'prefix' => array(
  56. 'location' => 'query',
  57. 'type' => 'boolean',
  58. ),
  59. 'query' => array(
  60. 'location' => 'query',
  61. 'type' => 'string',
  62. ),
  63. 'types' => array(
  64. 'location' => 'query',
  65. 'type' => 'string',
  66. 'repeated' => true,
  67. ),
  68. 'indent' => array(
  69. 'location' => 'query',
  70. 'type' => 'boolean',
  71. ),
  72. 'languages' => array(
  73. 'location' => 'query',
  74. 'type' => 'string',
  75. 'repeated' => true,
  76. ),
  77. 'ids' => array(
  78. 'location' => 'query',
  79. 'type' => 'string',
  80. 'repeated' => true,
  81. ),
  82. 'limit' => array(
  83. 'location' => 'query',
  84. 'type' => 'integer',
  85. ),
  86. ),
  87. ),
  88. )
  89. )
  90. );
  91. }
  92. }