diff --git a/src/main/java/com/google/maps/PlaceDetailsRequest.java b/src/main/java/com/google/maps/PlaceDetailsRequest.java index c5aa1a8ca..7b30d94b5 100644 --- a/src/main/java/com/google/maps/PlaceDetailsRequest.java +++ b/src/main/java/com/google/maps/PlaceDetailsRequest.java @@ -71,6 +71,29 @@ public PlaceDetailsRequest region(String region) { return param("region", region); } + /** + * Specify reviews_no_translations=true to disable translation of reviews. Specify + * reviews_no_translations=false (default) to enable translation of reviews. + * + * @param reviews_no_translations Whether to disable translation of reviews. + * @return Returns this {@code PlaceDetailsRequest} for call chaining. + */ + public PlaceDetailsRequest reviewsNoTranslations(boolean reviewsNoTranslations) { + return param("reviews_no_translations", String.valueOf(reviewsNoTranslations)); + } + + /** + * Specifies the sorting method to use when returning reviews. Can be set to most_relevant + * (default) or newest. Google recommends that you display how the reviews are being sorted to the + * end user. + * + * @param reviews_sort The sorting method to use when returning reviews. + * @return Returns this {@code PlaceDetailsRequest} for call chaining. + */ + public PlaceDetailsRequest reviewsSort(String reviewsSort) { + return param("reviews_sort", reviewsSort); + } + /** * Specifies the field masks of the details to be returned by PlaceDetails. * @@ -122,6 +145,10 @@ public enum FieldMask implements UrlValue { @Deprecated ALT_ID("alt_id"), BUSINESS_STATUS("business_status"), + CURBSIDE_PICKUP("curbside_pickup"), + DELIVERY("delivery"), + DINE_IN("dine_in"), + EDITORIAL_SUMMARY("editorial_summary"), FORMATTED_ADDRESS("formatted_address"), FORMATTED_PHONE_NUMBER("formatted_phone_number"), GEOMETRY("geometry"), @@ -141,6 +168,8 @@ public enum FieldMask implements UrlValue { INTERNATIONAL_PHONE_NUMBER("international_phone_number"), NAME("name"), OPENING_HOURS("opening_hours"), + CURRENT_OPENING_HOURS("current_opening_hours"), + SECONDARY_OPENING_HOURS("secondary_opening_hours"), @Deprecated PERMANENTLY_CLOSED("permanently_closed"), USER_RATINGS_TOTAL("user_ratings_total"), @@ -151,14 +180,26 @@ public enum FieldMask implements UrlValue { RATING("rating"), @Deprecated REFERENCE("reference"), + RESERVABLE("reservable"), + @Deprecated REVIEW("review"), + REVIEWS("reviews"), @Deprecated SCOPE("scope"), + SERVES_BEER("serves_beer"), + SERVES_BREAKFAST("serves_breakfast"), + SERVES_BRUNCH("serves_brunch"), + SERVES_DINNER("serves_dinner"), + SERVES_LUNCH("serves_lunch"), + SERVES_VEGETARIAN_FOOD("serves_vegetarian_food"), + SERVES_WINE("serves_wine"), + TAKEOUT("takeout"), TYPES("types"), URL("url"), UTC_OFFSET("utc_offset"), VICINITY("vicinity"), - WEBSITE("website"); + WEBSITE("website"), + WHEELCHAIR_ACCESSIBLE_ENTRANCE("wheelchair_accessible_entrance"); private final String field; diff --git a/src/main/java/com/google/maps/model/OpeningHours.java b/src/main/java/com/google/maps/model/OpeningHours.java index c8ae0df3c..61d607029 100644 --- a/src/main/java/com/google/maps/model/OpeningHours.java +++ b/src/main/java/com/google/maps/model/OpeningHours.java @@ -20,8 +20,8 @@ import java.util.Arrays; /** - * Opening hours for a Place Details result. Please see Place Details + * Opening hours for a Place Details result. Please see Place Details * Results for more details. */ public class OpeningHours implements Serializable { @@ -96,29 +96,68 @@ public String toString() { /** Opening periods covering seven days, starting from Sunday, in chronological order. */ public Period[] periods; + /** An indicator of special hours for a Place for a single day. */ + public static class SpecialDay implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * A date expressed in RFC3339 format in the local timezone for the place, for example + * 2010-12-31. + */ + public String date; + + /** + * True if there are exceptional hours for this day. If true, this means that there is at least + * one exception for this day. Exceptions cause different values to occur in the subfields of + * currentOpeningHours and secondaryOpeningHours such as periods, DayOfWeek, openNow. The + * exceptions apply to the hours, and the hours are used to generate the other fields. + */ + public Boolean exceptionalHours; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("[Special Day: "); + if (date != null) { + sb.append(" (\"").append(date).append("\")"); + } + if (exceptionalHours != null) { + sb.append(" (\"").append(exceptionalHours).append("\")"); + } + sb.append("]"); + return sb.toString(); + } + } + + /** An array of up to seven entries corresponding to the next seven days. */ + public SpecialDay[] specialDays; + /** - * The formatted opening hours for each day of the week, as an array of seven strings; for - * example, {@code "Monday: 8:30 am – 5:30 pm"}. + * A type string used to identify the type of secondary hours (for example, DRIVE_THROUGH, + * HAPPY_HOUR, DELIVERY, TAKEOUT, KITCHEN, BREAKFAST, LUNCH, DINNER, BRUNCH, PICKUP, + * SENIOR_HOURS). Set for secondary_opening_hours only. */ - public String[] weekdayText; + public String type; /** - * Indicates that the place has permanently shut down. - * - *

Note: this field will be null if it isn't present in the response. + * The formatted opening hours for each day of the week, as an array of seven strings; for + * example, {@code "Monday: 8:30 am – 5:30 pm"}. */ - public Boolean permanentlyClosed; + public String[] weekdayText; @Override public String toString() { StringBuilder sb = new StringBuilder("[OpeningHours:"); - if (permanentlyClosed != null && permanentlyClosed) { - sb.append(" permanentlyClosed"); - } if (openNow != null && openNow) { sb.append(" openNow"); } sb.append(" ").append(Arrays.toString(periods)); + if (specialDays != null) { + sb.append(" (\"").append(specialDays).append("\")"); + } + if (type != null) { + sb.append(" (\"").append(type).append("\")"); + } return sb.toString(); } } diff --git a/src/main/java/com/google/maps/model/PlaceDetails.java b/src/main/java/com/google/maps/model/PlaceDetails.java index 6ea1da91e..a9f52b0cb 100644 --- a/src/main/java/com/google/maps/model/PlaceDetails.java +++ b/src/main/java/com/google/maps/model/PlaceDetails.java @@ -25,7 +25,7 @@ * information about the indicated place such as its complete address, phone number, user rating, * and reviews. * - *

See + *

