@googlemaps/places 0.1.0
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/CHANGELOG.md +8 -0
- package/LICENSE +202 -0
- package/README.md +166 -0
- package/build/protos/google/geo/type/viewport.proto +69 -0
- package/build/protos/google/maps/places/v1/geometry.proto +42 -0
- package/build/protos/google/maps/places/v1/place.proto +424 -0
- package/build/protos/google/maps/places/v1/places_service.proto +199 -0
- package/build/protos/protos.d.ts +8160 -0
- package/build/protos/protos.js +22035 -0
- package/build/protos/protos.json +2222 -0
- package/build/src/index.d.ts +11 -0
- package/build/src/index.js +28 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +23 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1/places_client.d.ts +203 -0
- package/build/src/v1/places_client.js +261 -0
- package/build/src/v1/places_client.js.map +1 -0
- package/build/src/v1/places_client_config.json +30 -0
- package/package.json +73 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
// Copyright 2023 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/field_behavior.proto";
|
|
20
|
+
import "google/geo/type/viewport.proto";
|
|
21
|
+
import "google/protobuf/timestamp.proto";
|
|
22
|
+
import "google/type/date.proto";
|
|
23
|
+
import "google/type/latlng.proto";
|
|
24
|
+
import "google/type/localized_text.proto";
|
|
25
|
+
|
|
26
|
+
option cc_enable_arenas = true;
|
|
27
|
+
option csharp_namespace = "Google.Maps.Places.V1";
|
|
28
|
+
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "PlaceProto";
|
|
31
|
+
option java_package = "com.google.maps.places.v1";
|
|
32
|
+
option objc_class_prefix = "GMPSV1";
|
|
33
|
+
option php_namespace = "Google\\Maps\\Places\\V1";
|
|
34
|
+
|
|
35
|
+
// All the information representing a Place.
|
|
36
|
+
message Place {
|
|
37
|
+
// The structured components that form the formatted address, if this
|
|
38
|
+
// information is available.
|
|
39
|
+
message AddressComponent {
|
|
40
|
+
// The full text description or name of the address component. For example,
|
|
41
|
+
// an address component for the country Australia may have a long_name of
|
|
42
|
+
// "Australia".
|
|
43
|
+
string long_text = 1;
|
|
44
|
+
|
|
45
|
+
// An abbreviated textual name for the address component, if available. For
|
|
46
|
+
// example, an address component for the country of Australia may have a
|
|
47
|
+
// short_name of "AU".
|
|
48
|
+
string short_text = 2;
|
|
49
|
+
|
|
50
|
+
// An array indicating the type(s) of the address component.
|
|
51
|
+
repeated string types = 3;
|
|
52
|
+
|
|
53
|
+
// The language used to format this components, in CLDR notation.
|
|
54
|
+
string language_code = 4;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Plus code (http://plus.codes) is a location reference with two formats:
|
|
58
|
+
// global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle,
|
|
59
|
+
// and compound code, replacing the prefix with a reference location.
|
|
60
|
+
message PlusCode {
|
|
61
|
+
// Place's global (full) code, such as `9FWM33GV+HQ`, representing an
|
|
62
|
+
// 1/8000 by 1/8000 degree area (~14 by 14 meters).
|
|
63
|
+
string global_code = 1;
|
|
64
|
+
|
|
65
|
+
// Place's compound code, such as `33GV+HQ, Ramberg, Norway`, containing
|
|
66
|
+
// the suffix of the global code and replacing the prefix with a formatted
|
|
67
|
+
// name of a reference entity.
|
|
68
|
+
string compound_code = 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Information about a review of the place.
|
|
72
|
+
message Review {
|
|
73
|
+
// Timestamp for the review, expressed in seconds since epoch.
|
|
74
|
+
google.protobuf.Timestamp publish_time = 1;
|
|
75
|
+
|
|
76
|
+
// A string of formatted recent time, expressing the review time relative
|
|
77
|
+
// to the current time in a form appropriate for the language and country.
|
|
78
|
+
string relative_publish_time_description = 2;
|
|
79
|
+
|
|
80
|
+
// The localized text of the review.
|
|
81
|
+
google.type.LocalizedText text = 9;
|
|
82
|
+
|
|
83
|
+
// The name of the review author.
|
|
84
|
+
string author = 4;
|
|
85
|
+
|
|
86
|
+
// A link to the review author's profile.
|
|
87
|
+
string author_uri = 5;
|
|
88
|
+
|
|
89
|
+
// The author's profile photo.
|
|
90
|
+
string author_photo_uri = 6;
|
|
91
|
+
|
|
92
|
+
// A whole number between 1.0 and 5.0, a.k.a. the number of stars.
|
|
93
|
+
double rating = 7;
|
|
94
|
+
|
|
95
|
+
// A BCP-47 language code indicating the original language of the review.
|
|
96
|
+
// If the review has been translated, then original_language != language.
|
|
97
|
+
// This field contains the main language tag only, and not the secondary tag
|
|
98
|
+
// indicating country or region. For example, all the English reviews are
|
|
99
|
+
// tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
|
|
100
|
+
// if there is only a rating with no review text.
|
|
101
|
+
string original_language_code = 10;
|
|
102
|
+
|
|
103
|
+
// A boolean value indicating if the review was translated from the original
|
|
104
|
+
// language it was written in. If a review has been translated,
|
|
105
|
+
// corresponding to a value of true, Google recommends that you indicate
|
|
106
|
+
// this to your users. For example, you can add the following string,
|
|
107
|
+
// “Translated by Google”, to the review.
|
|
108
|
+
bool translated = 11;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Information about business hour of the place.
|
|
112
|
+
message OpeningHours {
|
|
113
|
+
// A period the place remains in open_now status.
|
|
114
|
+
message OpeningHoursPeriod {
|
|
115
|
+
// Status changing points.
|
|
116
|
+
message OpeningHoursPoint {
|
|
117
|
+
// A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is
|
|
118
|
+
// Monday, etc.
|
|
119
|
+
optional int32 day = 1;
|
|
120
|
+
|
|
121
|
+
// The hour in 2 digits. Ranges from 00 to 23.
|
|
122
|
+
optional int32 hour = 2;
|
|
123
|
+
|
|
124
|
+
// The minute in 2 digits. Ranges from 00 to 59.
|
|
125
|
+
optional int32 minute = 3;
|
|
126
|
+
|
|
127
|
+
// Date of the endpoint expressed in `RFC3339` format in the local
|
|
128
|
+
// timezone for the place. For example 2010-12-31.
|
|
129
|
+
string date_deprecated = 4 [deprecated = true];
|
|
130
|
+
|
|
131
|
+
// Date in the local timezone for the place.
|
|
132
|
+
google.type.Date date = 6;
|
|
133
|
+
|
|
134
|
+
// Whether or not this endpoint was truncated. Truncation occurs when
|
|
135
|
+
// the real hours are outside the times we are willing to return hours
|
|
136
|
+
// between, so we truncate the hours back to these boundaries. This
|
|
137
|
+
// ensures that at most `24 * 7` hours from midnight of the day of the
|
|
138
|
+
// request are returned.
|
|
139
|
+
bool truncated = 5;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// The time that the place starts to be open.
|
|
143
|
+
OpeningHoursPoint open = 1;
|
|
144
|
+
|
|
145
|
+
// The time that the place starts to be closed.
|
|
146
|
+
OpeningHoursPoint close = 2;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// A type used to identify the type of secondary hours.
|
|
150
|
+
enum SecondaryHourType {
|
|
151
|
+
// Default value when secondary hour type is not specified.
|
|
152
|
+
SECONDARY_HOUR_TYPE_UNSPECIFIED = 0;
|
|
153
|
+
|
|
154
|
+
// The drive-through hour for banks, restaurants, or pharmacies.
|
|
155
|
+
DRIVE_THROUGH = 1;
|
|
156
|
+
|
|
157
|
+
// The happy hour.
|
|
158
|
+
HAPPY_HOUR = 2;
|
|
159
|
+
|
|
160
|
+
// The delivery hour.
|
|
161
|
+
DELIVERY = 3;
|
|
162
|
+
|
|
163
|
+
// The takeout hour.
|
|
164
|
+
TAKEOUT = 4;
|
|
165
|
+
|
|
166
|
+
// The kitchen hour.
|
|
167
|
+
KITCHEN = 5;
|
|
168
|
+
|
|
169
|
+
// The breakfast hour.
|
|
170
|
+
BREAKFAST = 6;
|
|
171
|
+
|
|
172
|
+
// The lunch hour.
|
|
173
|
+
LUNCH = 7;
|
|
174
|
+
|
|
175
|
+
// The dinner hour.
|
|
176
|
+
DINNER = 8;
|
|
177
|
+
|
|
178
|
+
// The brunch hour.
|
|
179
|
+
BRUNCH = 9;
|
|
180
|
+
|
|
181
|
+
// The pickup hour.
|
|
182
|
+
PICKUP = 10;
|
|
183
|
+
|
|
184
|
+
// The access hours for storage places.
|
|
185
|
+
ACCESS = 11;
|
|
186
|
+
|
|
187
|
+
// The special hours for seniors.
|
|
188
|
+
SENIOR_HOURS = 12;
|
|
189
|
+
|
|
190
|
+
// The online service hours.
|
|
191
|
+
ONLINE_SERVICE_HOURS = 13;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Structured information for special days that fall within the period that
|
|
195
|
+
// the returned opening hours cover. Special days are days that could impact
|
|
196
|
+
// the business hours of a place, e.g. Christmas day.
|
|
197
|
+
message SpecialDay {
|
|
198
|
+
// The date of this special day.
|
|
199
|
+
google.type.Date date = 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Is this place open right now? Always present unless we lack time-of-day
|
|
203
|
+
// or timezone data for these opening hours.
|
|
204
|
+
bool open_now = 1;
|
|
205
|
+
|
|
206
|
+
// The periods that this place is open during the week. The periods are in
|
|
207
|
+
// chronological order, starting with Sunday in the place-local timezone. An
|
|
208
|
+
// empty (but not absent) value indicates a place that is never open, e.g.
|
|
209
|
+
// because it is closed temporarily for renovations.
|
|
210
|
+
repeated OpeningHoursPeriod periods = 2;
|
|
211
|
+
|
|
212
|
+
// Localized strings describing the opening hours of this place, one string
|
|
213
|
+
// for each day of the week. Will be empty if the hours are unknown or
|
|
214
|
+
// could not be converted to localized text. Example: "Sun: 18:00–06:00"
|
|
215
|
+
repeated string weekday_descriptions = 3;
|
|
216
|
+
|
|
217
|
+
// A type string used to identify the type of secondary hours.
|
|
218
|
+
SecondaryHourType secondary_hour_type = 4;
|
|
219
|
+
|
|
220
|
+
// Structured information for special days that fall within the period that
|
|
221
|
+
// the returned opening hours cover. Special days are days that could impact
|
|
222
|
+
// the business hours of a place, e.g. Christmas day. Set for
|
|
223
|
+
// current_opening_hours and current_secondary_opening_hours if there are
|
|
224
|
+
// exceptional hours.
|
|
225
|
+
repeated SpecialDay special_days = 5;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Business status for the place.
|
|
229
|
+
enum BusinessStatus {
|
|
230
|
+
// Default value. This value is unused.
|
|
231
|
+
BUSINESS_STATUS_UNSPECIFIED = 0;
|
|
232
|
+
|
|
233
|
+
// The establishment is operational, not necessarily open now.
|
|
234
|
+
OPERATIONAL = 1;
|
|
235
|
+
|
|
236
|
+
// The establishment is temporarily closed.
|
|
237
|
+
CLOSED_TEMPORARILY = 2;
|
|
238
|
+
|
|
239
|
+
// The establishment is permanently closed.
|
|
240
|
+
CLOSED_PERMANENTLY = 3;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Information about data providers of this place.
|
|
244
|
+
message Attribution {
|
|
245
|
+
// Name of the Place's data provider.
|
|
246
|
+
string provider = 1;
|
|
247
|
+
|
|
248
|
+
// URI to the Place's data provider.
|
|
249
|
+
string provider_uri = 2;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Contains a summary of the place.
|
|
253
|
+
message EditorialSummary {
|
|
254
|
+
// A summary is comprised of a textual overview, and also includes the
|
|
255
|
+
// language code for these if applicable. Summary text must be presented
|
|
256
|
+
// as-is and can not be modified or altered.
|
|
257
|
+
google.type.LocalizedText overview = 1;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Required. The unique identifier of a place.
|
|
261
|
+
string id = 2 [(google.api.field_behavior) = REQUIRED];
|
|
262
|
+
|
|
263
|
+
// The localized name of the place, suitable as a short human-readable
|
|
264
|
+
// description. For example, "Google Sydney", "Starbucks", "Pyrmont", etc.
|
|
265
|
+
google.type.LocalizedText display_name = 31;
|
|
266
|
+
|
|
267
|
+
// A set of type tags for this result. For example, "political" and
|
|
268
|
+
// "locality".
|
|
269
|
+
repeated string types = 5;
|
|
270
|
+
|
|
271
|
+
// A human-readable phone number for the place, in national format.
|
|
272
|
+
string national_phone_number = 7;
|
|
273
|
+
|
|
274
|
+
// A human-readable phone number for the place, in international format.
|
|
275
|
+
string international_phone_number = 8;
|
|
276
|
+
|
|
277
|
+
// A full, human-readable address for this place.
|
|
278
|
+
string formatted_address = 9;
|
|
279
|
+
|
|
280
|
+
// Repeated components for each locality level.
|
|
281
|
+
repeated AddressComponent address_components = 10;
|
|
282
|
+
|
|
283
|
+
// Plus code of the place location lat/long.
|
|
284
|
+
PlusCode plus_code = 11;
|
|
285
|
+
|
|
286
|
+
// The position of this place.
|
|
287
|
+
google.type.LatLng location = 12;
|
|
288
|
+
|
|
289
|
+
// A viewport suitable for displaying the place on an average-sized map.
|
|
290
|
+
google.geo.type.Viewport viewport = 13;
|
|
291
|
+
|
|
292
|
+
// A rating between 1.0 and 5.0, based on user reviews of this place.
|
|
293
|
+
double rating = 14;
|
|
294
|
+
|
|
295
|
+
// A URL providing more information about this place.
|
|
296
|
+
string google_maps_uri = 15;
|
|
297
|
+
|
|
298
|
+
// The authoritative website for this place, e.g. a business' homepage.
|
|
299
|
+
// Note that for places that are part of a chain (e.g. an IKEA store), this
|
|
300
|
+
// will usually be the website for the individual store, not the overall
|
|
301
|
+
// chain.
|
|
302
|
+
string website_uri = 16;
|
|
303
|
+
|
|
304
|
+
// List of reviews about this place.
|
|
305
|
+
repeated Review reviews = 20;
|
|
306
|
+
|
|
307
|
+
// The regular hours of operation.
|
|
308
|
+
OpeningHours opening_hours = 21;
|
|
309
|
+
|
|
310
|
+
// Number of minutes this place's timezone is currently offset from UTC.
|
|
311
|
+
// This is expressed in minutes to support timezones that are offset by
|
|
312
|
+
// fractions of an hour, e.g. X hours and 15 minutes.
|
|
313
|
+
int32 utc_offset_minutes = 22;
|
|
314
|
+
|
|
315
|
+
// The place's address in adr microformat: http://microformats.org/wiki/adr.
|
|
316
|
+
string adr_format_address = 24;
|
|
317
|
+
|
|
318
|
+
// The business status for the place.
|
|
319
|
+
BusinessStatus business_status = 25;
|
|
320
|
+
|
|
321
|
+
// Price level of the place.
|
|
322
|
+
PriceLevel price_level = 26;
|
|
323
|
+
|
|
324
|
+
// A set of data provider that must be shown with this result.
|
|
325
|
+
repeated Attribution attributions = 27;
|
|
326
|
+
|
|
327
|
+
// The total number of reviews (with or without text) for this place.
|
|
328
|
+
int32 user_rating_count = 28;
|
|
329
|
+
|
|
330
|
+
// A truncated URL to an v2 icon mask. User can access different icon type by
|
|
331
|
+
// appending type suffix to the end (eg, ".svg" or ".png").
|
|
332
|
+
string icon_mask_base_uri = 29;
|
|
333
|
+
|
|
334
|
+
// Background color for icon_mask in hex format, e.g. #909CE1.
|
|
335
|
+
string icon_background_color = 30;
|
|
336
|
+
|
|
337
|
+
// Specifies if the business supports takeout.
|
|
338
|
+
optional bool takeout = 33;
|
|
339
|
+
|
|
340
|
+
// Specifies if the business supports delivery.
|
|
341
|
+
optional bool delivery = 34;
|
|
342
|
+
|
|
343
|
+
// Specifies if the business supports indoor or outdoor seating options.
|
|
344
|
+
optional bool dine_in = 35;
|
|
345
|
+
|
|
346
|
+
// Specifies if the business supports curbside pickup.
|
|
347
|
+
optional bool curbside_pickup = 36;
|
|
348
|
+
|
|
349
|
+
// Specifies if the place has an entrance that is wheelchair-accessible.
|
|
350
|
+
optional bool wheelchair_accessible_entrance = 37;
|
|
351
|
+
|
|
352
|
+
// Specifies if the place supports reservations.
|
|
353
|
+
optional bool reservable = 38;
|
|
354
|
+
|
|
355
|
+
// Specifies if the place serves breakfast.
|
|
356
|
+
optional bool serves_breakfast = 39;
|
|
357
|
+
|
|
358
|
+
// Specifies if the place serves lunch.
|
|
359
|
+
optional bool serves_lunch = 40;
|
|
360
|
+
|
|
361
|
+
// Specifies if the place serves dinner.
|
|
362
|
+
optional bool serves_dinner = 41;
|
|
363
|
+
|
|
364
|
+
// Specifies if the place serves beer.
|
|
365
|
+
optional bool serves_beer = 42;
|
|
366
|
+
|
|
367
|
+
// Specifies if the place serves wine.
|
|
368
|
+
optional bool serves_wine = 43;
|
|
369
|
+
|
|
370
|
+
// Specifies if the place serves brunch.
|
|
371
|
+
optional bool serves_brunch = 44;
|
|
372
|
+
|
|
373
|
+
// Specifies if the place serves vegetarian food.
|
|
374
|
+
optional bool serves_vegetarian_food = 45;
|
|
375
|
+
|
|
376
|
+
// The hours of operation for the next seven days (including today). The time
|
|
377
|
+
// period starts at midnight on the date of the request and ends at 11:59 pm
|
|
378
|
+
// six days later. This field includes the special_days subfield of all hours,
|
|
379
|
+
// set for dates that have exceptional hours.
|
|
380
|
+
OpeningHours current_opening_hours = 46;
|
|
381
|
+
|
|
382
|
+
// Contains an array of entries for the next seven days including information
|
|
383
|
+
// about secondary hours of a business. Secondary hours are different from a
|
|
384
|
+
// business's main hours. For example, a restaurant can specify drive through
|
|
385
|
+
// hours or delivery hours as its secondary hours. This field populates the
|
|
386
|
+
// type subfield, which draws from a predefined list of opening hours types
|
|
387
|
+
// (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the
|
|
388
|
+
// place. This field includes the special_days subfield of all hours, set for
|
|
389
|
+
// dates that have exceptional hours.
|
|
390
|
+
repeated OpeningHours current_secondary_opening_hours = 47;
|
|
391
|
+
|
|
392
|
+
// Contains an array of entries for information about regular secondary hours
|
|
393
|
+
// of a business. Secondary hours are different from a business's main hours.
|
|
394
|
+
// For example, a restaurant can specify drive through hours or delivery hours
|
|
395
|
+
// as its secondary hours. This field populates the type subfield, which draws
|
|
396
|
+
// from a predefined list of opening hours types (such as DRIVE_THROUGH,
|
|
397
|
+
// PICKUP, or TAKEOUT) based on the types of the place.
|
|
398
|
+
repeated OpeningHours secondary_opening_hours = 49;
|
|
399
|
+
|
|
400
|
+
// Contains a summary of the place. A summary is comprised of a textual
|
|
401
|
+
// overview, and also includes the language code for these if applicable.
|
|
402
|
+
// Summary text must be presented as-is and can not be modified or altered.
|
|
403
|
+
EditorialSummary editorial_summary = 48;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Price level of the place.
|
|
407
|
+
enum PriceLevel {
|
|
408
|
+
// Place price level is unspecified or unknown.
|
|
409
|
+
PRICE_LEVEL_UNSPECIFIED = 0;
|
|
410
|
+
|
|
411
|
+
FREE = 1;
|
|
412
|
+
|
|
413
|
+
// Place provides inexpensive services.
|
|
414
|
+
INEXPENSIVE = 2;
|
|
415
|
+
|
|
416
|
+
// Place provides moderately priced services.
|
|
417
|
+
MODERATE = 3;
|
|
418
|
+
|
|
419
|
+
// Place provides expensive services.
|
|
420
|
+
EXPENSIVE = 4;
|
|
421
|
+
|
|
422
|
+
// Place provides very expensive services.
|
|
423
|
+
VERY_EXPENSIVE = 5;
|
|
424
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// Copyright 2023 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/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/geo/type/viewport.proto";
|
|
23
|
+
import "google/maps/places/v1/geometry.proto";
|
|
24
|
+
import "google/maps/places/v1/place.proto";
|
|
25
|
+
|
|
26
|
+
option cc_enable_arenas = true;
|
|
27
|
+
option csharp_namespace = "Google.Maps.Places.V1";
|
|
28
|
+
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "PlacesServiceProto";
|
|
31
|
+
option java_package = "com.google.maps.places.v1";
|
|
32
|
+
option objc_class_prefix = "GMPSV1";
|
|
33
|
+
option php_namespace = "Google\\Maps\\Places\\V1";
|
|
34
|
+
|
|
35
|
+
// Service definition for the Places API.
|
|
36
|
+
service Places {
|
|
37
|
+
option (google.api.default_host) = "places.googleapis.com";
|
|
38
|
+
|
|
39
|
+
// Text query based place search.
|
|
40
|
+
rpc SearchText(SearchTextRequest) returns (SearchTextResponse) {
|
|
41
|
+
option (google.api.http) = {
|
|
42
|
+
post: "/v1/Text:search"
|
|
43
|
+
body: "*"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// int 32 range. Both min and max are optional. If only min is set, then the
|
|
49
|
+
// range only has a lower bound. If only max is set, then range only has an
|
|
50
|
+
// upper bound. At least one of min and max must be set. Values are inclusive.
|
|
51
|
+
message Int32Range {
|
|
52
|
+
// Lower bound. If unset, behavior is documented on the range field.
|
|
53
|
+
optional int32 min = 1;
|
|
54
|
+
|
|
55
|
+
// Upper bound. If unset, behavior is documented on the range field.
|
|
56
|
+
optional int32 max = 2;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Request data structure for SearchText.
|
|
60
|
+
message SearchTextRequest {
|
|
61
|
+
// How results will be ranked in the response.
|
|
62
|
+
enum RankPreference {
|
|
63
|
+
// RankPreference value not set. Will default to DISTANCE.
|
|
64
|
+
RANK_PREFERENCE_UNSPECIFIED = 0;
|
|
65
|
+
|
|
66
|
+
// Ranks results by distance.
|
|
67
|
+
DISTANCE = 1;
|
|
68
|
+
|
|
69
|
+
// Ranks results by relevance. Sort order determined by normal ranking
|
|
70
|
+
// stack. See SortRefinement::RELEVANCE.
|
|
71
|
+
RELEVANCE = 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// The region to search.
|
|
75
|
+
//
|
|
76
|
+
// Deprecated. Use LocationRestriction or LocationBias instead.
|
|
77
|
+
message Location {
|
|
78
|
+
oneof type {
|
|
79
|
+
// A rectangle box defined by northeast and southwest corner.
|
|
80
|
+
google.geo.type.Viewport rectangle = 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Make location field a strict restriction and filter out POIs outside of
|
|
84
|
+
// the given location. If location type field is unset this field will have
|
|
85
|
+
// no effect.
|
|
86
|
+
bool strict_restriction = 2;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// The region to search. This location serves as a bias which means results
|
|
90
|
+
// around given location might be returned.
|
|
91
|
+
message LocationBias {
|
|
92
|
+
oneof type {
|
|
93
|
+
// A rectangle box defined by northeast and southwest corner.
|
|
94
|
+
google.geo.type.Viewport rectangle = 1;
|
|
95
|
+
|
|
96
|
+
// A circle defined by center point and radius.
|
|
97
|
+
Circle circle = 2;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// The region to search. This location serves as a restriction which means
|
|
102
|
+
// results outside given location will not be returned.
|
|
103
|
+
message LocationRestriction {
|
|
104
|
+
oneof type {
|
|
105
|
+
// A rectangle box defined by northeast and southwest corner.
|
|
106
|
+
google.geo.type.Viewport rectangle = 1;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Required. The text query for textual search.
|
|
111
|
+
string text_query = 1 [(google.api.field_behavior) = REQUIRED];
|
|
112
|
+
|
|
113
|
+
// Place details will be displayed with the preferred language if available.
|
|
114
|
+
// If the language code is unspecified or unrecognized, place details of any
|
|
115
|
+
// language may be returned, with a preference for English if such details
|
|
116
|
+
// exist.
|
|
117
|
+
//
|
|
118
|
+
// Current list of supported languages:
|
|
119
|
+
// https://developers.google.com/maps/faq#languagesupport.
|
|
120
|
+
string language_code = 2;
|
|
121
|
+
|
|
122
|
+
// The Unicode country/region code (CLDR) of the location where the
|
|
123
|
+
// request is coming from. It is used to display the place details, like
|
|
124
|
+
// region-specific place name, if available.
|
|
125
|
+
//
|
|
126
|
+
// For more information, see
|
|
127
|
+
// http://www.unicode.org/reports/tr35/#unicode_region_subtag.
|
|
128
|
+
//
|
|
129
|
+
//
|
|
130
|
+
// Note that 3-digit region codes are not currently supported.
|
|
131
|
+
string region_code = 3;
|
|
132
|
+
|
|
133
|
+
// How results will be ranked in the response.
|
|
134
|
+
RankPreference rank_preference = 4;
|
|
135
|
+
|
|
136
|
+
// The region to search. Setting location would usually yields
|
|
137
|
+
// better results. Recommended to set. This location serves as a bias unless
|
|
138
|
+
// strict_restriction is set to true, which turns the location to a strict
|
|
139
|
+
// restriction.
|
|
140
|
+
//
|
|
141
|
+
// Deprecated. Use LocationRestriction or LocationBias instead.
|
|
142
|
+
Location location = 5 [deprecated = true];
|
|
143
|
+
|
|
144
|
+
// The requested place type. Full list of types supported:
|
|
145
|
+
// https://developers.google.com/places/supported_types. Only support one
|
|
146
|
+
// included type.
|
|
147
|
+
string included_type = 6;
|
|
148
|
+
|
|
149
|
+
// Used to restrict the search to places that are open at a specific time.
|
|
150
|
+
// open_now marks if a business is currently open.
|
|
151
|
+
bool open_now = 7;
|
|
152
|
+
|
|
153
|
+
// [Deprecated!]Used to restrict the search to places that are within a
|
|
154
|
+
// certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
|
|
155
|
+
// set a maximum of 4 has no effect on the search results. Min price is
|
|
156
|
+
// default to 0 and max price is default to 4. Default value will be used if
|
|
157
|
+
// either min or max is unset.
|
|
158
|
+
Int32Range price_range = 8 [deprecated = true];
|
|
159
|
+
|
|
160
|
+
// Filter out results whose average user rating is strictly less than this
|
|
161
|
+
// limit. A valid value must be an float between 0 and 5 (inclusively) at a
|
|
162
|
+
// 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep
|
|
163
|
+
// parity with LocalRefinement_UserRating. The input rating will round up to
|
|
164
|
+
// the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all
|
|
165
|
+
// results with a less than 1.0 rating.
|
|
166
|
+
double min_rating = 9;
|
|
167
|
+
|
|
168
|
+
// Maximum number of results to return. It must be between 1 and 20,
|
|
169
|
+
// inclusively. If the number is unset, it falls back to the upper limit. If
|
|
170
|
+
// the number is set to negative or exceeds the upper limit, an
|
|
171
|
+
// INVALID_ARGUMENT error is returned.
|
|
172
|
+
int32 max_result_count = 10;
|
|
173
|
+
|
|
174
|
+
// Used to restrict the search to places that are marked as certain price
|
|
175
|
+
// levels. Users can choose any combinations of price levels. Default to
|
|
176
|
+
// select all price levels.
|
|
177
|
+
repeated PriceLevel price_levels = 11;
|
|
178
|
+
|
|
179
|
+
// Used to set strict type filtering for included_type. If set to true, only
|
|
180
|
+
// results of the same type will be returned. Default to false.
|
|
181
|
+
bool strict_type_filtering = 12;
|
|
182
|
+
|
|
183
|
+
// The region to search. This location serves as a bias which means results
|
|
184
|
+
// around given location might be returned. Cannot be set along with
|
|
185
|
+
// location_restriction.
|
|
186
|
+
LocationBias location_bias = 13;
|
|
187
|
+
|
|
188
|
+
// The region to search. This location serves as a restriction which means
|
|
189
|
+
// results outside given location will not be returned. Cannot be set along
|
|
190
|
+
// with location_bias.
|
|
191
|
+
LocationRestriction location_restriction = 14;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Response proto for SearchText.
|
|
195
|
+
//
|
|
196
|
+
message SearchTextResponse {
|
|
197
|
+
// A list of places that meet the user's text search criteria.
|
|
198
|
+
repeated Place places = 1;
|
|
199
|
+
}
|