[f9c482b] | 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 | namespace Google\Service;
|
---|
| 19 |
|
---|
| 20 | use Google\Client;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * Service definition for MapsPlaces (v1).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | </p>
|
---|
| 27 | *
|
---|
| 28 | * <p>
|
---|
| 29 | * For more information about this service, see the API
|
---|
| 30 | * <a href="https://mapsplatform.google.com/maps-products/#places-section" target="_blank">Documentation</a>
|
---|
| 31 | * </p>
|
---|
| 32 | *
|
---|
| 33 | * @author Google, Inc.
|
---|
| 34 | */
|
---|
| 35 | class MapsPlaces extends \Google\Service
|
---|
| 36 | {
|
---|
| 37 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
| 38 | const CLOUD_PLATFORM =
|
---|
| 39 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
| 40 | /** Private Service: https://www.googleapis.com/auth/maps-platform.places. */
|
---|
| 41 | const MAPS_PLATFORM_PLACES =
|
---|
| 42 | "https://www.googleapis.com/auth/maps-platform.places";
|
---|
| 43 | /** Private Service: https://www.googleapis.com/auth/maps-platform.places.autocomplete. */
|
---|
| 44 | const MAPS_PLATFORM_PLACES_AUTOCOMPLETE =
|
---|
| 45 | "https://www.googleapis.com/auth/maps-platform.places.autocomplete";
|
---|
| 46 | /** Private Service: https://www.googleapis.com/auth/maps-platform.places.details. */
|
---|
| 47 | const MAPS_PLATFORM_PLACES_DETAILS =
|
---|
| 48 | "https://www.googleapis.com/auth/maps-platform.places.details";
|
---|
| 49 | /** Private Service: https://www.googleapis.com/auth/maps-platform.places.getphotomedia. */
|
---|
| 50 | const MAPS_PLATFORM_PLACES_GETPHOTOMEDIA =
|
---|
| 51 | "https://www.googleapis.com/auth/maps-platform.places.getphotomedia";
|
---|
| 52 | /** Private Service: https://www.googleapis.com/auth/maps-platform.places.nearbysearch. */
|
---|
| 53 | const MAPS_PLATFORM_PLACES_NEARBYSEARCH =
|
---|
| 54 | "https://www.googleapis.com/auth/maps-platform.places.nearbysearch";
|
---|
| 55 | /** Private Service: https://www.googleapis.com/auth/maps-platform.places.textsearch. */
|
---|
| 56 | const MAPS_PLATFORM_PLACES_TEXTSEARCH =
|
---|
| 57 | "https://www.googleapis.com/auth/maps-platform.places.textsearch";
|
---|
| 58 |
|
---|
| 59 | public $places;
|
---|
| 60 | public $places_photos;
|
---|
| 61 | public $rootUrlTemplate;
|
---|
| 62 |
|
---|
| 63 | /**
|
---|
| 64 | * Constructs the internal representation of the MapsPlaces service.
|
---|
| 65 | *
|
---|
| 66 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 67 | * config array to pass to a new Client instance.
|
---|
| 68 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 69 | */
|
---|
| 70 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 71 | {
|
---|
| 72 | parent::__construct($clientOrConfig);
|
---|
| 73 | $this->rootUrl = $rootUrl ?: 'https://places.googleapis.com/';
|
---|
| 74 | $this->rootUrlTemplate = $rootUrl ?: 'https://places.UNIVERSE_DOMAIN/';
|
---|
| 75 | $this->servicePath = '';
|
---|
| 76 | $this->batchPath = 'batch';
|
---|
| 77 | $this->version = 'v1';
|
---|
| 78 | $this->serviceName = 'places';
|
---|
| 79 |
|
---|
| 80 | $this->places = new MapsPlaces\Resource\Places(
|
---|
| 81 | $this,
|
---|
| 82 | $this->serviceName,
|
---|
| 83 | 'places',
|
---|
| 84 | [
|
---|
| 85 | 'methods' => [
|
---|
| 86 | 'autocomplete' => [
|
---|
| 87 | 'path' => 'v1/places:autocomplete',
|
---|
| 88 | 'httpMethod' => 'POST',
|
---|
| 89 | 'parameters' => [],
|
---|
| 90 | ],'get' => [
|
---|
| 91 | 'path' => 'v1/{+name}',
|
---|
| 92 | 'httpMethod' => 'GET',
|
---|
| 93 | 'parameters' => [
|
---|
| 94 | 'name' => [
|
---|
| 95 | 'location' => 'path',
|
---|
| 96 | 'type' => 'string',
|
---|
| 97 | 'required' => true,
|
---|
| 98 | ],
|
---|
| 99 | 'languageCode' => [
|
---|
| 100 | 'location' => 'query',
|
---|
| 101 | 'type' => 'string',
|
---|
| 102 | ],
|
---|
| 103 | 'regionCode' => [
|
---|
| 104 | 'location' => 'query',
|
---|
| 105 | 'type' => 'string',
|
---|
| 106 | ],
|
---|
| 107 | 'sessionToken' => [
|
---|
| 108 | 'location' => 'query',
|
---|
| 109 | 'type' => 'string',
|
---|
| 110 | ],
|
---|
| 111 | ],
|
---|
| 112 | ],'searchNearby' => [
|
---|
| 113 | 'path' => 'v1/places:searchNearby',
|
---|
| 114 | 'httpMethod' => 'POST',
|
---|
| 115 | 'parameters' => [],
|
---|
| 116 | ],'searchText' => [
|
---|
| 117 | 'path' => 'v1/places:searchText',
|
---|
| 118 | 'httpMethod' => 'POST',
|
---|
| 119 | 'parameters' => [],
|
---|
| 120 | ],
|
---|
| 121 | ]
|
---|
| 122 | ]
|
---|
| 123 | );
|
---|
| 124 | $this->places_photos = new MapsPlaces\Resource\PlacesPhotos(
|
---|
| 125 | $this,
|
---|
| 126 | $this->serviceName,
|
---|
| 127 | 'photos',
|
---|
| 128 | [
|
---|
| 129 | 'methods' => [
|
---|
| 130 | 'getMedia' => [
|
---|
| 131 | 'path' => 'v1/{+name}',
|
---|
| 132 | 'httpMethod' => 'GET',
|
---|
| 133 | 'parameters' => [
|
---|
| 134 | 'name' => [
|
---|
| 135 | 'location' => 'path',
|
---|
| 136 | 'type' => 'string',
|
---|
| 137 | 'required' => true,
|
---|
| 138 | ],
|
---|
| 139 | 'maxHeightPx' => [
|
---|
| 140 | 'location' => 'query',
|
---|
| 141 | 'type' => 'integer',
|
---|
| 142 | ],
|
---|
| 143 | 'maxWidthPx' => [
|
---|
| 144 | 'location' => 'query',
|
---|
| 145 | 'type' => 'integer',
|
---|
| 146 | ],
|
---|
| 147 | 'skipHttpRedirect' => [
|
---|
| 148 | 'location' => 'query',
|
---|
| 149 | 'type' => 'boolean',
|
---|
| 150 | ],
|
---|
| 151 | ],
|
---|
| 152 | ],
|
---|
| 153 | ]
|
---|
| 154 | ]
|
---|
| 155 | );
|
---|
| 156 | }
|
---|
| 157 | }
|
---|
| 158 |
|
---|
| 159 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 160 | class_alias(MapsPlaces::class, 'Google_Service_MapsPlaces');
|
---|