Skip to content

Commit ce331b1

Browse files
authored
feat: Adds reference doc updates for review translation and sorting (#379)
1 parent c8dd6b7 commit ce331b1

15 files changed

Lines changed: 370 additions & 83 deletions

dist/documentation/parameters/maps_http_parameters_placedetails.html

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/documentation/parameters/maps_http_parameters_placedetails.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@
4747

4848
The region code, specified as a [ccTLD ("top-level domain")](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains) two-character value. Most ccTLD codes are identical to ISO 3166-1 codes, with some notable exceptions. For example, the United Kingdom's ccTLD is "uk" (.co.uk) while its ISO 3166-1 code is "gb" (technically for the entity of "The United Kingdom of Great Britain and Northern Ireland").
4949

50+
- <h3 class="parameter-name" id="reviews_no_translations">reviews_no_translations</h3>
51+
52+
Specify `reviews_no_translations=true` to enable translation of reviews; specify `reviews_no_translations=false` to disable translation of reviews. Reviews are returned in their original language.
53+
54+
If omitted, translation of reviews is enabled. If the `language` parameter was specified in the request, use the specified language as the preferred language for translation. If `language` is omitted, the API attempts to use the `Accept-Language` header as the preferred language.
55+
56+
- <h3 class="parameter-name" id="reviews_sort">reviews_sort</h3>
57+
58+
The sorting method to use when returning reviews. Can be set to `most_relevant` (default) or `newest`.
59+
60+
- For `most_relevant` (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.
61+
- For `newest`, reviews are sorted in chronological order; the preferred language does not affect the sort order.
62+
63+
Google recommends that you display how the reviews are being sorted to the end user.
64+
5065
- <h3 class="parameter-name" id="sessiontoken">sessiontoken</h3>
5166

5267
A random string which identifies an autocomplete [session](https://developers.google.com/maps/documentation/places/web-service/details#session_tokens) for billing purposes.

dist/documentation/schemas/maps_http_schema_place.html

Lines changed: 18 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/documentation/schemas/maps_http_schema_place.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Attributes describing a place. Not all attributes will be available for all plac
2828
| <h4 id="Place-price_level" class="add-link schema-object-property-key"><code>price_level</code></h4> | optional | number | <div class="nonref-property-description"><p>The price level of the place, on a scale of 0 to 4. The exact amount indicated by a specific value will vary from region to region. Price levels are interpreted as follows:</p><ul><li>0 Free</li><li>1 Inexpensive</li><li>2 Moderate</li><li>3 Expensive</li><li>4 Very Expensive</li></ul></div> |
2929
| <h4 id="Place-rating" class="add-link schema-object-property-key"><code>rating</code></h4> | optional | number | <div class="nonref-property-description"><p>Contains the place's rating, from 1.0 to 5.0, based on aggregated user reviews.</p></div> |
3030
| <h4 id="Place-reference" class="add-link schema-object-property-key deprecated-item hide-from-toc"><code>reference</code></h4> | optional | string | <aside class="deprecated"><code>reference</code> is deprecated.</aside><div class="nonref-property-description"></div> |
31-
| <h4 id="Place-reviews" class="add-link schema-object-property-key"><code>reviews</code></h4> | optional | Array&lt;[PlaceReview](#PlaceReview "PlaceReview")&gt; | <div class="ref-property-description"><p>A JSON array of up to five reviews. If a language parameter was specified in the request, the service will bias the results to prefer reviews written in that language.</p><p>See <a href="#PlaceReview">PlaceReview</a> for more information.</div> |
31+
| <h4 id="Place-reviews" class="add-link schema-object-property-key"><code>reviews</code></h4> | optional | Array&lt;[PlaceReview](#PlaceReview "PlaceReview")&gt; | <div class="ref-property-description"><p>A JSON array of up to five reviews. By default, the reviews are sorted in order of relevance. Use the <code>reviews_sort</code> request parameter to control sorting.</p><ul><li>For <code>most_relevant</code> (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.</li><li>For <code>newest</code>, reviews are sorted in chronological order; the preferred language does not affect the sort order.</li></ul><p>Google recommends indicating to users whether results are ordered by <code>most_relevant</code> or <code>newest</code>.</p><p>See <a href="#PlaceReview">PlaceReview</a> for more information.</div> |
3232
| <h4 id="Place-scope" class="add-link schema-object-property-key deprecated-item hide-from-toc"><code>scope</code></h4> | optional | string | <aside class="deprecated"><code>scope</code> is deprecated.</aside><div class="nonref-property-description"></div> |
3333
| <h4 id="Place-takeout" class="add-link schema-object-property-key"><code>takeout</code></h4> | optional | boolean | <div class="nonref-property-description"><p>Specifies if the business supports takeout.</p></div> |
3434
| <h4 id="Place-types" class="add-link schema-object-property-key"><code>types</code></h4> | optional | Array&lt;string&gt; | <div class="nonref-property-description"><p>Contains an array of feature types describing the given result. See the list of <a href="https://developers.google.com/maps/documentation/places/web-service/supported_types#table2">supported types</a>.</p></div> |

dist/documentation/schemas/maps_http_schema_placereview.html

Lines changed: 52 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)