@googlemaps/places 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -77
- package/build/protos/google/maps/places/v1/address_descriptor.proto +144 -0
- package/build/protos/google/maps/places/v1/photo.proto +6 -0
- package/build/protos/google/maps/places/v1/place.proto +128 -47
- package/build/protos/google/maps/places/v1/places_service.proto +4 -3
- package/build/protos/google/maps/places/v1/review.proto +7 -0
- package/build/protos/protos.d.ts +864 -324
- package/build/protos/protos.js +7322 -5392
- package/build/protos/protos.json +286 -47
- package/build/src/v1/places_client.d.ts +4 -3
- package/build/src/v1/places_client.js +68 -68
- package/build/src/v1/places_client.js.map +1 -1
- package/build/src/v1/places_proto_list.json +1 -0
- package/package.json +4 -4
- package/CHANGELOG.md +0 -132
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
|
2
|
-
[//]: # "
|
|
2
|
+
[//]: # "The comments you see below are used to generate those parts of the template in later states."
|
|
3
3
|
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
|
4
4
|
|
|
5
|
-
# [Places API (New):
|
|
6
|
-
|
|
7
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
|
-
[](https://www.npmjs.org/package/@googlemaps/places)
|
|
9
|
-
|
|
5
|
+
# [Places API (New): Nodejs Client][homepage]
|
|
10
6
|
|
|
7
|
+
This library is considered to be in **preview**. This means it is still a
|
|
8
|
+
work-in-progress and under active development. Any release is subject to
|
|
9
|
+
backwards-incompatible changes at any time.
|
|
11
10
|
|
|
11
|
+
[](https://www.npmjs.org/package/@googlemaps/places)
|
|
12
12
|
|
|
13
13
|
Places API (New) client for Node.js
|
|
14
14
|
|
|
15
|
+
[//]: # "partials.introduction"
|
|
15
16
|
|
|
16
17
|
A comprehensive list of changes in each version may be found in
|
|
17
|
-
[the CHANGELOG]
|
|
18
|
+
[the CHANGELOG][homepage_changelog].
|
|
18
19
|
|
|
19
|
-
* [Places API (New)
|
|
20
|
-
* [Places API (New) Documentation]
|
|
21
|
-
* [github.com/googleapis/google-cloud-node/packages/google-maps-places](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-places)
|
|
20
|
+
* [Places API (New) Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/places/latest)
|
|
21
|
+
* [Places API (New) Documentation](https://developers.google.com/maps/documentation/places/web-service/)
|
|
22
22
|
|
|
23
23
|
Read more about the client libraries for Cloud APIs, including the older
|
|
24
24
|
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
@@ -27,83 +27,63 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
27
27
|
|
|
28
28
|
**Table of contents:**
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
* [Quickstart](#quickstart)
|
|
32
31
|
* [Before you begin](#before-you-begin)
|
|
33
32
|
* [Installing the client library](#installing-the-client-library)
|
|
34
|
-
|
|
35
|
-
* [Samples](#samples)
|
|
33
|
+
|
|
36
34
|
* [Versioning](#versioning)
|
|
37
35
|
* [Contributing](#contributing)
|
|
38
36
|
* [License](#license)
|
|
39
37
|
|
|
40
38
|
## Quickstart
|
|
41
|
-
|
|
42
39
|
### Before you begin
|
|
43
40
|
|
|
44
41
|
1. [Select or create a Cloud Platform project][projects].
|
|
45
42
|
1. [Enable billing for your project][billing].
|
|
46
43
|
1. [Enable the Places API (New) API][enable_api].
|
|
47
|
-
1. [Set up authentication
|
|
44
|
+
1. [Set up authentication][auth] so you can access the
|
|
48
45
|
API from your local workstation.
|
|
49
|
-
|
|
50
46
|
### Installing the client library
|
|
51
47
|
|
|
52
48
|
```bash
|
|
53
49
|
npm install @googlemaps/places
|
|
54
50
|
```
|
|
55
51
|
|
|
52
|
+
## Terms of Service
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// Imports the Places library
|
|
62
|
-
const {PlacesClient} = require('@googlemaps/places').v1;
|
|
63
|
-
|
|
64
|
-
// Instantiates a client
|
|
65
|
-
const placesClient = new PlacesClient();
|
|
66
|
-
|
|
67
|
-
async function callSearchText() {
|
|
68
|
-
// Construct request
|
|
69
|
-
const request = {
|
|
70
|
-
textQuery,
|
|
71
|
-
};
|
|
54
|
+
`@googlemaps/places` uses Google Maps Platform services. Use of Google
|
|
55
|
+
Maps Platform services through this library is subject to the
|
|
56
|
+
[Google Maps Platform Terms of Service][gmp-tos].
|
|
72
57
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
'X-Goog-FieldMask': 'places.displayName',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
console.log(response);
|
|
82
|
-
}
|
|
58
|
+
This library is not a Google Maps Platform Core Service.
|
|
59
|
+
Therefore, the Google Maps Platform Terms of Service (e.g., Technical
|
|
60
|
+
Support Services, Service Level Agreements, and Deprecation Policy)
|
|
61
|
+
do not apply to this library.
|
|
83
62
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
```
|
|
63
|
+
### European Economic Area (EEA) developers
|
|
87
64
|
|
|
65
|
+
If your billing address is in the European Economic Area, effective on
|
|
66
|
+
8 July 2025, the [Google Maps Platform EEA Terms of Service][gmp-tos-eea]
|
|
67
|
+
will apply to your use of the Services. Functionality varies by region.
|
|
68
|
+
[Learn more][gmp-tos-eea-faq].
|
|
88
69
|
|
|
70
|
+
[gmp-tos]: https://cloud.google.com/maps-platform/terms
|
|
71
|
+
[gmp-tos-eea]: https://cloud.google.com/terms/maps-platform/eea
|
|
72
|
+
[gmp-tos-eea-faq]: https://developers.google.com/maps/comms/eea/faq
|
|
89
73
|
|
|
90
74
|
## Samples
|
|
91
75
|
|
|
92
|
-
Samples are in the [`samples/`]
|
|
93
|
-
|
|
94
|
-
| Sample | Source Code | Try it |
|
|
95
|
-
| --------------------------- | --------------------------------- | ------ |
|
|
96
|
-
| Places.autocomplete_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js,packages/google-maps-places/samples/README.md) |
|
|
97
|
-
| Places.get_photo_media | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_photo_media.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_photo_media.js,packages/google-maps-places/samples/README.md) |
|
|
98
|
-
| Places.get_place | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_place.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_place.js,packages/google-maps-places/samples/README.md) |
|
|
99
|
-
| Places.search_nearby | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_nearby.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_nearby.js,packages/google-maps-places/samples/README.md) |
|
|
100
|
-
| Places.search_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_text.js,packages/google-maps-places/samples/README.md) |
|
|
101
|
-
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/quickstart.js,packages/google-maps-places/samples/README.md) |
|
|
102
|
-
|
|
76
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
103
77
|
|
|
78
|
+
| Sample | Source Code |
|
|
79
|
+
| --------------------------- | --------------------------------- |
|
|
80
|
+
| autocomplete places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js) |
|
|
81
|
+
| get photo media | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_photo_media.js) |
|
|
82
|
+
| get place | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_place.js) |
|
|
83
|
+
| search nearby | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_nearby.js) |
|
|
84
|
+
| search text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_text.js) |
|
|
85
|
+
| maps | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json) |
|
|
104
86
|
|
|
105
|
-
The [Places API (New) Node.js Client API Reference][client-docs] documentation
|
|
106
|
-
also contains samples.
|
|
107
87
|
|
|
108
88
|
## Supported Node.js Versions
|
|
109
89
|
|
|
@@ -130,41 +110,29 @@ for versions compatible with Node.js 8.
|
|
|
130
110
|
|
|
131
111
|
This library follows [Semantic Versioning](http://semver.org/).
|
|
132
112
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
This library is considered to be in **preview**. This means it is still a
|
|
140
|
-
work-in-progress and under active development. Any release is subject to
|
|
141
|
-
backwards-incompatible changes at any time.
|
|
142
|
-
|
|
143
|
-
|
|
144
113
|
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
145
114
|
|
|
146
115
|
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
147
116
|
|
|
148
117
|
## Contributing
|
|
149
118
|
|
|
150
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
119
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/CONTRIBUTING.md).
|
|
151
120
|
|
|
152
|
-
Please note that this `README.md
|
|
121
|
+
Please note that this `README.md`
|
|
153
122
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
154
|
-
are generated from a central template.
|
|
155
|
-
to its templates in
|
|
156
|
-
[directory](https://github.com/googleapis/synthtool).
|
|
123
|
+
are generated from a central template.
|
|
157
124
|
|
|
158
125
|
## License
|
|
159
126
|
|
|
160
127
|
Apache Version 2.0
|
|
161
128
|
|
|
162
|
-
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
129
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/LICENSE)
|
|
163
130
|
|
|
164
|
-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/places/latest
|
|
165
|
-
[product-docs]: https://developers.google.com/maps/documentation/places/web-service/
|
|
166
131
|
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
167
132
|
[projects]: https://console.cloud.google.com/project
|
|
168
133
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
169
134
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=places.googleapis.com
|
|
170
|
-
[auth]: https://cloud.google.com/docs/authentication/
|
|
135
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
136
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples
|
|
137
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/CHANGELOG.md
|
|
138
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// Copyright 2025 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.maps.places.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/resource.proto";
|
|
20
|
+
import "google/type/localized_text.proto";
|
|
21
|
+
|
|
22
|
+
option csharp_namespace = "Google.Maps.Places.V1";
|
|
23
|
+
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
|
|
24
|
+
option java_multiple_files = true;
|
|
25
|
+
option java_outer_classname = "AddressDescriptorProto";
|
|
26
|
+
option java_package = "com.google.maps.places.v1";
|
|
27
|
+
option objc_class_prefix = "GMPSV1";
|
|
28
|
+
option php_namespace = "Google\\Maps\\Places\\V1";
|
|
29
|
+
|
|
30
|
+
// A relational description of a location. Includes a ranked set of nearby
|
|
31
|
+
// landmarks and precise containing areas and their relationship to the target
|
|
32
|
+
// location.
|
|
33
|
+
message AddressDescriptor {
|
|
34
|
+
// Basic landmark information and the landmark's relationship with the
|
|
35
|
+
// target location.
|
|
36
|
+
//
|
|
37
|
+
// Landmarks are prominent places that can be used to describe a location.
|
|
38
|
+
message Landmark {
|
|
39
|
+
// Defines the spatial relationship between the target location and the
|
|
40
|
+
// landmark.
|
|
41
|
+
enum SpatialRelationship {
|
|
42
|
+
// This is the default relationship when nothing more specific below
|
|
43
|
+
// applies.
|
|
44
|
+
NEAR = 0;
|
|
45
|
+
|
|
46
|
+
// The landmark has a spatial geometry and the target is within its
|
|
47
|
+
// bounds.
|
|
48
|
+
WITHIN = 1;
|
|
49
|
+
|
|
50
|
+
// The target is directly adjacent to the landmark.
|
|
51
|
+
BESIDE = 2;
|
|
52
|
+
|
|
53
|
+
// The target is directly opposite the landmark on the other side of the
|
|
54
|
+
// road.
|
|
55
|
+
ACROSS_THE_ROAD = 3;
|
|
56
|
+
|
|
57
|
+
// On the same route as the landmark but not besides or across.
|
|
58
|
+
DOWN_THE_ROAD = 4;
|
|
59
|
+
|
|
60
|
+
// Not on the same route as the landmark but a single turn away.
|
|
61
|
+
AROUND_THE_CORNER = 5;
|
|
62
|
+
|
|
63
|
+
// Close to the landmark's structure but further away from its street
|
|
64
|
+
// entrances.
|
|
65
|
+
BEHIND = 6;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// The landmark's resource name.
|
|
69
|
+
string name = 1 [
|
|
70
|
+
(google.api.resource_reference) = { type: "places.googleapis.com/Place" }
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
// The landmark's place id.
|
|
74
|
+
string place_id = 2;
|
|
75
|
+
|
|
76
|
+
// The landmark's display name.
|
|
77
|
+
google.type.LocalizedText display_name = 3;
|
|
78
|
+
|
|
79
|
+
// A set of type tags for this landmark. For a complete list of possible
|
|
80
|
+
// values, see
|
|
81
|
+
// https://developers.google.com/maps/documentation/places/web-service/place-types.
|
|
82
|
+
repeated string types = 4;
|
|
83
|
+
|
|
84
|
+
// Defines the spatial relationship between the target location and the
|
|
85
|
+
// landmark.
|
|
86
|
+
SpatialRelationship spatial_relationship = 5;
|
|
87
|
+
|
|
88
|
+
// The straight line distance, in meters, between the center point of the
|
|
89
|
+
// target and the center point of the landmark. In some situations, this
|
|
90
|
+
// value can be longer than `travel_distance_meters`.
|
|
91
|
+
float straight_line_distance_meters = 6;
|
|
92
|
+
|
|
93
|
+
// The travel distance, in meters, along the road network from the target to
|
|
94
|
+
// the landmark, if known. This value does not take into account the mode of
|
|
95
|
+
// transportation, such as walking, driving, or biking.
|
|
96
|
+
optional float travel_distance_meters = 7;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Area information and the area's relationship with the target location.
|
|
100
|
+
//
|
|
101
|
+
// Areas includes precise sublocality, neighborhoods, and large compounds that
|
|
102
|
+
// are useful for describing a location.
|
|
103
|
+
message Area {
|
|
104
|
+
// Defines the spatial relationship between the target location and the
|
|
105
|
+
// area.
|
|
106
|
+
enum Containment {
|
|
107
|
+
// The containment is unspecified.
|
|
108
|
+
CONTAINMENT_UNSPECIFIED = 0;
|
|
109
|
+
|
|
110
|
+
// The target location is within the area region, close to the
|
|
111
|
+
// center.
|
|
112
|
+
WITHIN = 1;
|
|
113
|
+
|
|
114
|
+
// The target location is within the area region, close to the edge.
|
|
115
|
+
OUTSKIRTS = 2;
|
|
116
|
+
|
|
117
|
+
// The target location is outside the area region, but close by.
|
|
118
|
+
NEAR = 3;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// The area's resource name.
|
|
122
|
+
string name = 1 [
|
|
123
|
+
(google.api.resource_reference) = { type: "places.googleapis.com/Place" }
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
// The area's place id.
|
|
127
|
+
string place_id = 2;
|
|
128
|
+
|
|
129
|
+
// The area's display name.
|
|
130
|
+
google.type.LocalizedText display_name = 3;
|
|
131
|
+
|
|
132
|
+
// Defines the spatial relationship between the target location and the
|
|
133
|
+
// area.
|
|
134
|
+
Containment containment = 4;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// A ranked list of nearby landmarks. The most recognizable and nearby
|
|
138
|
+
// landmarks are ranked first.
|
|
139
|
+
repeated Landmark landmarks = 1;
|
|
140
|
+
|
|
141
|
+
// A ranked list of containing or adjacent areas. The most recognizable and
|
|
142
|
+
// precise areas are ranked first.
|
|
143
|
+
repeated Area areas = 2;
|
|
144
|
+
}
|
|
@@ -50,4 +50,10 @@ message Photo {
|
|
|
50
50
|
|
|
51
51
|
// This photo's authors.
|
|
52
52
|
repeated AuthorAttribution author_attributions = 4;
|
|
53
|
+
|
|
54
|
+
// A link where users can flag a problem with the photo.
|
|
55
|
+
string flag_content_uri = 5;
|
|
56
|
+
|
|
57
|
+
// A link to show the photo on Google Maps.
|
|
58
|
+
string google_maps_uri = 6;
|
|
53
59
|
}
|
|
@@ -18,12 +18,12 @@ package google.maps.places.v1;
|
|
|
18
18
|
|
|
19
19
|
import "google/api/resource.proto";
|
|
20
20
|
import "google/geo/type/viewport.proto";
|
|
21
|
+
import "google/maps/places/v1/address_descriptor.proto";
|
|
21
22
|
import "google/maps/places/v1/content_block.proto";
|
|
22
23
|
import "google/maps/places/v1/ev_charging.proto";
|
|
23
24
|
import "google/maps/places/v1/fuel_options.proto";
|
|
24
25
|
import "google/maps/places/v1/photo.proto";
|
|
25
26
|
import "google/maps/places/v1/price_range.proto";
|
|
26
|
-
import "google/maps/places/v1/reference.proto";
|
|
27
27
|
import "google/maps/places/v1/review.proto";
|
|
28
28
|
import "google/protobuf/timestamp.proto";
|
|
29
29
|
import "google/type/date.proto";
|
|
@@ -177,14 +177,31 @@ message Place {
|
|
|
177
177
|
optional bool open_now = 1;
|
|
178
178
|
|
|
179
179
|
// The periods that this place is open during the week. The periods are in
|
|
180
|
-
// chronological order,
|
|
181
|
-
//
|
|
180
|
+
// chronological order, in the place-local timezone. An empty (but not
|
|
181
|
+
// absent) value indicates a place that is never open, e.g.
|
|
182
182
|
// because it is closed temporarily for renovations.
|
|
183
|
+
//
|
|
184
|
+
// The starting day of `periods` is NOT fixed and should not be assumed to
|
|
185
|
+
// be Sunday. The API determines the start day based on a variety of
|
|
186
|
+
// factors. For example, for a 24/7 business, the first period may begin on
|
|
187
|
+
// the day of the request. For other businesses, it might be the first day
|
|
188
|
+
// of the week that they are open.
|
|
189
|
+
//
|
|
190
|
+
// NOTE: The ordering of the `periods` array is independent of the ordering
|
|
191
|
+
// of the `weekday_descriptions` array. Do not assume they will begin on the
|
|
192
|
+
// same day.
|
|
183
193
|
repeated Period periods = 2;
|
|
184
194
|
|
|
185
195
|
// Localized strings describing the opening hours of this place, one string
|
|
186
|
-
// for each day of the week.
|
|
187
|
-
//
|
|
196
|
+
// for each day of the week.
|
|
197
|
+
//
|
|
198
|
+
// NOTE: The order of the days and the start of the week is determined by
|
|
199
|
+
// the locale (language and region). The ordering of the `periods` array is
|
|
200
|
+
// independent of the ordering of the `weekday_descriptions` array. Do not
|
|
201
|
+
// assume they will begin on the same day.
|
|
202
|
+
//
|
|
203
|
+
// Will be empty if the hours are unknown or could not be converted to
|
|
204
|
+
// localized text. Example: "Sun: 18:00–06:00"
|
|
188
205
|
repeated string weekday_descriptions = 3;
|
|
189
206
|
|
|
190
207
|
// A type string used to identify the type of secondary hours.
|
|
@@ -273,15 +290,21 @@ message Place {
|
|
|
273
290
|
optional bool paid_garage_parking = 7;
|
|
274
291
|
}
|
|
275
292
|
|
|
276
|
-
//
|
|
277
|
-
//
|
|
293
|
+
// Sub-destinations are specific places associated with a main place. These
|
|
294
|
+
// provide more specific destinations for users who are searching within a
|
|
295
|
+
// large or complex place, like an airport, national park, university, or
|
|
296
|
+
// stadium. For example, sub-destinations at an airport might include
|
|
297
|
+
// associated terminals and parking lots. Sub-destinations return the place ID
|
|
298
|
+
// and place resource name, which can be used in subsequent Place Details
|
|
299
|
+
// (New) requests to fetch richer details, including the sub-destination's
|
|
300
|
+
// display name and location.
|
|
278
301
|
message SubDestination {
|
|
279
|
-
// The resource name of the sub
|
|
302
|
+
// The resource name of the sub-destination.
|
|
280
303
|
string name = 1 [
|
|
281
304
|
(google.api.resource_reference) = { type: "places.googleapis.com/Place" }
|
|
282
305
|
];
|
|
283
306
|
|
|
284
|
-
// The place id of the sub
|
|
307
|
+
// The place id of the sub-destination.
|
|
285
308
|
string id = 2;
|
|
286
309
|
}
|
|
287
310
|
|
|
@@ -300,31 +323,18 @@ message Place {
|
|
|
300
323
|
optional bool wheelchair_accessible_seating = 4;
|
|
301
324
|
}
|
|
302
325
|
|
|
303
|
-
// Experimental: See
|
|
304
|
-
// https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
|
|
305
|
-
// for more details.
|
|
306
|
-
//
|
|
307
326
|
// AI-generated summary of the place.
|
|
308
327
|
message GenerativeSummary {
|
|
309
328
|
// The overview of the place.
|
|
310
329
|
google.type.LocalizedText overview = 1;
|
|
311
330
|
|
|
312
|
-
//
|
|
313
|
-
|
|
331
|
+
// A link where users can flag a problem with the overview summary.
|
|
332
|
+
string overview_flag_content_uri = 4;
|
|
314
333
|
|
|
315
|
-
//
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
// Experimental: See
|
|
320
|
-
// https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
|
|
321
|
-
// for more details.
|
|
322
|
-
//
|
|
323
|
-
// AI-generated summary of the area that the place is in.
|
|
324
|
-
message AreaSummary {
|
|
325
|
-
// Content blocks that compose the area summary. Each block has a separate
|
|
326
|
-
// topic about the area.
|
|
327
|
-
repeated ContentBlock content_blocks = 4;
|
|
334
|
+
// The AI disclosure message "Summarized with Gemini"
|
|
335
|
+
// (and its localized variants). This will be in the language specified in
|
|
336
|
+
// the request if available.
|
|
337
|
+
google.type.LocalizedText disclosure_text = 6;
|
|
328
338
|
}
|
|
329
339
|
|
|
330
340
|
// Info about the place in which this place is located.
|
|
@@ -338,6 +348,63 @@ message Place {
|
|
|
338
348
|
string id = 2;
|
|
339
349
|
}
|
|
340
350
|
|
|
351
|
+
// AI-generated summary of the place using user reviews.
|
|
352
|
+
message ReviewSummary {
|
|
353
|
+
// The summary of user reviews.
|
|
354
|
+
google.type.LocalizedText text = 1;
|
|
355
|
+
|
|
356
|
+
// A link where users can flag a problem with the summary.
|
|
357
|
+
string flag_content_uri = 2;
|
|
358
|
+
|
|
359
|
+
// The AI disclosure message "Summarized with Gemini"
|
|
360
|
+
// (and its localized variants). This will be in the language specified in
|
|
361
|
+
// the request if available.
|
|
362
|
+
google.type.LocalizedText disclosure_text = 3;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// The summary of amenities near the EV charging station. This only applies to
|
|
366
|
+
// places with type `electric_vehicle_charging_station`. The `overview` field
|
|
367
|
+
// is guaranteed to be provided while the other fields are optional.
|
|
368
|
+
message EvChargeAmenitySummary {
|
|
369
|
+
// An overview of the available amenities. This is guaranteed to be
|
|
370
|
+
// provided.
|
|
371
|
+
ContentBlock overview = 1;
|
|
372
|
+
|
|
373
|
+
// A summary of the nearby coffee options.
|
|
374
|
+
ContentBlock coffee = 2;
|
|
375
|
+
|
|
376
|
+
// A summary of the nearby restaurants.
|
|
377
|
+
ContentBlock restaurant = 3;
|
|
378
|
+
|
|
379
|
+
// A summary of the nearby gas stations.
|
|
380
|
+
ContentBlock store = 4;
|
|
381
|
+
|
|
382
|
+
// A link where users can flag a problem with the summary.
|
|
383
|
+
string flag_content_uri = 5;
|
|
384
|
+
|
|
385
|
+
// The AI disclosure message "Summarized with Gemini"
|
|
386
|
+
// (and its localized variants). This will be in the language specified in
|
|
387
|
+
// the request if available.
|
|
388
|
+
google.type.LocalizedText disclosure_text = 6;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// A summary of points of interest near the place.
|
|
392
|
+
message NeighborhoodSummary {
|
|
393
|
+
// An overview summary of the neighborhood.
|
|
394
|
+
ContentBlock overview = 1;
|
|
395
|
+
|
|
396
|
+
// A detailed description of the neighborhood.
|
|
397
|
+
ContentBlock description = 2;
|
|
398
|
+
|
|
399
|
+
// A link where users can flag a problem with the summary.
|
|
400
|
+
string flag_content_uri = 3;
|
|
401
|
+
|
|
402
|
+
// The AI disclosure message "Summarized with Gemini"
|
|
403
|
+
// (and its localized variants). This will be in the language specified in
|
|
404
|
+
// the request if available.
|
|
405
|
+
google.type.LocalizedText disclosure_text = 4;
|
|
406
|
+
}
|
|
407
|
+
|
|
341
408
|
// This Place's resource name, in `places/{place_id}` format. Can be used to
|
|
342
409
|
// look up the Place.
|
|
343
410
|
string name = 1;
|
|
@@ -355,17 +422,22 @@ message Place {
|
|
|
355
422
|
// https://developers.google.com/maps/documentation/places/web-service/place-types
|
|
356
423
|
repeated string types = 5;
|
|
357
424
|
|
|
358
|
-
// The primary type of the given result. This type must one of the Places
|
|
359
|
-
// supported types. For example, "restaurant", "cafe", "airport", etc. A
|
|
425
|
+
// The primary type of the given result. This type must be one of the Places
|
|
426
|
+
// API supported types. For example, "restaurant", "cafe", "airport", etc. A
|
|
360
427
|
// place can only have a single primary type. For the complete list of
|
|
361
428
|
// possible values, see Table A and Table B at
|
|
362
|
-
// https://developers.google.com/maps/documentation/places/web-service/place-types
|
|
429
|
+
// https://developers.google.com/maps/documentation/places/web-service/place-types.
|
|
430
|
+
// The primary type may be missing if the place's primary type is not a
|
|
431
|
+
// supported type. When a primary type is present, it is always one of the
|
|
432
|
+
// types in the `types` field.
|
|
363
433
|
string primary_type = 50;
|
|
364
434
|
|
|
365
435
|
// The display name of the primary type, localized to the request language if
|
|
366
436
|
// applicable. For the complete list of possible values, see Table A and Table
|
|
367
437
|
// B at
|
|
368
|
-
// https://developers.google.com/maps/documentation/places/web-service/place-types
|
|
438
|
+
// https://developers.google.com/maps/documentation/places/web-service/place-types.
|
|
439
|
+
// The primary type may be missing if the place's primary type is not a
|
|
440
|
+
// supported type.
|
|
369
441
|
google.type.LocalizedText primary_type_display_name = 32;
|
|
370
442
|
|
|
371
443
|
// A human-readable phone number for the place, in national format.
|
|
@@ -429,9 +501,14 @@ message Place {
|
|
|
429
501
|
// The regular hours of operation. Note that if a place is always open (24
|
|
430
502
|
// hours), the `close` field will not be set. Clients can rely on always open
|
|
431
503
|
// (24 hours) being represented as an
|
|
432
|
-
// [open]
|
|
433
|
-
// containing
|
|
434
|
-
//
|
|
504
|
+
// [`open`](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Period)
|
|
505
|
+
// period containing
|
|
506
|
+
// [`day`](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Point)
|
|
507
|
+
// with value `0`,
|
|
508
|
+
// [`hour`](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Point)
|
|
509
|
+
// with value `0`, and
|
|
510
|
+
// [`minute`](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Point)
|
|
511
|
+
// with value `0`.
|
|
435
512
|
OpeningHours regular_opening_hours = 21;
|
|
436
513
|
|
|
437
514
|
// Number of minutes this place's timezone is currently offset from UTC.
|
|
@@ -573,7 +650,7 @@ message Place {
|
|
|
573
650
|
// Options of parking provided by the place.
|
|
574
651
|
ParkingOptions parking_options = 70;
|
|
575
652
|
|
|
576
|
-
// A list of sub
|
|
653
|
+
// A list of sub-destinations related to the place.
|
|
577
654
|
repeated SubDestination sub_destinations = 71;
|
|
578
655
|
|
|
579
656
|
// Information about the accessibility options a place offers.
|
|
@@ -586,20 +663,9 @@ message Place {
|
|
|
586
663
|
// Information of ev charging options.
|
|
587
664
|
EVChargeOptions ev_charge_options = 79;
|
|
588
665
|
|
|
589
|
-
// Experimental: See
|
|
590
|
-
// https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
|
|
591
|
-
// for more details.
|
|
592
|
-
//
|
|
593
666
|
// AI-generated summary of the place.
|
|
594
667
|
GenerativeSummary generative_summary = 80;
|
|
595
668
|
|
|
596
|
-
// Experimental: See
|
|
597
|
-
// https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
|
|
598
|
-
// for more details.
|
|
599
|
-
//
|
|
600
|
-
// AI-generated summary of the area that the place is in.
|
|
601
|
-
AreaSummary area_summary = 81;
|
|
602
|
-
|
|
603
669
|
// List of places in which the current place is located.
|
|
604
670
|
repeated ContainingPlace containing_places = 82;
|
|
605
671
|
|
|
@@ -610,8 +676,23 @@ message Place {
|
|
|
610
676
|
// have a physical address or location on Google Maps.
|
|
611
677
|
optional bool pure_service_area_business = 83;
|
|
612
678
|
|
|
679
|
+
// The address descriptor of the place. Address descriptors include additional
|
|
680
|
+
// information that help describe a location using landmarks and areas. See
|
|
681
|
+
// address descriptor regional coverage in
|
|
682
|
+
// https://developers.google.com/maps/documentation/geocoding/address-descriptors/coverage.
|
|
683
|
+
AddressDescriptor address_descriptor = 84;
|
|
684
|
+
|
|
613
685
|
// The price range associated with a Place.
|
|
614
686
|
PriceRange price_range = 86;
|
|
687
|
+
|
|
688
|
+
// AI-generated summary of the place using user reviews.
|
|
689
|
+
ReviewSummary review_summary = 87;
|
|
690
|
+
|
|
691
|
+
// The summary of amenities near the EV charging station.
|
|
692
|
+
EvChargeAmenitySummary ev_charge_amenity_summary = 89;
|
|
693
|
+
|
|
694
|
+
// A summary of points of interest near the place.
|
|
695
|
+
NeighborhoodSummary neighborhood_summary = 91;
|
|
615
696
|
}
|
|
616
697
|
|
|
617
698
|
// Price level of the place.
|
|
@@ -41,9 +41,10 @@ option objc_class_prefix = "GMPSV1";
|
|
|
41
41
|
option php_namespace = "Google\\Maps\\Places\\V1";
|
|
42
42
|
|
|
43
43
|
// Service definition for the Places API.
|
|
44
|
-
// Note: every request (except for Autocomplete requests)
|
|
45
|
-
// set outside of the request proto (`all/*`, is not
|
|
46
|
-
// can be set via the HTTP header `X-Goog-FieldMask`.
|
|
44
|
+
// Note: every request (except for Autocomplete and GetPhotoMedia requests)
|
|
45
|
+
// requires a field mask set outside of the request proto (`all/*`, is not
|
|
46
|
+
// assumed). The field mask can be set via the HTTP header `X-Goog-FieldMask`.
|
|
47
|
+
// See:
|
|
47
48
|
// https://developers.google.com/maps/documentation/places/web-service/choose-fields
|
|
48
49
|
service Places {
|
|
49
50
|
option (google.api.default_host) = "places.googleapis.com";
|
|
@@ -19,6 +19,7 @@ package google.maps.places.v1;
|
|
|
19
19
|
import "google/api/resource.proto";
|
|
20
20
|
import "google/maps/places/v1/attribution.proto";
|
|
21
21
|
import "google/protobuf/timestamp.proto";
|
|
22
|
+
import "google/type/date.proto";
|
|
22
23
|
import "google/type/localized_text.proto";
|
|
23
24
|
|
|
24
25
|
option csharp_namespace = "Google.Maps.Places.V1";
|
|
@@ -61,4 +62,10 @@ message Review {
|
|
|
61
62
|
|
|
62
63
|
// Timestamp for the review.
|
|
63
64
|
google.protobuf.Timestamp publish_time = 14;
|
|
65
|
+
|
|
66
|
+
// A link where users can flag a problem with the review.
|
|
67
|
+
string flag_content_uri = 15;
|
|
68
|
+
|
|
69
|
+
// A link to show the review on Google Maps.
|
|
70
|
+
string google_maps_uri = 16;
|
|
64
71
|
}
|