Skip to content

Commit

Permalink
chore: add review params
Browse files Browse the repository at this point in the history
  • Loading branch information
wiredmatt committed Jan 31, 2024
1 parent c263f33 commit 24b4fc7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
12 changes: 12 additions & 0 deletions dist/places/details.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ export interface PlaceDetailsRequest extends Partial<AxiosRequestConfig> {
* This applies only to Place Details requests.
*/
fields?: string[];
/**
* The sorting method to use when returning reviews. Can be set to most_relevant (default) or newest.
* For most_relevant (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.
* For newest, reviews are sorted in chronological order; the preferred language does not affect the sort order.
* Google recommends that you display how the reviews are being sorted to the end user.
*/
reviews_sort?: string;
/**
* Specify reviews_no_translations=true to disable translation of reviews; specify reviews_no_translations=false to enable translation of reviews. Reviews are returned in their original language.
* If omitted, or passed with no value, 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.
*/
reviews_no_translations?: boolean;
} & RequestParams;
}
export interface PlaceDetailsResponseData extends ResponseData {
Expand Down
2 changes: 1 addition & 1 deletion dist/places/details.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/places/details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ export interface PlaceDetailsRequest extends Partial<AxiosRequestConfig> {
* This applies only to Place Details requests.
*/
fields?: string[];
/**
* The sorting method to use when returning reviews. Can be set to most_relevant (default) or newest.
* For most_relevant (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.
* For newest, reviews are sorted in chronological order; the preferred language does not affect the sort order.
* Google recommends that you display how the reviews are being sorted to the end user.
*/
reviews_sort?: string;
/**
* Specify reviews_no_translations=true to disable translation of reviews; specify reviews_no_translations=false to enable translation of reviews. Reviews are returned in their original language.
* If omitted, or passed with no value, 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.
*/
reviews_no_translations?: boolean;
} & RequestParams;
}
export interface PlaceDetailsResponseData extends ResponseData {
Expand Down

0 comments on commit 24b4fc7

Please sign in to comment.