Pollen.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for Pollen (v1).
  21. *
  22. * <p>
  23. * The Pollen API.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://developers.google.com/maps/documentation/pollen" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class Pollen extends \Google\Service
  33. {
  34. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. public $forecast;
  38. public $mapTypes_heatmapTiles;
  39. public $rootUrlTemplate;
  40. /**
  41. * Constructs the internal representation of the Pollen service.
  42. *
  43. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  44. * config array to pass to a new Client instance.
  45. * @param string $rootUrl The root URL used for requests to the service.
  46. */
  47. public function __construct($clientOrConfig = [], $rootUrl = null)
  48. {
  49. parent::__construct($clientOrConfig);
  50. $this->rootUrl = $rootUrl ?: 'https://pollen.googleapis.com/';
  51. $this->rootUrlTemplate = $rootUrl ?: 'https://pollen.UNIVERSE_DOMAIN/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'pollen';
  56. $this->forecast = new Pollen\Resource\Forecast(
  57. $this,
  58. $this->serviceName,
  59. 'forecast',
  60. [
  61. 'methods' => [
  62. 'lookup' => [
  63. 'path' => 'v1/forecast:lookup',
  64. 'httpMethod' => 'GET',
  65. 'parameters' => [
  66. 'days' => [
  67. 'location' => 'query',
  68. 'type' => 'integer',
  69. ],
  70. 'languageCode' => [
  71. 'location' => 'query',
  72. 'type' => 'string',
  73. ],
  74. 'location.latitude' => [
  75. 'location' => 'query',
  76. 'type' => 'number',
  77. ],
  78. 'location.longitude' => [
  79. 'location' => 'query',
  80. 'type' => 'number',
  81. ],
  82. 'pageSize' => [
  83. 'location' => 'query',
  84. 'type' => 'integer',
  85. ],
  86. 'pageToken' => [
  87. 'location' => 'query',
  88. 'type' => 'string',
  89. ],
  90. 'plantsDescription' => [
  91. 'location' => 'query',
  92. 'type' => 'boolean',
  93. ],
  94. ],
  95. ],
  96. ]
  97. ]
  98. );
  99. $this->mapTypes_heatmapTiles = new Pollen\Resource\MapTypesHeatmapTiles(
  100. $this,
  101. $this->serviceName,
  102. 'heatmapTiles',
  103. [
  104. 'methods' => [
  105. 'lookupHeatmapTile' => [
  106. 'path' => 'v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}',
  107. 'httpMethod' => 'GET',
  108. 'parameters' => [
  109. 'mapType' => [
  110. 'location' => 'path',
  111. 'type' => 'string',
  112. 'required' => true,
  113. ],
  114. 'zoom' => [
  115. 'location' => 'path',
  116. 'type' => 'integer',
  117. 'required' => true,
  118. ],
  119. 'x' => [
  120. 'location' => 'path',
  121. 'type' => 'integer',
  122. 'required' => true,
  123. ],
  124. 'y' => [
  125. 'location' => 'path',
  126. 'type' => 'integer',
  127. 'required' => true,
  128. ],
  129. ],
  130. ],
  131. ]
  132. ]
  133. );
  134. }
  135. }
  136. // Adding a class alias for backwards compatibility with the previous class name.
  137. class_alias(Pollen::class, 'Google_Service_Pollen');