Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reviews_sort & reviews_no_translations to place details #1149

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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