See * Place Details Results for more detail. */ public class PlaceDetails implements Serializable { @@ -38,6 +38,32 @@ public class PlaceDetails implements Serializable { /** A representation of the place's address in the adr microformat. */ public String adrAddress; + /** The status of the business (i.e. operational, temporarily closed, etc.). */ + public String businessStatus; + + /** Specifies if the business supports curbside pickup. */ + public Boolean curbsidePickup; + + /** + * The hours of operation for the next seven days (including today). The time period starts at + * midnight on the date of the request and ends at 11:59 pm six days later. This field includes + * the special_days subfield of all hours, set for dates that have exceptional hours. + */ + public OpeningHours currentOpeningHours; + + /** Specifies if the business supports delivery. */ + public Boolean delivery; + + /** Specifies if the business supports indoor or outdoor seating options. */ + public Boolean dineIn; + + /** + * Contains a summary of the place. A summary is comprised of a textual overview, and also + * includes the language code for these if applicable. Summary text must be presented as-is and + * can not be modified or altered. + */ + public PlaceEditorialSummary editorialSummary; + /** The human-readable address of this place. */ public String formattedAddress; @@ -62,9 +88,12 @@ public class PlaceDetails implements Serializable { /** The human-readable name for the returned result. */ public String name; - /** The opening hours for the place. */ + /** The regular hours of operation. */ public OpeningHours openingHours; + /** Whether the place has permanently closed. */ + @Deprecated public boolean permanentlyClosed; + /** A list of photos associated with this place, each containing a reference to an image. */ public Photo[] photos; @@ -77,11 +106,11 @@ public class PlaceDetails implements Serializable { /** The Plus Code location identifier for this place. */ public PlusCode plusCode; - /** Whether the place has permanently closed. */ - public boolean permanentlyClosed; - - /** The number of user reviews for this place */ - public int userRatingsTotal; + /** + * The price level of the place. The exact amount indicated by a specific value will vary from + * region to region. + */ + public PriceLevel priceLevel; @Deprecated public static class AlternatePlaceIds implements Serializable { @@ -99,7 +128,7 @@ public static class AlternatePlaceIds implements Serializable { * The scope of an alternative place ID will always be APP, indicating that the alternative * place ID is recognised by your application only. */ - public PlaceIdScope scope; + @Deprecated public PlaceIdScope scope; @Override public String toString() { @@ -111,13 +140,7 @@ public String toString() { * An optional array of alternative place IDs for the place, with a scope related to each * alternative ID. */ - public AlternatePlaceIds[] altIds; - - /** - * The price level of the place. The exact amount indicated by a specific value will vary from - * region to region. - */ - public PriceLevel priceLevel; + @Deprecated public AlternatePlaceIds[] altIds; /** The place's rating, from 1.0 to 5.0, based on aggregated user reviews. */ public float rating; @@ -158,9 +181,9 @@ public enum RatingType { * A list of AspectRating objects, each of which provides a rating of a single attribute of the * establishment. * - *

Note: this is a Premium Data - * field available to the Google Places API for Work customers. + *

Note: this is a Premium Data field + * available to the Google Places API for Work customers. */ public AspectRating[] aspects; @@ -195,12 +218,49 @@ public enum RatingType { public Instant time; } + /** Specifies if the place supports reservations. */ + public Boolean reservable; + /** * An array of up to five reviews. If a language parameter was specified in the Place Details * request, the Places Service will bias the results to prefer reviews written in that language. */ public Review[] reviews; + /** + * Contains an array of entries for the next seven days including information about secondary + * hours of a business. Secondary hours are different from a business's main hours. For example, a + * restaurant can specify drive through hours or delivery hours as its secondary hours. This field + * populates the type subfield, which draws from a predefined list of opening hours types (such as + * DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the + * special_days subfield of all hours, set for dates that have exceptional hours. + */ + public OpeningHours secondaryOpeningHours; + + /** Specifies if the place serves beer. */ + public Boolean servesBeer; + + /** Specifies if the place serves breakfast. */ + public Boolean servesBreakfast; + + /** Specifies if the place serves brunch. */ + public Boolean servesBrunch; + + /** Specifies if the place serves dinner. */ + public Boolean servesDinner; + + /** Specifies if the place serves lunch. */ + public Boolean servesLunch; + + /** Specifies if the place serves vegetarian food. */ + public Boolean servesVegetarianFood; + + /** Specifies if the place serves wine. */ + public Boolean servesWine; + + /** Specifies if the business supports takeout. */ + public Boolean takeout; + /** Feature types describing the given result. */ public AddressType[] types; @@ -212,6 +272,9 @@ public enum RatingType { */ public URL url; + /** The number of user reviews for this place */ + public int userRatingsTotal; + /** The number of minutes this place’s current timezone is offset from UTC. */ public int utcOffset; @@ -224,19 +287,37 @@ public enum RatingType { /** The authoritative website for this place, such as a business's homepage. */ public URL website; + /** Specifies if the place has an entrance that is wheelchair-accessible. */ + public Boolean wheelchairAccessibleEntrance; + /** Attributions about this listing which must be displayed to the user. */ public String[] htmlAttributions; - /** The status of the business (i.e. operational, temporarily closed, etc.). */ - public String businessStatus; - @Override public String toString() { StringBuilder sb = new StringBuilder("[PlaceDetails: "); sb.append("\"").append(name).append("\""); sb.append(" ").append(placeId).append(" (").append(scope).append(")"); sb.append(" address=\"").append(formattedAddress).append("\""); - sb.append(" geometry=").append(geometry); + if (businessStatus != null) { + sb.append("businessStatus=").append(businessStatus); + } + if (curbsidePickup != null) { + sb.append(", curbsidePickup=").append(curbsidePickup); + } + if (currentOpeningHours != null) { + sb.append(", currentOpeningHours=").append(currentOpeningHours); + } + if (delivery != null) { + sb.append(", delivery=").append(delivery); + } + if (dineIn != null) { + sb.append(", dineIn=").append(dineIn); + } + if (editorialSummary != null) { + sb.append(", editorialSummary=").append(editorialSummary); + } + sb.append(", geometry=").append(geometry); if (vicinity != null) { sb.append(", vicinity=").append(vicinity); } @@ -278,15 +359,45 @@ public String toString() { if (photos != null && photos.length > 0) { sb.append(", ").append(photos.length).append(" photos"); } + if (reservable != null) { + sb.append(", reservable=").append(reservable); + } if (reviews != null && reviews.length > 0) { sb.append(", ").append(reviews.length).append(" reviews"); } + if (secondaryOpeningHours != null) { + sb.append(", secondaryOpeningHours=").append(secondaryOpeningHours); + } + if (servesBeer != null) { + sb.append(", servesBeer=").append(servesBeer); + } + if (servesBreakfast != null) { + sb.append(", servesBreakfast=").append(servesBreakfast); + } + if (servesBrunch != null) { + sb.append(", servesBrunch=").append(servesBrunch); + } + if (servesDinner != null) { + sb.append(", servesDinner=").append(servesDinner); + } + if (servesLunch != null) { + sb.append(", servesLunch=").append(servesLunch); + } + if (servesVegetarianFood != null) { + sb.append(", servesVegetarianFood=").append(servesVegetarianFood); + } + if (servesWine != null) { + sb.append(", servesWine=").append(servesWine); + } + if (takeout != null) { + sb.append(", takeout=").append(takeout); + } + if (wheelchairAccessibleEntrance != null) { + sb.append(", wheelchairAccessibleEntrance=").append(wheelchairAccessibleEntrance); + } if (htmlAttributions != null && htmlAttributions.length > 0) { sb.append(", ").append(htmlAttributions.length).append(" htmlAttributions"); } - if (businessStatus != null) { - sb.append(", businessStatus=").append(businessStatus); - } sb.append("]"); return sb.toString(); } diff --git a/src/main/java/com/google/maps/model/PlaceEditorialSummary.java b/src/main/java/com/google/maps/model/PlaceEditorialSummary.java new file mode 100644 index 000000000..ac1fbdc05 --- /dev/null +++ b/src/main/java/com/google/maps/model/PlaceEditorialSummary.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google Inc. All rights reserved. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + * ANY KIND, either express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.google.maps.model; + +import java.io.Serializable; + +/** + * Contains a summary of the place. A summary is comprised of a textual overview, and also includes + * the language code for these if applicable. Summary text must be presented as-is and can not be + * modified or altered. + */ +public class PlaceEditorialSummary implements Serializable { + + private static final long serialVersionUID = 1L; + + /** The language of the previous fields. May not always be present. */ + public String language; + + /** A medium-length textual summary of the place. */ + public String overview; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("[EditorialSummary: "); + if (language != null) { + sb.append("language=").append(language).append(", "); + } + if (overview != null) { + sb.append("overview=").append(overview); + } + sb.append("]"); + return sb.toString(); + } +} diff --git a/src/test/java/com/google/maps/PlacesApiTest.java b/src/test/java/com/google/maps/PlacesApiTest.java index cdba990c1..24cbbf5ca 100644 --- a/src/test/java/com/google/maps/PlacesApiTest.java +++ b/src/test/java/com/google/maps/PlacesApiTest.java @@ -27,7 +27,6 @@ import com.google.maps.FindPlaceFromTextRequest.LocationBiasPoint; import com.google.maps.FindPlaceFromTextRequest.LocationBiasRectangular; import com.google.maps.PlaceAutocompleteRequest.SessionToken; -import com.google.maps.PlaceDetailsRequest.FieldMask; import com.google.maps.model.AddressComponentType; import com.google.maps.model.AddressType; import com.google.maps.model.AutocompletePrediction; @@ -41,7 +40,6 @@ import com.google.maps.model.Photo; import com.google.maps.model.PlaceAutocompleteType; import com.google.maps.model.PlaceDetails; -import com.google.maps.model.PlaceDetails.Review.AspectRating.RatingType; import com.google.maps.model.PlaceType; import com.google.maps.model.PlacesSearchResponse; import com.google.maps.model.PlacesSearchResult; @@ -49,15 +47,13 @@ import com.google.maps.model.RankBy; import java.net.URI; import java.time.LocalTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; import java.util.Arrays; import org.junit.Test; public class PlacesApiTest { private static final String GOOGLE_SYDNEY = "ChIJN1t_tDeuEmsRUsoyG83frY4"; - private static final String QUAY_PLACE_ID = "ChIJ02qnq0KuEmsRHUJF4zo1x4I"; + private static final String FOOD_PLACE_ID = "ChIJN5Nz71W3j4ARhx5bwpTQEGg"; private static final String PERMANENTLY_CLOSED_PLACE_ID = "ChIJZQvy3jAbdkgR9avxegjoCe0"; private static final String QUERY_AUTOCOMPLETE_INPUT = "pizza near par"; private static final LatLng SYDNEY = new LatLng(-33.8650, 151.2094); @@ -65,7 +61,7 @@ public class PlacesApiTest { private final String autocompletePredictionStructuredFormatting; private final String placeDetailResponseBody; private final String placeDetailResponseBodyForPermanentlyClosedPlace; - private final String quayResponseBody; + private final String foodResponseBody; private final String queryAutocompleteResponseBody; private final String queryAutocompleteWithPlaceIdResponseBody; private final String textSearchResponseBody; @@ -88,7 +84,7 @@ public PlacesApiTest() { placeDetailResponseBody = retrieveBody("PlaceDetailsResponse.json"); placeDetailResponseBodyForPermanentlyClosedPlace = retrieveBody("PlaceDetailsResponseForPermanentlyClosedPlace.json"); - quayResponseBody = retrieveBody("PlaceDetailsQuay.json"); + foodResponseBody = retrieveBody("PlaceDetailsFood.json"); queryAutocompleteResponseBody = retrieveBody("QueryAutocompleteResponse.json"); queryAutocompleteWithPlaceIdResponseBody = retrieveBody("QueryAutocompleteResponseWithPlaceID.json"); @@ -155,11 +151,12 @@ public void testPlaceDetailsLookupGoogleSydney() throws Exception { .fields( PlaceDetailsRequest.FieldMask.PLACE_ID, PlaceDetailsRequest.FieldMask.NAME, - PlaceDetailsRequest.FieldMask.TYPES) + PlaceDetailsRequest.FieldMask.TYPES, + PlaceDetailsRequest.FieldMask.WHEELCHAIR_ACCESSIBLE_ENTRANCE) .await(); sc.assertParamValue(GOOGLE_SYDNEY, "placeid"); - sc.assertParamValue("place_id,name,types", "fields"); + sc.assertParamValue("place_id,name,types,wheelchair_accessible_entrance", "fields"); assertNotNull(placeDetails); assertNotNull(placeDetails.toString()); @@ -176,22 +173,22 @@ public void testPlaceDetailsLookupGoogleSydney() throws Exception { assertEquals(placeDetails.addressComponents[3].shortName, "Pyrmont"); assertEquals(placeDetails.addressComponents[3].types[0], AddressComponentType.LOCALITY); assertEquals(placeDetails.addressComponents[3].types[1], AddressComponentType.POLITICAL); - assertEquals(placeDetails.addressComponents[4].longName, "New South Wales"); - assertEquals(placeDetails.addressComponents[4].shortName, "NSW"); + assertEquals(placeDetails.addressComponents[5].longName, "New South Wales"); + assertEquals(placeDetails.addressComponents[5].shortName, "NSW"); assertEquals( - placeDetails.addressComponents[4].types[0], + placeDetails.addressComponents[5].types[0], AddressComponentType.ADMINISTRATIVE_AREA_LEVEL_1); - assertEquals(placeDetails.addressComponents[4].types[1], AddressComponentType.POLITICAL); - assertEquals(placeDetails.addressComponents[5].longName, "Australia"); - assertEquals(placeDetails.addressComponents[5].shortName, "AU"); - assertEquals(placeDetails.addressComponents[5].types[0], AddressComponentType.COUNTRY); assertEquals(placeDetails.addressComponents[5].types[1], AddressComponentType.POLITICAL); - assertEquals(placeDetails.addressComponents[6].shortName, "2009"); - assertEquals(placeDetails.addressComponents[6].types[0], AddressComponentType.POSTAL_CODE); + assertEquals(placeDetails.addressComponents[6].longName, "Australia"); + assertEquals(placeDetails.addressComponents[6].shortName, "AU"); + assertEquals(placeDetails.addressComponents[6].types[0], AddressComponentType.COUNTRY); + assertEquals(placeDetails.addressComponents[6].types[1], AddressComponentType.POLITICAL); + assertEquals(placeDetails.addressComponents[7].shortName, "2009"); + assertEquals(placeDetails.addressComponents[7].types[0], AddressComponentType.POSTAL_CODE); assertNotNull(placeDetails.formattedAddress); - assertEquals(placeDetails.formattedAddress, "5, 48 Pirrama Rd, Pyrmont NSW 2009, Australia"); + assertEquals(placeDetails.formattedAddress, "48 Pirrama Rd, Pyrmont NSW 2009, Australia"); assertNotNull(placeDetails.vicinity); - assertEquals(placeDetails.vicinity, "5 48 Pirrama Road, Pyrmont"); + assertEquals(placeDetails.vicinity, "48 Pirrama Road, Pyrmont"); // Phone numbers assertNotNull(placeDetails.formattedPhoneNumber); @@ -209,24 +206,22 @@ public void testPlaceDetailsLookupGoogleSydney() throws Exception { assertNotNull(placeDetails.icon); assertEquals( placeDetails.icon.toURI(), - new URI("https://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png")); + new URI( + "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png")); assertNotNull(placeDetails.url); assertEquals( - placeDetails.url.toURI(), - new URI("https://plus.google.com/111337342022929067349/about?hl=en-US")); + placeDetails.url.toURI(), new URI("https://maps.google.com/?cid=10281119596374313554")); assertNotNull(placeDetails.website); - assertEquals( - placeDetails.website.toURI(), - new URI("https://www.google.com.au/about/careers/locations/sydney/")); + assertEquals(placeDetails.website.toURI(), new URI("http://google.com/")); // Name assertNotNull(placeDetails.name); - assertEquals(placeDetails.name, "Google"); + assertEquals(placeDetails.name, "Google Workplace 6"); // Opening Hours assertNotNull(placeDetails.openingHours); assertNotNull(placeDetails.openingHours.openNow); - assertTrue(placeDetails.openingHours.openNow); + assertFalse(placeDetails.openingHours.openNow); assertNotNull(placeDetails.openingHours.periods); assertEquals(placeDetails.openingHours.periods.length, 5); @@ -259,7 +254,7 @@ public void testPlaceDetailsLookupGoogleSydney() throws Exception { assertEquals(DayOfWeek.THURSDAY, thursday.open.day); assertEquals(opening, thursday.open.time); assertEquals(DayOfWeek.THURSDAY, thursday.close.day); - assertEquals(closing530pm, thursday.close.time); + assertEquals(closing5pm, thursday.close.time); assertEquals(DayOfWeek.FRIDAY, friday.open.day); assertEquals(opening, friday.open.time); @@ -268,14 +263,14 @@ public void testPlaceDetailsLookupGoogleSydney() throws Exception { } assertNotNull(placeDetails.openingHours.weekdayText); - assertEquals(placeDetails.openingHours.weekdayText[0], "Monday: 8:30 am – 5:30 pm"); - assertEquals(placeDetails.openingHours.weekdayText[1], "Tuesday: 8:30 am – 5:30 pm"); - assertEquals(placeDetails.openingHours.weekdayText[2], "Wednesday: 8:30 am – 5:30 pm"); - assertEquals(placeDetails.openingHours.weekdayText[3], "Thursday: 8:30 am – 5:30 pm"); - assertEquals(placeDetails.openingHours.weekdayText[4], "Friday: 8:30 am – 5:00 pm"); + assertEquals(placeDetails.openingHours.weekdayText[0], "Monday: 8:30 AM – 5:30 PM"); + assertEquals(placeDetails.openingHours.weekdayText[1], "Tuesday: 8:30 AM – 5:30 PM"); + assertEquals(placeDetails.openingHours.weekdayText[2], "Wednesday: 8:30 AM – 5:30 PM"); + assertEquals(placeDetails.openingHours.weekdayText[3], "Thursday: 8:30 AM – 5:00 PM"); + assertEquals(placeDetails.openingHours.weekdayText[4], "Friday: 8:30 AM – 5:00 PM"); assertEquals(placeDetails.openingHours.weekdayText[5], "Saturday: Closed"); assertEquals(placeDetails.openingHours.weekdayText[6], "Sunday: Closed"); - assertEquals(placeDetails.utcOffset, 600); + assertEquals(placeDetails.utcOffset, 660); // Photos assertNotNull(placeDetails.photos); @@ -290,42 +285,17 @@ public void testPlaceDetailsLookupGoogleSydney() throws Exception { PlaceDetails.Review review = placeDetails.reviews[0]; assertNotNull(review); assertNotNull(review.authorName); - assertEquals("Danielle Lonnon", review.authorName); - assertNotNull(review.authorUrl); - assertEquals( - new URI("https://plus.google.com/118257578392162991040"), review.authorUrl.toURI()); - assertNotNull(review.profilePhotoUrl); - assertEquals("https://lh5.googleusercontent.com/photo.jpg", review.profilePhotoUrl); - assertNotNull(review.language); - assertEquals("en", review.language); - assertNotNull(review.relativeTimeDescription); - assertEquals("a month ago", review.relativeTimeDescription); - assertEquals(5, review.rating); - assertNotNull(review.text); - assertTrue(review.text.startsWith("As someone who works in the theatre,")); - assertNotNull(review.aspects); - PlaceDetails.Review.AspectRating aspect = review.aspects[0]; - assertNotNull(aspect); - assertEquals(3, aspect.rating); - assertNotNull(aspect.type); - assertEquals(RatingType.OVERALL, aspect.type); - assertEquals(1425790392, review.time.toEpochMilli() / 1000); - assertEquals( - "2015-03-08 04:53 am", - DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm a") - .withZone(ZoneOffset.UTC) - .format(review.time) - .toLowerCase()); + assertNotNull(review.time); + + // Wheelchair Accessible Entrance + assertEquals(true, placeDetails.wheelchairAccessibleEntrance); // Place ID assertNotNull(placeDetails.placeId); assertEquals(placeDetails.placeId, GOOGLE_SYDNEY); assertNotNull(placeDetails.types); - assertEquals(placeDetails.types[0], AddressType.ESTABLISHMENT); - assertEquals(placeDetails.rating, 4.4, 0.1); - - // Permanently closed: - assertFalse(placeDetails.permanentlyClosed); + assertEquals(placeDetails.types[1], AddressType.ESTABLISHMENT); + assertEquals(placeDetails.rating, 4.0, 0.1); } } @@ -334,10 +304,12 @@ public void testPlaceDetailsLookupPermanentlyClosedPlace() throws Exception { try (LocalTestServerContext sc = new LocalTestServerContext(placeDetailResponseBodyForPermanentlyClosedPlace)) { PlaceDetails placeDetails = - PlacesApi.placeDetails(sc.context, PERMANENTLY_CLOSED_PLACE_ID).await(); + PlacesApi.placeDetails(sc.context, PERMANENTLY_CLOSED_PLACE_ID) + .fields(PlaceDetailsRequest.FieldMask.BUSINESS_STATUS) + .await(); assertNotNull(placeDetails); assertNotNull(placeDetails.toString()); - assertTrue(placeDetails.permanentlyClosed); + assertEquals("CLOSED_PERMANENTLY", placeDetails.businessStatus); } } @@ -349,28 +321,30 @@ public void testPlaceDetailsLookupReturnsUserRatingsTotal() throws Exception { assertNotNull(placeDetails); assertNotNull(placeDetails.toString()); assertEquals(GOOGLE_SYDNEY, placeDetails.placeId); - assertEquals(98, placeDetails.userRatingsTotal); + assertEquals(973, placeDetails.userRatingsTotal); } } @Test - public void testPlaceDetailsLookupQuay() throws Exception { - try (LocalTestServerContext sc = new LocalTestServerContext(quayResponseBody)) { - PlaceDetails placeDetails = PlacesApi.placeDetails(sc.context, QUAY_PLACE_ID).await(); + public void testPlaceDetailsLookupFood() throws Exception { + try (LocalTestServerContext sc = new LocalTestServerContext(foodResponseBody)) { + PlaceDetails placeDetails = + PlacesApi.placeDetails(sc.context, FOOD_PLACE_ID) + .fields( + PlaceDetailsRequest.FieldMask.BUSINESS_STATUS, + PlaceDetailsRequest.FieldMask.CURBSIDE_PICKUP, + PlaceDetailsRequest.FieldMask.PHOTOS, + PlaceDetailsRequest.FieldMask.PRICE_LEVEL, + PlaceDetailsRequest.FieldMask.SERVES_BEER) + .await(); assertNotNull(placeDetails); assertNotNull(placeDetails.toString()); assertNotNull(placeDetails.priceLevel); - assertEquals(PriceLevel.VERY_EXPENSIVE, placeDetails.priceLevel); + assertEquals(PriceLevel.INEXPENSIVE, placeDetails.priceLevel); assertNotNull(placeDetails.photos); - Photo photo = placeDetails.photos[0]; - assertEquals(1944, photo.height); - assertEquals(2592, photo.width); - assertEquals( - "James Prendergast", - photo.htmlAttributions[0]); - assertEquals( - "CmRdAAAATDVdhv0RdMEZlvO2jNE_EXXZZnCWvenfvLmWCsYqVtCFxZiasbcv1X0CNDTkpaCtrurGzVxTVt8Fqc7egdA7VyFeq1VFaq1GiFatWrFAUm_H0CN9u2wbfjb1Zf0NL9QiEhCj6I5O2h6eFH_2sa5hyVaEGhTdn8b7RWD-2W64OrT3mFGjzzLWlQ", - photo.photoReference); + assertEquals("OPERATIONAL", placeDetails.businessStatus); + assertEquals(false, placeDetails.curbsidePickup); + assertTrue(placeDetails.servesBeer); } } @@ -568,7 +542,8 @@ public void testTextSearchResponse() throws Exception { assertNotNull(photo.htmlAttributions); assertEquals(1, photo.htmlAttributions.length); assertEquals( - "William Stewart", + "William" + + " Stewart", photo.htmlAttributions[0]); assertEquals( "CmRdAAAAa43ZeiQvF4n-Yv5UnEGcIe0KjdTzzTH4g-g1GuKgWas0g8W7793eFDGxkrG4Z5i_Jua0Z-" @@ -1046,7 +1021,9 @@ public void testPlaceDetailsRequestHasFieldMask() throws Exception { final String jsonString = retrieveBody("PlaceDetailsResponseWithBusinessStatus.json"); final LocalTestServerContext server = new LocalTestServerContext(jsonString); - PlacesApi.placeDetails(server.context, "testPlaceId").fields(FieldMask.BUSINESS_STATUS).await(); + PlacesApi.placeDetails(server.context, "testPlaceId") + .fields(PlaceDetailsRequest.FieldMask.BUSINESS_STATUS) + .await(); server.assertParamValue("business_status", "fields"); } diff --git a/src/test/resources/com/google/maps/PlaceDetailsFood.json b/src/test/resources/com/google/maps/PlaceDetailsFood.json new file mode 100644 index 000000000..e53179667 --- /dev/null +++ b/src/test/resources/com/google/maps/PlaceDetailsFood.json @@ -0,0 +1,20 @@ +{ + "html_attributions": [], + "result": { + "business_status": "OPERATIONAL", + "curbside_pickup": false, + "photos": [ + { + "height": 2268, + "html_attributions": [ + "redacted" + ], + "photo_reference": "AUjq9jm6X1h9Eoc0ucEeqgYBZiRopmcAqwcUvm9OlR3iZnjuoLB3Shy4oqtt5Ny6bGSm2wH_O5-TPHBE1oBv33V5dlQhn3A0cGa-riAAtoOqFnD8RFgNGCZqIPI0246sC2gFHfePdmYgQ1NziVOAzzeJ33Y7sEvJMPAcc_0h4q_F2XhWbxf8", + "width": 4032 + } + ], + "price_level": 1, + "serves_beer": true + }, + "status": "OK" +} diff --git a/src/test/resources/com/google/maps/PlaceDetailsLookupGoogleSydneyResponse.json b/src/test/resources/com/google/maps/PlaceDetailsLookupGoogleSydneyResponse.json deleted file mode 100644 index b5090a9ef..000000000 --- a/src/test/resources/com/google/maps/PlaceDetailsLookupGoogleSydneyResponse.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "html_attributions": [], - "result": { - "address_components": [ - { - "long_name": "5", - "short_name": "5", - "types": [ - "floor" - ] - }, - { - "long_name": "48", - "short_name": "48", - "types": [ - "street_number" - ] - }, - { - "long_name": "Pirrama Road", - "short_name": "Pirrama Rd", - "types": [ - "route" - ] - }, - { - "long_name": "Pyrmont", - "short_name": "Pyrmont", - "types": [ - "locality", - "political" - ] - }, - { - "long_name": "Council of the City of Sydney", - "short_name": "Sydney", - "types": [ - "administrative_area_level_2", - "political" - ] - }, - { - "long_name": "New South Wales", - "short_name": "NSW", - "types": [ - "administrative_area_level_1", - "political" - ] - }, - { - "long_name": "Australia", - "short_name": "AU", - "types": [ - "country", - "political" - ] - }, - { - "long_name": "2009", - "short_name": "2009", - "types": [ - "postal_code" - ] - } - ], - "adr_address": "5, \u003cspan class=\"street-address\"\u003e48 Pirrama Rd\u003c/span\u003e, \u003cspan class=\"locality\"\u003ePyrmont\u003c/span\u003e \u003cspan class=\"region\"\u003eNSW\u003c/span\u003e \u003cspan class=\"postal-code\"\u003e2009\u003c/span\u003e, \u003cspan class=\"country-name\"\u003eAustralia\u003c/span\u003e", - "chain_name": "Google", - "feature_id": { - "cell_id": 7715420665913760567, - "fprint": 10281119596374313554 - }, - "formatted_address": "5, 48 Pirrama Rd, Pyrmont NSW 2009, Australia", - "formatted_phone_number": "(02) 9374 4000", - "geometry": { - "location": { - "lat": -33.866651, - "lng": 151.195827 - }, - "viewport": { - "northeast": { - "lat": -33.8653881697085, - "lng": 151.1969739802915 - }, - "southwest": { - "lat": -33.86808613029149, - "lng": 151.1942760197085 - } - } - }, - "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png", - "id": "4f89212bf76dde31f092cfc14d7506555d85b5c7", - "international_phone_number": "+61 2 9374 4000", - "name": "Google", - "opening_hours": { - "minutes_until_closed": 226, - "minutes_until_open": 1186, - "open_now": true, - "periods": [ - { - "close": { - "day": 1, - "time": "1800" - }, - "open": { - "day": 1, - "time": "1000" - } - }, - { - "close": { - "day": 2, - "time": "1800" - }, - "open": { - "day": 2, - "time": "1000" - } - }, - { - "close": { - "day": 3, - "time": "1800" - }, - "open": { - "day": 3, - "time": "1000" - } - }, - { - "close": { - "day": 4, - "time": "1800" - }, - "open": { - "day": 4, - "time": "1000" - } - }, - { - "close": { - "day": 5, - "time": "1800" - }, - "open": { - "day": 5, - "time": "1000" - } - } - ], - "weekday_text": [ - "Monday: 10:00 AM – 6:00 PM", - "Tuesday: 10:00 AM – 6:00 PM", - "Wednesday: 10:00 AM – 6:00 PM", - "Thursday: 10:00 AM – 6:00 PM", - "Friday: 10:00 AM – 6:00 PM", - "Saturday: Closed", - "Sunday: Closed" - ] - }, - "photos": [ - { - "height": 1365, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/105932078588305868215/photos\"\u003eMaksym Kozlenko\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAMERdVY-5FvgQa3026fAR96qtbMkWn4l2lycjczAiC2E3Ztz52lWvCS-hvHt_QSa-EGXf4aR1vZlRpJK-W3UjMlxpD1ccRi-ifklli0YRQEZxbP48BSaGcdI2jArx4y7fEhAdtpr00KDIufn-JzHeAo5dGhQPs4LxICOZxsd4ihdKOasfIXqQ2g", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipP1U4aCd84U_h3g8MEpgv8pq9jhCZwabhBoaSrJ!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 2048 - }, - { - "height": 900, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/114853289796780923190/photos\"\u003eShir Yehoshua\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAA8Vq3EfN4DMUTuLmER9chPkUKeUUybkdEG7_d2-yo-bbqCt9q7ziE0seNHcl2_oeQLEqbKzySfghe_pM9Qr2qzLxS0C5Dq5LjwBF8W7NpD5YCXInV60WNlOyIzlIOpXCEEhALc6A0kuFceHUa9bPY_JRiGhS4caN6H5vysy_Ijv6s8SA6h0aViA", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipNYOZratGeoLGjr7bfmrm0afYBB2trW1tSCGVgG!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 1600 - }, - { - "height": 3264, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/102493344958625549078/photos\"\u003eThomas Li\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAX14l98e9K58S5U5iq5PbjE-7fFotJL2dMcHZQxY9f-46WLZKp7DGWsOMt2yNwzEX6D2WTKDkRZbkBIfjpdA_wGDP1y5y43szxtusAGyAIVOI85p6f_TQFGm6DY_5f-VAEhDqZz23ih2rumOsfm7gQ0HFGhRxL96mVj43VNAfOyYsZuqT9BSUpg", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipPhKnMNvHw5E96Ff3gqslvNgUV-QvXVpCGTs0qO!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 4912 - }, - { - "height": 3024, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/115886271727815775491/photos\"\u003eAnthony Huynh\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAcje-JEdObf7uoESSBJuNjsB4Nu6LQYr1ONv2rsOKIWtvkIKm7BwEGoblRELk1rDH_a8sOSXRgIjgcg1D_w5XV9VsWDTtEs4f-_K65Iq76reKNQgqDgYcE5YO4SBKjatmEhDQSaj0zYHtXeDQ5fOSyRa-GhTRkDNeGm3HVz095OFMM3Ta9c4_yw", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipN5zFwjADr1H9M_3vuK_VtZiSjFrEG5ExUJirlV!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 4032 - }, - { - "height": 1184, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/106645265231048995466/photos\"\u003eMalik Ahamed\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAASwcpC4UUZov3VW0JOe1xZ7RnNlUMRfNmQNYWxGEd-0Y4kUBmkZcIzCLUHjUM6INxd7YILV3ey6aaL2MFK0bg9x9DbaKySTTyVBYt_hagw98TrCUKqIrTZS_j_KYjWmGCEhBd49Qy5Mc6gc7i5eXLULA6GhT3_z-q2pSP9nZnvT2GA_sI2PY3XQ", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipOW7tRMp43SJ7GgDoGJpdN2i3sYafkmjWWkU_PR!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 1776 - }, - { - "height": 5582, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/110754641211532656340/photos\"\u003eRobert Koch\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAQJ4YsqM15BssaHh1Rw_oA7hibUWLhPBolewEzq2AD1Mf_otwPxt5Vh8LPK77FW3YffBgU4RBZ0JHIul-sPENfZ_jCs9QhFR6DkCFTgMbHC-pXFdFCkQ5Cpl89jiOvEvWEhDQ61wNT3GZEBtWVUXma_9CGhRs_eVFJ6a6QZayq6BDH9j2JdIfkA", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipOPF6xDOc1EpVoeMD-daLpZibzgJ5BtIbp5Zg-U!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 2866 - }, - { - "height": 4032, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/102558609090086310801/photos\"\u003eHuy Tran\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAtEBuRAXVD7e2gAsaoSLAxR2k5uqfWg3tYaXRh4M-ENCz16Gz022S9kMIv1ZuLBXO96psR2yV467igTYn5vLf1qzCVOtsb_-698mkhiXXN-iW8u5M_nFJPw414dO_E2j3EhC_q7C9r_cJ9a_qizKLZkaYGhShiU-_T1BOwiZeUgm-TPDD2qDHxg", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipMZ6g-KaP5kr4ip-oie2lSd406O0y2cPvx_71XS!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 3024 - }, - { - "height": 1944, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/115237891004485589752/photos\"\u003eKatherine Howell\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAutcpEG49pnwbS_pVaZCaV0mWup7B6nMSOkK-ACKY-48_V81HHGrrjPVovrepfyyebnWwVZIh_6vrR-4of7HlOJ0ucU6qrFv-klFhiNJYck6Jr12nNNruuX8S9nVWohqjEhATpr-QCcHpnq3VY50E8GORGhSXbbB_-fQqXirrKT7iPSTTutnIhQ", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipMnQDnLhIY5lZgX0AzRUE-51iSi0orgBoaQ_hSE!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 1944 - }, - { - "height": 2448, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/116976377324210679577/photos\"\u003eWH CHEN\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAflv2aOQSq3fZ45oS-BnUV8SKq6XoLLVuIyNOHjKuix_yGHBu-acvCSFu65ygnpmqt_935gN1_CFJixTwiqg2bTtImIVzGlbt45nPKVzwbVgs_hcczG_qxBrzwtW1-V_jEhDBF0erjllEgdTH9ZidUwPWGhR0c8WYvVUH8rm1dXpVjs3b1DNdPg", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipMyLqETfc7XPSejc4UF-J2BqJNhe4zy-18o2yn2!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 3264 - }, - { - "height": 2988, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/109246940950895122662/photos\"\u003eBen Tubridy\u003c/a\u003e" - ], - "photo_reference": "CmRaAAAAlESNIhS8ssqV6QulEQR0Zag2aAz-dcY9ejbleWQqA3bmTCkCwtic2X61-fEFtD03nYTjJuDrEMvNPwr7hgvYiIf6hTq87sA5bIhn07bAKrVKm1XnNFxwLDtscsi8HQ7HEhCH3mClbaYDJPgc2jIa9fyEGhRY37P_PokcMsJf2bAR3Q_OWEGtBg", - "view_in_maps_url": "https://www.google.com/maps/place//data=!3m4!1e2!3m2!1sAF1QipM8t9hb2nre80sRFHylMuf5XKfrscDNDgxjKge2!2e10!4m2!3m1!1s0x6b12ae37b47f5b37:0x8eaddfcd1b32ca52", - "width": 5312 - } - ], - "place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4", - "plus_code": { - "compound_code": "45MW+98 Pyrmont, New South Wales, Australia", - "global_code": "4RRH45MW+98" - }, - "rating": 4.4, - "reference": "CmRSAAAAGQJ6PTZr7ufM6fQmQKWECuhtbE5MxVWAVx1Potb6nllk7YrtrHYdMRttPrQfxHdAkFOaiZikxMustzx-R29lup1t8EZ5QhipfhEi9hJaM5AdNTBvo1Nrv7v03MtsEVj6EhDGokaqFIy6yIRgB6b_iKplGhQL3qLuxxusScGvkWpJCSJFafCbog", - "reviews": [ - { - "author_name": "Mark Sales", - "author_url": "https://www.google.com/maps/contrib/100341567599258416785/reviews", - "language": "en", - "profile_photo_url": "https://lh6.googleusercontent.com/-e2bgb-ognDY/AAAAAAAAAAI/AAAAAAAAAAA/AAyYBF5K8QcyGb-B5_yoiWjlWNTXqBcLHA/s128-c0x00000000-cc-rp-mo/photo.jpg", - "rating": 1, - "relative_time_description": "a week ago", - "text": "You have to FIX your Google MY BUSINESS page business.\nWhy the business owner CANNOT delete photos uploaded by anyone.\nI can delete the photos I uploaded but why is it so strange that anyone can upload and the owner of that page cannot delete the photos. I called the call centre and I have to explain IN DETAIL why i want to delete a photo!!!\nThats a total JOKE!!! its my page so i can do whatever I want!!!! So if the photo that a customer is legit and it was 10 years ago, i CANNOT delete that??? USELESS and TOTAL WASTE...", - "time": 1496880715 - }, - { - "author_name": "Starland Painting Pty Ltd", - "author_url": "https://www.google.com/maps/contrib/106844006614491278928/reviews", - "language": "en", - "profile_photo_url": "https://lh4.googleusercontent.com/-zHEV7zQnWfM/AAAAAAAAAAI/AAAAAAAAAAk/aZukMkHPI_o/s128-c0x00000000-cc-rp-mo/photo.jpg", - "rating": 1, - "relative_time_description": "a week ago", - "text": "No customer support, indeed! \nI went through the most of the reviews provided by people whom somehow do business with Google, and I have found that I am not the only disappointed one!!\nMost, almost all, + ve comments are about Google's geo-location and their food..., presumably written by their employees... . \n\nGoogle is a massive cooperation that has the ability/power to do better, indeed, but why they don't, remains unknown, at least to me.\n\nWithout the presence of small or large scale businesses, Google is absolutely nothing but a Website! The foreseeable future may not be as good as it is now for Google, as some fresh competitors may make Google a history, considering the fact that Nothing Is Impossible!", - "time": 1496982169 - }, - { - "author_name": "Paul Sutherland", - "author_url": "https://www.google.com/maps/contrib/104671394445218170123/reviews", - "language": "en", - "profile_photo_url": "https://lh6.googleusercontent.com/-ZRFv8AHxqEQ/AAAAAAAAAAI/AAAAAAABsfg/HluyrsFH2bk/s128-c0x00000000-cc-rp-mo/photo.jpg", - "rating": 1, - "relative_time_description": "a month ago", - "text": "Very disappointed. I have been a supporter of google and some of its innovations, I particular love android and adwords helps my business. Now I have a review on my site that is in breach of defamation laws, however Google don't seem to care. This is a fake review by someone who doesn't identify themselves. I get that reviews are there to assist businesses better themselves and help consumers make a decision, but when its defamatory and hurtful the line needs to be better managed by google. Having read most of your one star reviews, most of them have the same issue. Time to listen to your customers Google.", - "time": 1493618915 - }, - { - "author_name": "Ranjit Nair", - "author_url": "https://www.google.com/maps/contrib/102808647017735332248/reviews", - "language": "en", - "profile_photo_url": "https://lh4.googleusercontent.com/-A-UJAO1hMtk/AAAAAAAAAAI/AAAAAAAAAAA/AAyYBF5ojcf5EM9vU3KsroX_DEyKMn76MA/s128-c0x00000000-cc-rp-mo/photo.jpg", - "rating": 1, - "relative_time_description": "4 months ago", - "text": "Absolutely ZERO support. There is no thought behind how the whole Google Business Review process works and the only answer you get from support staff is that they are only trained to direct people to the Google support page. Why do you need people at the end of a phone line to tell you that?\n\nAs it stands, there is nothing stopping me from standing in front of a store and giving a negative review to a business based on whether it was raining that day or not. There is no process here to verify if the claim of the user is right or not. I thought the whole process of reviews were meant to be a fair representation of the service the business provides. Where is the fairness here?\n\nGoogle encourages businesses to respond to people's reviews. Is Google responding to the reviews that are posted about their business? Why the double standards Google?", - "time": 1485900942 - }, - { - "author_name": "Ben Cohen", - "author_url": "https://www.google.com/maps/contrib/110685259345133164515/reviews", - "language": "en", - "profile_photo_url": "https://lh4.googleusercontent.com/-NwQ8wRwmjlQ/AAAAAAAAAAI/AAAAAAAAAXU/V8YVXItAB-w/s128-c0x00000000-cc-rp-mo/photo.jpg", - "rating": 1, - "relative_time_description": "in the last week", - "text": "Disgusting Service. No communication on a housing location number error that has caused multiple issues including internet access and will be reported to communications ombudsmen. Complete lack of empathy for customer.", - "time": 1497829502 - } - ], - "scope": "GOOGLE", - "types": [ - "point_of_interest", - "establishment" - ], - "url": "https://maps.google.com/?cid=10281119596374313554", - "user_ratings_total": 458, - "utc_offset": 600, - "vicinity": "5, 48 Pirrama Road, Pyrmont", - "website": "https://www.google.com.au/about/careers/locations/sydney/" - }, - "status": "OK" -} diff --git a/src/test/resources/com/google/maps/PlaceDetailsQuay.json b/src/test/resources/com/google/maps/PlaceDetailsQuay.json deleted file mode 100644 index 9e06c7939..000000000 --- a/src/test/resources/com/google/maps/PlaceDetailsQuay.json +++ /dev/null @@ -1,305 +0,0 @@ -{ - "html_attributions": [], - "result": { - "address_components": [ - { - "long_name": "3", - "short_name": "3", - "types": [] - }, - { - "long_name": "Overseas Passenger Terminal", - "short_name": "Overseas Passenger Terminal", - "types": [ - "premise" - ] - }, - { - "long_name": "George Street", - "short_name": "George St", - "types": [ - "route" - ] - }, - { - "long_name": "The Rocks", - "short_name": "The Rocks", - "types": [ - "locality", - "political" - ] - }, - { - "long_name": "New South Wales", - "short_name": "NSW", - "types": [ - "administrative_area_level_1", - "political" - ] - }, - { - "long_name": "Australia", - "short_name": "AU", - "types": [ - "country", - "political" - ] - }, - { - "long_name": "2000", - "short_name": "2000", - "types": [ - "postal_code" - ] - } - ], - "adr_address": "3, Overseas Passenger Terminal, \u003cspan class=\"street-address\"\u003eGeorge St & Argyle Street\u003c/span\u003e, \u003cspan class=\"locality\"\u003eThe Rocks\u003c/span\u003e \u003cspan class=\"region\"\u003eNSW\u003c/span\u003e \u003cspan class=\"postal-code\"\u003e2000\u003c/span\u003e, \u003cspan class=\"country-name\"\u003eAustralia\u003c/span\u003e", - "formatted_address": "3, Overseas Passenger Terminal, George St & Argyle Street, The Rocks NSW 2000, Australia", - "formatted_phone_number": "(02) 9251 5600", - "geometry": { - "location": { - "lat": -33.858018, - "lng": 151.210091 - } - }, - "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", - "id": "f181b872b9bc680c8966df3e5770ae9839115440", - "international_phone_number": "+61 2 9251 5600", - "name": "Quay", - "opening_hours": { - "open_now": true, - "periods": [ - { - "close": { - "day": 1, - "time": "1700" - }, - "open": { - "day": 1, - "time": "1330" - } - }, - { - "close": { - "day": 2, - "time": "1700" - }, - "open": { - "day": 2, - "time": "1000" - } - }, - { - "close": { - "day": 3, - "time": "1700" - }, - "open": { - "day": 3, - "time": "1000" - } - }, - { - "close": { - "day": 4, - "time": "1700" - }, - "open": { - "day": 4, - "time": "1000" - } - }, - { - "close": { - "day": 5, - "time": "1700" - }, - "open": { - "day": 5, - "time": "1000" - } - } - ], - "weekday_text": [ - "Monday: 1:30 – 5:00 pm", - "Tuesday: 10:00 am – 5:00 pm", - "Wednesday: 10:00 am – 5:00 pm", - "Thursday: 10:00 am – 5:00 pm", - "Friday: 10:00 am – 5:00 pm", - "Saturday: Closed", - "Sunday: Closed" - ] - }, - "photos": [ - { - "height": 1944, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/101719343658521132777\"\u003eJames Prendergast\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAATDVdhv0RdMEZlvO2jNE_EXXZZnCWvenfvLmWCsYqVtCFxZiasbcv1X0CNDTkpaCtrurGzVxTVt8Fqc7egdA7VyFeq1VFaq1GiFatWrFAUm_H0CN9u2wbfjb1Zf0NL9QiEhCj6I5O2h6eFH_2sa5hyVaEGhTdn8b7RWD-2W64OrT3mFGjzzLWlQ", - "width": 2592 - }, - { - "height": 612, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/107255044321733286691\"\u003eTamagotchi Kuchipatchi\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAYL-TTOxtVXgJkTTmDSTVi77OjkPGlLae4Md9wskVNxIT4Qn_HN0k76P4ex7ALWEnrvAGTGEV2Vyiv4yKtpm_7TQ11wCLeg8OXXOEOJgTB1KuOPAazrewXuGb5sLUzB8_EhBuRRFI2aNKyNM9zLm79im1GhTPKsAzFfexw4uJs9eZVN9Nv2uEZg", - "width": 816 - }, - { - "height": 2048, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/111085852685867296039\"\u003eAndrea Longinotti\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAWQXc9XOHKUsNufwqCp-3ljOdW8Lu2NdC3J0Xrr1rjbzs6cgVnWjLEealmsMebiLndB4yxv652QEPDxIKYXjo2_umeEsj0UGdiZHlgpyjMXP7CzNOsAqtk3nnY9v6d8BbEhBb97FZ0cUlqOKB7XuVxV_qGhQaXiWkNuhHtqy3qg_mW0we97oW9w", - "width": 1781 - }, - { - "height": 600, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/109274197593239971461\"\u003eBengou Chen\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAD9sxwXUxAhPkya0dq7Hbero3ow4jlBc7E0mTLEG9TdpCnqxxbBP84OuXr8eXBDGbhlD4hL9J7juhCr9oh3V0lBe6u8WDs9JxuysbVRyr2-7Kkkn0542kLyePteuQ_8mrEhClLFqGOaf4jEMDhUh2aqhrGhQIl6Frbi9BDjO86mWoT-8kzkdIsQ", - "width": 800 - }, - { - "height": 2349, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/107084328053484542717\"\u003eKutay Kesim\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAFi4pQAzAPqa-Vara3o8OuV88BGAPO9U3s-_6z3551fwBtWcVgIOxiimYtfN5-PfxZBfpU_rcI9mA1jtzOSFo9DtpLHoYlmNZpZhL8Irmvo_OHd-MmpkRSD5hCXyvZeL0EhBeAELfaE146PMqKcwCPSrnGhSJgaWBSEZKctbA9nF6oeagLlE12Q", - "width": 5839 - }, - { - "height": 1951, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/107084328053484542717\"\u003eKutay Kesim\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAyv0fpZdGbThZVlIKEtUoFLtF23K9guNDUKGXJC3M-YB-ANIN5jCwCgBgN5tvv6gntt2mh5gakik-CQRLNBQwTxrzG4QNJcRIumu3cENzM9-5p_LqOicxazWKaj6X3sP5EhBUgctZZaxLhp44GnyB-pPpGhQs-9-ZolZGkNASdFrA-iXwgD28pw", - "width": 4949 - }, - { - "height": 852, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/112520482541499149050\"\u003eTeri Leong\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAaR5bk2W2GJzjwC85XLi8WMNkRIyoGtzK_z_PMSrHRqir9wdi2Yrn364xrMFbElcUm_CDacyf13NyDTxt8aBBnIKVbB76MRiiSuf3SnNH1po6kgXnLb8ded01iO5hhYPzEhDXPrKtEaQlKrx_xfXPkwnOGhR7dI1r514aACRfdjfen50funKrsw", - "width": 1280 - }, - { - "height": 2048, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/111085852685867296039\"\u003eAndrea Longinotti\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAnSPU8qbxRLCZh1S1-NkrUmXgedfL5a_AwL3jNAZCcHT6JAmz6jelUhMjp10wwzKVDUsPDyQOu9KF8qXdnY_rwjS-1CtReL8-9yxoY72gmD5BYD8P87-1pUB7e8Z5esYOEhCmcVHzRXFtCc4jq6jEVy6XGhQqhw-mH8o7VqPav6kExnxaTxTqDQ", - "width": 1543 - }, - { - "height": 2240, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/107084328053484542717\"\u003eKutay Kesim\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAWzryTzB02KsXQgzabGtZq3MGAS19cbzHwFXrLV5hdiFiJTOU6KHZjutERpG6NX5qZ5F2N-EP5j66YyCiXfuc0E8mQBFzhHPH2HVTnFyxvss6SzUmRdqV6bWSyqpSGBfWEhDQryNS3PzHfYtw4Cxysz5EGhTYazVgva930AmIaOiHcUKl2ikVCA", - "width": 4471 - }, - { - "height": 1265, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/111658638200198915174\"\u003eWei Guan\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAsY5NCuLSSzkvKCtl5Tr1bKFFKKF0Sx0ZKvOQpCAkxRuIwCxAOXDN6xivlNEFOEA5OZuEeOqD4IHMl1FYDA0o5koJS65HYd3k45byMjpBB2LMR5TWPd6RxtWTo6sJCZJHEhAZl4o1HLQ1Mx72PZOik6NtGhT71-QPp883LgsCGkm9Zgb6jlGVyg", - "width": 949 - } - ], - "place_id": "ChIJ02qnq0KuEmsRHUJF4zo1x4I", - "price_level": 4, - "rating": 4.1, - "reference": "CmRYAAAAPJXQPY-Urzx36za5sPPu5xr2ou57kjH_Owv_EzHeEdkp4dVk7mzoMKaVAThh9mcoZ1GjopmpMglDnBFpsHCIaW_zTTnXKfa9Mi9dBo0cb7v74K464h-oC_aSDR5G89xXEhC6LSFCOIAPJTxe8tf2PIKRGhTfiIkPViAIbWWY8Gg3VY5R0Tv9bw", - "reviews": [ - { - "aspects": [ - { - "rating": 1, - "type": "overall" - } - ], - "author_name": "Rachel Lewis", - "author_url": "https://plus.google.com/114299517944848975298", - "language": "en", - "rating": 3, - "text": "Overall disappointing. This is the second time i've been there and my experience was... Nothing to nibble on for 45 mins and then the bread came. My first entree was the marron which I thought was tasteless - perhaps others would say delicate? but there you go. The XO sea was fantastic. I chose the vegetarian main dish which was all about the texture which was great but nothing at all outstanding about the dish. My husband and daughter chose the duck for their main course it was the smallest main course i've ever seen - their faces were priceless when it arrived!. Snow egg was beautiful but the granita on the bottom had some solid chunks of hard ice. The service was quite good...", - "time": 1441848853 - }, - { - "aspects": [ - { - "rating": 3, - "type": "overall" - } - ], - "author_name": "Cassandra Lee", - "author_url": "https://plus.google.com/104420598240526976175", - "language": "en", - "rating": 5, - "text": "Went here for my first fine dining experience and it was awesome! The food is amazingly presented and cooked to perfection. Service is impeccable and the view is a bonus. Would definitely recommend to anyone looking for somewhere special!", - "time": 1439358403 - }, - { - "aspects": [ - { - "rating": 0, - "type": "overall" - } - ], - "author_name": "Nicole Green", - "author_url": "https://plus.google.com/100274172303441331993", - "language": "en", - "rating": 2, - "text": "This is the first time I have ever decided to review a restaurant on a public forum. Given the amount of money spent I feel compelled to stop other people making the same mistake we did. Group booking for 7 people @ 1pm. Decor is dated with purple carpet, red chairs and mirrored roof. Patrons dressed in tee shirts and jeans - dress code should be in place. Everyone opted for the tasting menu with matching wines. Slow cooked Duck was horrible and tough, along with a tasteless Wagyu. Head Sommelier was condescending with rude commentary. Staff started to vacuum around us while we were still having last course, setting up for the next sitting. If you can't fit a tasting menu in for a 1pm booking do not take bookings at that time. Forgot to bring out the petit fours and only served 1 pot of tea for 2 people. Burnt Piccolo was served and we had to ask for it to be remade. We asked for another round of drinks and was told the bar was closed at 5:30pm. Staff were unkempt with uniforms that badly need an update. Overall presentation was dated and unpleasant. Terrible dining experience for a 3 hat restaurant. Spend half your money and eat at Guillaume for better food and nicer people. We are all very disappointed and won't be recommending this restaurant to anyone any time soon. Unfortunately your reputation is keeping you afloat but this will not last long. ", - "time": 1437960610 - }, - { - "aspects": [ - { - "rating": 0, - "type": "overall" - } - ], - "author_name": "Steakhouse Resume", - "author_url": "https://plus.google.com/114017213059089752059", - "language": "en", - "rating": 1, - "text": "Disappointed is an understatement! My husband and I've had our fair share of fine dining experiences around the world and for a restaurant that requires a booking at least three months in advance we were SHOCKED at the quality of food AND service presented tonight. From rubber-like \"quail\" to a snow-egg that presents and tastes like vanilla ice cream on crystallised sugar on crushed ice was honestly the best option we experienced from our four poor courses. Each meal lacked a wow factor in taste and presentation. $500 later I'd never return and would inform mates to spend their evenings elsewhere. Sorry Quay but best you throw in your hats mates! \n\nNOT WORTH IT!", - "time": 1437777466 - }, - { - "aspects": [ - { - "rating": 0, - "type": "overall" - } - ], - "author_name": "Ben P", - "author_url": "https://plus.google.com/107541698370492845136", - "language": "en", - "rating": 2, - "text": "Having been to a fair number of fine dining restaurants around the world, Quay is one of those restaurants that provides you with good food but ridiculously small servings.\n\nThe amount you pay for a three course meal is significantly higher than the average price charged by other upscale restaurants so you'd think reasonable-sized servings would be provided - unfortunately, this was not the case.\n\nI appreciate that in general, the serving size at these restaurants will not be large, but I certainly do not expect to be hungry 30 minutes after leaving the restaurant. There is an expectation that patrons should leave feeling full and satisfied rather than yearning for more food and finding the closest fast food outlet outside the restaurant - especially after paying those prices.\n\nFor the most recent upscale restaurants my partner and I have been to, serving sizes have been very reasonable and I don't think Quay have cottoned on to the fact that the servings they provide are simply unacceptable. A distinct lack of adaptability to the ever-changing food industry.\n\nWill not return.", - "time": 1436179623 - } - ], - "scope": "GOOGLE", - "types": [ - "restaurant", - "food", - "point_of_interest", - "establishment" - ], - "url": "https://plus.google.com/105746337161979416551/about?hl=en-US", - "user_ratings_total": 273, - "utc_offset": 600, - "vicinity": "3 Overseas Passenger Terminal, George Street, The Rocks", - "website": "http://www.quay.com.au/" - }, - "status": "OK" -} diff --git a/src/test/resources/com/google/maps/PlaceDetailsResponse.json b/src/test/resources/com/google/maps/PlaceDetailsResponse.json index 08effbce4..922f94cd4 100644 --- a/src/test/resources/com/google/maps/PlaceDetailsResponse.json +++ b/src/test/resources/com/google/maps/PlaceDetailsResponse.json @@ -1,5 +1,9 @@ { "html_attributions": [], + "logging_info": { + "experiment_id": [], + "query_geographic_location": "AU" + }, "result": { "address_components": [ { @@ -29,6 +33,14 @@ "political" ] }, + { + "long_name": "City of Sydney", + "short_name": "City of Sydney", + "types": [ + "administrative_area_level_2", + "political" + ] + }, { "long_name": "New South Wales", "short_name": "NSW", @@ -53,21 +65,107 @@ ] } ], - "adr_address": "5, \u003cspan class=\"street-address\"\u003e48 Pirrama Rd\u003c/span\u003e, \u003cspan class=\"locality\"\u003ePyrmont\u003c/span\u003e \u003cspan class=\"region\"\u003eNSW\u003c/span\u003e \u003cspan class=\"postal-code\"\u003e2009\u003c/span\u003e, \u003cspan class=\"country-name\"\u003eAustralia\u003c/span\u003e", - "formatted_address": "5, 48 Pirrama Rd, Pyrmont NSW 2009, Australia", + "adr_address": "48 Pirrama Rd, Pyrmont NSW 2009, Australia", + "business_status": "OPERATIONAL", + "current_opening_hours": { + "open_now": false, + "periods": [ + { + "close": { + "date": "2023-04-03", + "day": 1, + "time": "1730" + }, + "open": { + "date": "2023-04-03", + "day": 1, + "time": "0830" + } + }, + { + "close": { + "date": "2023-04-04", + "day": 2, + "time": "1730" + }, + "open": { + "date": "2023-04-04", + "day": 2, + "time": "0830" + } + }, + { + "close": { + "date": "2023-04-05", + "day": 3, + "time": "1730" + }, + "open": { + "date": "2023-04-05", + "day": 3, + "time": "0830" + } + }, + { + "close": { + "date": "2023-03-30", + "day": 4, + "time": "1700" + }, + "open": { + "date": "2023-03-30", + "day": 4, + "time": "0830" + } + }, + { + "close": { + "date": "2023-03-31", + "day": 5, + "time": "1700" + }, + "open": { + "date": "2023-03-31", + "day": 5, + "time": "0830" + } + } + ], + "weekday_text": [ + "Monday: 8:30 AM – 5:30 PM", + "Tuesday: 8:30 AM – 5:30 PM", + "Wednesday: 8:30 AM – 5:30 PM", + "Thursday: 8:30 AM – 5:00 PM", + "Friday: 8:30 AM – 5:00 PM", + "Saturday: Closed", + "Sunday: Closed" + ] + }, + "formatted_address": "48 Pirrama Rd, Pyrmont NSW 2009, Australia", "formatted_phone_number": "(02) 9374 4000", "geometry": { "location": { - "lat": -33.866611, - "lng": 151.195832 + "lat": -33.866489, + "lng": 151.1958561 + }, + "viewport": { + "northeast": { + "lat": -33.8655112697085, + "lng": 151.1971156302915 + }, + "southwest": { + "lat": -33.86820923029149, + "lng": 151.1944176697085 + } } }, - "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png", - "id": "4f89212bf76dde31f092cfc14d7506555d85b5c7", + "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", + "icon_background_color": "#7B9EB0", + "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "international_phone_number": "+61 2 9374 4000", - "name": "Google", + "name": "Google Workplace 6", "opening_hours": { - "open_now": true, + "open_now": false, "periods": [ { "close": { @@ -102,7 +200,7 @@ { "close": { "day": 4, - "time": "1730" + "time": "1700" }, "open": { "day": 4, @@ -121,191 +219,56 @@ } ], "weekday_text": [ - "Monday: 8:30 am – 5:30 pm", - "Tuesday: 8:30 am – 5:30 pm", - "Wednesday: 8:30 am – 5:30 pm", - "Thursday: 8:30 am – 5:30 pm", - "Friday: 8:30 am – 5:00 pm", + "Monday: 8:30 AM – 5:30 PM", + "Tuesday: 8:30 AM – 5:30 PM", + "Wednesday: 8:30 AM – 5:30 PM", + "Thursday: 8:30 AM – 5:00 PM", + "Friday: 8:30 AM – 5:00 PM", "Saturday: Closed", "Sunday: Closed" ] }, "photos": [ { - "height": 2322, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/107252953636064841537\"\u003eWilliam Stewart\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAaLQHaytXWS_wVeJ6tKADOZi_JB4tWwA3bD6Noul1-XP1s4KYQoCYy4FN6JP50KKR4yoLcR5U2cKJt-irDQSAOVo_vxBbDG8WiZqUPoSmntNm8_lYxKqioY9japBQSy6dEhB771sWRb2oX1aUQjT30GjkGhRiX9K4InWUgP95i8jzmsyIGDRJFw", - "width": 4128 - }, - { - "height": 960, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/100919424873665842845\"\u003eDonnie Piercey\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAKODF2c2AdVRvPGHc6NjfEtyUxECGWq6uANHQanU0PuUM2Bz0p7JtsreypLZy-YmPW7uDv59z3tBo4gN5AXtOVuUue-6xC---QS3u10Z1xcxw5sDW3Ob5WJ5Lc6W3uK87EhC-X2fqEJq7652OP9-cwuwnGhRcu2V0kGOofU7zRwXHPRI4vMlDbA", - "width": 1280 - }, - { - "height": 1365, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/105932078588305868215\"\u003eMaksym Kozlenko\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAiGyfiUTp-GbdrVEMK0pmxWgOhZCwlU8mL38Y5NHgflI6gbWyIXy-GSQ5VLZMVYDY2Li50HRo9FjKebwRitLAARD0B5huRrJGrfpIkC9nVEnp-gaGi7nqKAHmwiJtewX2EhCDYRdOA6WtZtoLOo6rCCykGhRt4U9FoeebHpXumqb7fk1F9vXA1Q", - "width": 2048 - }, - { - "height": 1131, - "html_attributions": [ - "From a Google User" - ], - "photo_reference": "CmRdAAAA791CwbNORdHpIHCX5T_yr7tylsplV3RkNisNFrD02UX4leEbR0wHio1RgmeNWY8VltcCV5TLhCqGLvIUFqaSXFlL0BMQKiTD7jqTBQhPFtAbkXBKojTXQPp1rK_eTmvXEhB0HNtGkd8Ya2kxJr8OAyQLGhQS9TKpuVK_Fu5uk6DawmgS5kx9nw", - "width": 1600 - }, - { - "height": 2368, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/108508601154030859314\"\u003eLeo Angelo George\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAODFWDa1zoBJY_rDXSjrb2UI-hUVh0mxscKL834w0Bg4mp4qRiHNHz4RlLMpFf0axQuBBXjEe3uRcGIUo3YnkVz1MIQTzlH0A_lIbB2G5jMDCfUndx7kakh8aMYFEwY8MEhB5VqyZGvJDYr2ZhnLuiKyKGhQJ-uaY5Zkrf4IhVmWWVl2V7g5SuQ", - "width": 3200 - }, - { - "height": 2048, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/104177669626132953795\"\u003eJustine OBRIEN\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAy9KJDNcz6vaFf1m5D3lGLaBtDi7dRZATao-hkBRUfCRdlxlH5jbvnXy9Zz-WyOa8W-OWOt7Yv131PBhfDQD7S8MdkCaKVCofeh-Pd44jo9dh_PaXtWdQ7SURqYMaIFEJEhCEPyy1CKyEOUQa1cw2CjL8GhS1egmOLFYRyf0Q2QLBzsqAh065QA", - "width": 1536 - }, - { - "height": 2048, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/104177669626132953795\"\u003eJustine OBRIEN\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAFroavSdllyzoDwigykpSCjN8NS0srG9PksT1DQohG_VvCNEKgjaiyWbj_jB9hL96UYK96mvLFkC9FuGbWkr6tTmHlEhzgNECF_U4vW3dXZGkh6-JdQyM8XDWwPYVbrj_EhDECjEJK_-xBBE06f_3LByXGhQSTsjTJr3g3BIPsjkvG-jlLrumtQ", - "width": 1536 - }, - { - "height": 608, + "height": 2268, "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/116750797999944764767\"\u003eJessica Pfund\u003c/a\u003e" + "redacted" ], - "photo_reference": "CmRdAAAAzmdaTGE050a8jsuKzJUeRk0NohCz5xeXT4cnII_l8b0e-CZ6ohuLqYtP0Jnlbz5t1giBs0L8TSzxMlQVOlwHugwpcnHT_bY2DhRJjX1sV9qxMnPgLjXc-q-vcQLt1lwsEhBNZBGiCgowk1w0ZRoVeGOTGhThrqCB2ucZGPQpUuL2ZVfX0Q7UkQ", - "width": 1080 - }, - { - "height": 612, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/114701241123617315548\"\u003eMargaret L\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAxwN0Si3pLjqfWM4UJTL5zFxR2gXTexxhB6QQM80oP9oX7LI5hgqJu1kgBD4YESRFQA2vw-sodpmydKL11ebZKV-8Ui2WWZFu1LBIe5saL2s18bJHr5cfJWBD1ipZdN66EhBkjcF9SonMuDUySKFQYMtZGhT3qKKoEK5zBiM3shUnc0JbUpoOEQ", - "width": 816 - }, - { - "height": 1536, - "html_attributions": [ - "\u003ca href=\"https://maps.google.com/maps/contrib/104177669626132953795\"\u003eJustine OBRIEN\u003c/a\u003e" - ], - "photo_reference": "CmRdAAAAxRCr9CdOhKRXQ5PhyPcA5MoxlEHHQoKrkUPGLl4NNPBg786-_gijQOmrypR-BHK9qDwb6YlIzVrwaZoXKbeHyP68cyXFNXI5XlMHBb_rIO1vu5O30EygjDVKlOw2eeRGEhBUjxBpvon78Om8JQBCtyuNGhRQzk7EDZV4GoZZNiF7wXnz_7BaoA", - "width": 2048 + "photo_reference": "AUjq9jnZWyyXnszLUn36P7ErS8pDT8ZWhxj3uUTHm2ZJrVJLeIFUInriLqDWOJrx9pG-NVrNh1S90WpqkX1hsWdv6ELxdIrRWOBNjJWlPoB_fHGqm5uHpVrPxYC2htsMAQ2O3pwvwgufA6B-wuiXbExLm7itdNXao6czu0O0_3vEzSjF_yT_", + "width": 4032 } ], "place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4", - "rating": 4.4, - "reference": "CmRaAAAAZdHX6BGZ2MXDkAjVaAG47181Oht-IQedOYARYLzismzjxKQ-pgzWIjQduTqOfzpGhVdPZFVxd_HE1KQuWKIHDE-eK_AKSyrPYOB_QVBC3XhXNPJF4v1iaGzLndZuVPaHEhDvznqDvW_SA4by5Ar1sICBGhTTXbucgN3OxPDY32AaXPHZT7NeZw", + "plus_code": { + "compound_code": "45MW+C8 Pyrmont NSW, Australia", + "global_code": "4RRH45MW+C8" + }, + "rating": 4, + "reference": "ChIJN1t_tDeuEmsRUsoyG83frY4", "reviews": [ { - "aspects": [ - { - "rating": 3, - "type": "overall" - } - ], - "author_name": "Danielle Lonnon", - "author_url": "https://plus.google.com/118257578392162991040", - "language": "en", - "profile_photo_url": "https://lh5.googleusercontent.com/photo.jpg", - "rating": 5, - "relative_time_description": "a month ago", - "text": "As someone who works in the theatre, I don't find the Google offices nerdy, I find it magical and theatrical. Themed rooms with useful props and big sets with unique and charismatic characters. You sure this isn't a theatre company? Oh no wait Google has money, while the performing art does not.", - "time": 1425790392 - }, - { - "aspects": [ - { - "rating": 3, - "type": "overall" - } - ], - "author_name": "Lachlan Martin", - "author_url": "https://plus.google.com/101767769287488554641", - "language": "en", - "profile_photo_url": "https://lh5.googleusercontent.com/-GnfIbf_lBA4/AAAAAAAAAAI/AAAAAAAAeVM/gkqipH58HoM/s128-c0x00010000-cc-rp-mo-ba2/photo.jpg", - "rating": 5, - "relative_time_description": "a day ago", - "text": "The cool-aid here tastes amazing!!! ", - "time": 1439790358 - }, - { - "aspects": [ - { - "rating": 3, - "type": "overall" - } - ], - "author_name": "Rob Mulally", - "author_url": "https://plus.google.com/100839435712919930388", + "author_name": "redacted", + "author_url": "http://google.com/", "language": "en", - "profile_photo_url": "https://lh5.googleusercontent.com/-GnfIbf_lBA4/AAAAAAAAAAI/AAAAAAAAeVM/gkqipH58HoM/s128-c0x00030000-cc-rp-mo-ba2/photo.jpg", - "rating": 5, + "original_language": "en", + "profile_photo_url": "redacted", + "rating": 1, "relative_time_description": "a month ago", - "text": "What can I say, what a great building, cool offices and friendly staff!\nonly had a quick tour but there isn't much missing from this world class modern office.\n\nIf your staff who work here I hope you take advantage of all that it offers , because as a visitor it was a very impressive setup. \n\nThe thing that stood out besides the collaborative area's and beds for resting, was the food availability.\n\nImpressed. 5 Stars.\n", - "time": 1408284830 - }, - { - "aspects": [ - { - "rating": 3, - "type": "overall" - } - ], - "author_name": "Michael Yeung", - "author_url": "https://plus.google.com/104161906493535874402", - "language": "en", - "profile_photo_url": "https://lh5.googleusercontent.com/-GnfIbf_lBA4/AAAAAAAAAAI/AAAAAAAAeVM/gkqipH58HoM/s128-c0x00040000-cc-rp-mo-ba2/photo.jpg", - "rating": 5, - "relative_time_description": "two month ago", - "text": "Best company in the world. The view from the cafeteria is unreal, you take in the entire Darling harbour view like nowhere else :)", - "time": 1435313350 - }, - { - "aspects": [ - { - "rating": 3, - "type": "overall" - } - ], - "author_name": "Marco Palmero", - "author_url": "https://plus.google.com/103363668747424636403", - "language": "en", - "profile_photo_url": "https://lh5.googleusercontent.com/-GnfIbf_lBA4/AAAAAAAAAAI/AAAAAAAAeVM/gkqipH58HoM/s128-c0x00050000-cc-rp-mo-ba2/photo.jpg", - "rating": 5, - "relative_time_description": "a day ago", - "text": "I've been fortunate enough to have visited the Google offices on multiple occasions through the years and I've found this place to be quite awesome. This particular office is the original campus for Google Sydney and they've expanded to the Fairfax building where they've built an even more exciting office!\n\nTotally jealous of their cafeteria and the city views from their office!", - "time": 1413529682 + "text": "redacted", + "time": 1675722932, + "translated": false } ], - "scope": "GOOGLE", "types": [ + "point_of_interest", "establishment" ], - "url": "https://plus.google.com/111337342022929067349/about?hl=en-US", - "user_ratings_total": 98, - "utc_offset": 600, - "vicinity": "5 48 Pirrama Road, Pyrmont", - "website": "https://www.google.com.au/about/careers/locations/sydney/" + "url": "https://maps.google.com/?cid=10281119596374313554", + "user_ratings_total": 973, + "utc_offset": 660, + "vicinity": "48 Pirrama Road, Pyrmont", + "website": "http://google.com/", + "wheelchair_accessible_entrance": true }, "status": "OK" } diff --git a/src/test/resources/com/google/maps/PlaceDetailsResponseForPermanentlyClosedPlace.json b/src/test/resources/com/google/maps/PlaceDetailsResponseForPermanentlyClosedPlace.json index a95a015c6..11a7d75e3 100644 --- a/src/test/resources/com/google/maps/PlaceDetailsResponseForPermanentlyClosedPlace.json +++ b/src/test/resources/com/google/maps/PlaceDetailsResponseForPermanentlyClosedPlace.json @@ -1,7 +1,7 @@ { "html_attributions": [], "result": { - "permanently_closed": true + "business_status": "CLOSED_PERMANENTLY" }, "status": "OK" }