@googlemaps/places 1.1.0 → 1.2.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.
@@ -34,10 +34,11 @@ option objc_class_prefix = "GMPSV1";
34
34
  option php_namespace = "Google\\Maps\\Places\\V1";
35
35
 
36
36
  // Service definition for the Places API.
37
- // Note: every request actually requires a field mask set outside of the request
38
- // proto (all/'*' is not assumed). That can be set via either a side channel
39
- // (SystemParameterContext) over RPC, or a header (X-Goog-FieldMask) over HTTP.
40
- // See: https://cloud.google.com/apis/docs/system-parameters
37
+ // Note: every request actually requires a field mask set outside of
38
+ // the request proto (all/'*', is not assumed). That can be set via either a
39
+ // side channel (SystemParameterContext) over RPC, or a header
40
+ // (X-Goog-FieldMask) over HTTP. See:
41
+ // https://cloud.google.com/apis/docs/system-parameters
41
42
  service Places {
42
43
  option (google.api.default_host) = "places.googleapis.com";
43
44
 
@@ -65,7 +66,7 @@ service Places {
65
66
  option (google.api.method_signature) = "name";
66
67
  }
67
68
 
68
- // Get a Place with a place id (in a name) string.
69
+ // Get place details with a place id (in a name) string.
69
70
  rpc GetPlace(GetPlaceRequest) returns (Place) {
70
71
  option (google.api.http) = {
71
72
  get: "/v1/{name=places/*}"
@@ -75,6 +76,8 @@ service Places {
75
76
  }
76
77
 
77
78
  // Request proto for Search Nearby.
79
+ //
80
+ //
78
81
  message SearchNearbyRequest {
79
82
  // The region to search.
80
83
  message LocationRestriction {
@@ -111,14 +114,18 @@ message SearchNearbyRequest {
111
114
  // affect results based on applicable law.
112
115
  //
113
116
  // For more information, see
114
- // http://www.unicode.org/reports/tr35/#unicode_region_subtag.
117
+ // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
115
118
  //
116
119
  //
117
120
  // Note that 3-digit region codes are not currently supported.
118
121
  string region_code = 2;
119
122
 
120
123
  // Included Place type (eg, "restaurant" or "gas_station") from
121
- // https://developers.google.com/places/supported_types.
124
+ // https://developers.google.com/maps/documentation/places/web-service/place-types.
125
+ //
126
+ // Up to 50 types from [Table
127
+ // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
128
+ // may be specified.
122
129
  //
123
130
  // If there are any conflicting types, i.e. a type appears in both
124
131
  // included_types and excluded_types, an INVALID_ARGUMENT error is
@@ -127,12 +134,16 @@ message SearchNearbyRequest {
127
134
  // If a Place type is specified with multiple type restrictions, only places
128
135
  // that satisfy all of the restrictions are returned. For example, if we
129
136
  // have {included_types = ["restaurant"], excluded_primary_types =
130
- // ["restaurant"]}, the returned places are POIs that provide "restaurant"
137
+ // ["restaurant"]}, the returned places provide "restaurant"
131
138
  // related services but do not operate primarily as "restaurants".
132
139
  repeated string included_types = 3;
133
140
 
134
141
  // Excluded Place type (eg, "restaurant" or "gas_station") from
135
- // https://developers.google.com/places/supported_types.
142
+ // https://developers.google.com/maps/documentation/places/web-service/place-types.
143
+ //
144
+ // Up to 50 types from [Table
145
+ // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
146
+ // may be specified.
136
147
  //
137
148
  // If the client provides both included_types (e.g. restaurant) and
138
149
  // excluded_types (e.g. cafe), then the response should include places that
@@ -145,12 +156,18 @@ message SearchNearbyRequest {
145
156
  // If a Place type is specified with multiple type restrictions, only places
146
157
  // that satisfy all of the restrictions are returned. For example, if we
147
158
  // have {included_types = ["restaurant"], excluded_primary_types =
148
- // ["restaurant"]}, the returned places are POIs that provide "restaurant"
159
+ // ["restaurant"]}, the returned places provide "restaurant"
149
160
  // related services but do not operate primarily as "restaurants".
150
161
  repeated string excluded_types = 4;
151
162
 
152
163
  // Included primary Place type (e.g. "restaurant" or "gas_station") from
153
- // https://developers.google.com/places/supported_types.
164
+ // https://developers.google.com/maps/documentation/places/web-service/place-types.
165
+ // A place can only have a single primary type from the supported types table
166
+ // associated with it.
167
+ //
168
+ // Up to 50 types from [Table
169
+ // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
170
+ // may be specified.
154
171
  //
155
172
  // If there are any conflicting primary types, i.e. a type appears in both
156
173
  // included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
@@ -159,12 +176,16 @@ message SearchNearbyRequest {
159
176
  // If a Place type is specified with multiple type restrictions, only places
160
177
  // that satisfy all of the restrictions are returned. For example, if we
161
178
  // have {included_types = ["restaurant"], excluded_primary_types =
162
- // ["restaurant"]}, the returned places are POIs that provide "restaurant"
179
+ // ["restaurant"]}, the returned places provide "restaurant"
163
180
  // related services but do not operate primarily as "restaurants".
164
181
  repeated string included_primary_types = 5;
165
182
 
166
183
  // Excluded primary Place type (e.g. "restaurant" or "gas_station") from
167
- // https://developers.google.com/places/supported_types.
184
+ // https://developers.google.com/maps/documentation/places/web-service/place-types.
185
+ //
186
+ // Up to 50 types from [Table
187
+ // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
188
+ // may be specified.
168
189
  //
169
190
  // If there are any conflicting primary types, i.e. a type appears in both
170
191
  // included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
@@ -173,11 +194,11 @@ message SearchNearbyRequest {
173
194
  // If a Place type is specified with multiple type restrictions, only places
174
195
  // that satisfy all of the restrictions are returned. For example, if we
175
196
  // have {included_types = ["restaurant"], excluded_primary_types =
176
- // ["restaurant"]}, the returned places are POIs that provide "restaurant"
197
+ // ["restaurant"]}, the returned places provide "restaurant"
177
198
  // related services but do not operate primarily as "restaurants".
178
199
  repeated string excluded_primary_types = 6;
179
200
 
180
- // Maximum number of results to return. It must be between 1 and 20,
201
+ // Maximum number of results to return. It must be between 1 and 20 (default),
181
202
  // inclusively. If the number is unset, it falls back to the upper limit. If
182
203
  // the number is set to negative or exceeds the upper limit, an
183
204
  // INVALID_ARGUMENT error is returned.
@@ -195,7 +216,7 @@ message SearchNearbyRequest {
195
216
  //
196
217
  //
197
218
  message SearchNearbyResponse {
198
- // A list of interesting places that meets user's requirements like places
219
+ // A list of places that meets user's requirements like places
199
220
  // types, number of places and specific location restriction.
200
221
  repeated Place places = 1;
201
222
  }
@@ -213,7 +234,7 @@ message SearchTextRequest {
213
234
  DISTANCE = 1;
214
235
 
215
236
  // Ranks results by relevance. Sort order determined by normal ranking
216
- // stack. See SortRefinement::RELEVANCE.
237
+ // stack.
217
238
  RELEVANCE = 2;
218
239
  }
219
240
 
@@ -222,6 +243,11 @@ message SearchTextRequest {
222
243
  message LocationBias {
223
244
  oneof type {
224
245
  // A rectangle box defined by northeast and southwest corner.
246
+ // `rectangle.high()` must be the northeast point of the rectangle
247
+ // viewport. `rectangle.low()` must be the southwest point of the
248
+ // rectangle viewport. `rectangle.low().latitude()` cannot be greater than
249
+ // `rectangle.high().latitude()`. This will result in an empty latitude
250
+ // range. A rectangle viewport cannot be wider than 180 degrees.
225
251
  google.geo.type.Viewport rectangle = 1;
226
252
 
227
253
  // A circle defined by center point and radius.
@@ -234,6 +260,11 @@ message SearchTextRequest {
234
260
  message LocationRestriction {
235
261
  oneof type {
236
262
  // A rectangle box defined by northeast and southwest corner.
263
+ // `rectangle.high()` must be the northeast point of the rectangle
264
+ // viewport. `rectangle.low()` must be the southwest point of the
265
+ // rectangle viewport. `rectangle.low().latitude()` cannot be greater than
266
+ // `rectangle.high().latitude()`. This will result in an empty latitude
267
+ // range. A rectangle viewport cannot be wider than 180 degrees.
237
268
  google.geo.type.Viewport rectangle = 1;
238
269
  }
239
270
  }
@@ -256,7 +287,7 @@ message SearchTextRequest {
256
287
  // affect results based on applicable law.
257
288
  //
258
289
  // For more information, see
259
- // http://www.unicode.org/reports/tr35/#unicode_region_subtag.
290
+ // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
260
291
  //
261
292
  //
262
293
  // Note that 3-digit region codes are not currently supported.
@@ -266,26 +297,25 @@ message SearchTextRequest {
266
297
  RankPreference rank_preference = 4;
267
298
 
268
299
  // The requested place type. Full list of types supported:
269
- // https://developers.google.com/places/supported_types. Only support one
270
- // included type.
300
+ // https://developers.google.com/maps/documentation/places/web-service/place-types.
301
+ // Only support one included type.
271
302
  string included_type = 6;
272
303
 
273
- // Used to restrict the search to places that are open at a specific time.
274
- // open_now marks if a business is currently open.
304
+ // Used to restrict the search to places that are currently open. The default
305
+ // is false.
275
306
  bool open_now = 7;
276
307
 
277
308
  // Filter out results whose average user rating is strictly less than this
278
- // limit. A valid value must be an float between 0 and 5 (inclusively) at a
279
- // 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. This is to keep
280
- // parity with LocalRefinement_UserRating. The input rating will round up to
281
- // the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all
282
- // results with a less than 1.0 rating.
309
+ // limit. A valid value must be a float between 0 and 5 (inclusively) at a
310
+ // 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating
311
+ // will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6
312
+ // will eliminate all results with a less than 1.0 rating.
283
313
  double min_rating = 9;
284
314
 
285
315
  // Maximum number of results to return. It must be between 1 and 20,
286
- // inclusively. If the number is unset, it falls back to the upper limit. If
287
- // the number is set to negative or exceeds the upper limit, an
288
- // INVALID_ARGUMENT error is returned.
316
+ // inclusively. The default is 20. If the number is unset, it falls back to
317
+ // the upper limit. If the number is set to negative or exceeds the upper
318
+ // limit, an INVALID_ARGUMENT error is returned.
289
319
  int32 max_result_count = 10;
290
320
 
291
321
  // Used to restrict the search to places that are marked as certain price
@@ -317,9 +347,13 @@ message SearchTextResponse {
317
347
 
318
348
  // Request for fetching a photo of a place using a photo resource name.
319
349
  message GetPhotoMediaRequest {
320
- // Required. The resource name of a photo. It is returned in Place's
321
- // photos.name field. Format:
322
- // places/<place_id>/photos/<photo_reference>/media.
350
+ // Required. The resource name of a photo media in the format:
351
+ // `places/{place_id}/photos/{photo_reference}/media`.
352
+ //
353
+ // The resource name of a photo as returned in a Place object's `photos.name`
354
+ // field comes with the format
355
+ // `places/{place_id}/photos/{photo_reference}`. You need to append `/media`
356
+ // at the end of the photo resource to get the photo media resource name.
323
357
  string name = 1 [
324
358
  (google.api.field_behavior) = REQUIRED,
325
359
  (google.api.resource_reference) = {
@@ -356,7 +390,7 @@ message GetPhotoMediaRequest {
356
390
  // Optional. If set, skip the default HTTP redirect behavior and render a text
357
391
  // format (for example, in JSON format for HTTP use case) response. If not
358
392
  // set, an HTTP redirect will be issued to redirect the call to the image
359
- // midea. This option is ignored for non-HTTP requests.
393
+ // media. This option is ignored for non-HTTP requests.
360
394
  bool skip_http_redirect = 4 [(google.api.field_behavior) = OPTIONAL];
361
395
  }
362
396
 
@@ -369,8 +403,8 @@ message PhotoMedia {
369
403
  singular: "photoMedia"
370
404
  };
371
405
 
372
- // The resource name of a photo. It is returned in Place's photos.name field.
373
- // Format: places/<place_id>/photos/<photo_reference>/media.
406
+ // The resource name of a photo media in the format:
407
+ // `places/{place_id}/photos/{photo_reference}/media`.
374
408
  string name = 1;
375
409
 
376
410
  // A short-lived uri that can be used to render the photo.
@@ -379,8 +413,9 @@ message PhotoMedia {
379
413
 
380
414
  // Request for fetching a Place with a place id (in a name) string.
381
415
  message GetPlaceRequest {
382
- // Required. A place_id returned in a Place (with "places/" prefix), or
383
- // equivalently the name in the same Place. Format: places/<place_id>.
416
+ // Required. A place ID returned in a Place (with "places/" prefix), or
417
+ // equivalently the name in the same Place. Format:
418
+ // `places/{place_id}`.
384
419
  string name = 1 [
385
420
  (google.api.field_behavior) = REQUIRED,
386
421
  (google.api.resource_reference) = { type: "places.googleapis.com/Place" }
@@ -398,7 +433,7 @@ message GetPlaceRequest {
398
433
  // details, like region-specific place name, if available. The parameter can
399
434
  // affect results based on applicable law.
400
435
  // For more information, see
401
- // http://www.unicode.org/reports/tr35/#unicode_region_subtag.
436
+ // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
402
437
  //
403
438
  //
404
439
  // Note that 3-digit region codes are not currently supported.
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.places.v1;
18
18
 
19
- import "google/api/field_behavior.proto";
20
19
  import "google/api/resource.proto";
21
20
  import "google/maps/places/v1/attribution.proto";
22
21
  import "google/protobuf/timestamp.proto";
@@ -40,33 +39,27 @@ message Review {
40
39
  singular: "review"
41
40
  };
42
41
 
43
- // Output only. A reference representing this place review which may be used
44
- // to look up this place review again (a.k.a. the API "resource" name:
45
- // places/{place_id}/reviews/{review}).
46
- string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
42
+ // A reference representing this place review which may be used to look up
43
+ // this place review again (also called the API "resource" name:
44
+ // `places/{place_id}/reviews/{review}`).
45
+ string name = 1;
47
46
 
48
- // Output only. A string of formatted recent time, expressing the review time
49
- // relative to the current time in a form appropriate for the language and
50
- // country.
51
- string relative_publish_time_description = 2
52
- [(google.api.field_behavior) = OUTPUT_ONLY];
47
+ // A string of formatted recent time, expressing the review time relative
48
+ // to the current time in a form appropriate for the language and country.
49
+ string relative_publish_time_description = 2;
53
50
 
54
- // Output only. The localized text of the review.
55
- google.type.LocalizedText text = 9
56
- [(google.api.field_behavior) = OUTPUT_ONLY];
51
+ // The localized text of the review.
52
+ google.type.LocalizedText text = 9;
57
53
 
58
- // Output only. The review text in its original language.
59
- google.type.LocalizedText original_text = 12
60
- [(google.api.field_behavior) = OUTPUT_ONLY];
54
+ // The review text in its original language.
55
+ google.type.LocalizedText original_text = 12;
61
56
 
62
- // Output only. A number between 1.0 and 5.0, a.k.a. the number of stars.
63
- double rating = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
57
+ // A number between 1.0 and 5.0, also called the number of stars.
58
+ double rating = 7;
64
59
 
65
- // Output only. This review's author.
66
- AuthorAttribution author_attribution = 13
67
- [(google.api.field_behavior) = OUTPUT_ONLY];
60
+ // This review's author.
61
+ AuthorAttribution author_attribution = 13;
68
62
 
69
- // Output only. Timestamp for the review.
70
- google.protobuf.Timestamp publish_time = 14
71
- [(google.api.field_behavior) = OUTPUT_ONLY];
63
+ // Timestamp for the review.
64
+ google.protobuf.Timestamp publish_time = 14;
72
65
  }