diff --git a/places.go b/places.go index e682101..4826718 100644 --- a/places.go +++ b/places.go @@ -323,8 +323,6 @@ type PlacesSearchResult struct { Icon string `json:"icon,omitempty"` // PlaceID is a textual identifier that uniquely identifies a place. PlaceID string `json:"place_id,omitempty"` - // Scope indicates the scope of the PlaceID. - Scope string `json:"scope,omitempty"` // Rating contains the place's rating, from 1.0 to 5.0, based on aggregated user // reviews. Rating float32 `json:"rating,omitempty"` @@ -336,9 +334,6 @@ type PlacesSearchResult struct { OpeningHours *OpeningHours `json:"opening_hours,omitempty"` // Photos is an array of photo objects, each containing a reference to an image. Photos []Photo `json:"photos,omitempty"` - // AltIDs — An array of zero, one or more alternative place IDs for the place, with - // a scope related to each alternative ID. - AltIDs []AltID `json:"alt_ids,omitempty"` // PriceLevel is the price level of the place, on a scale of 0 to 4. PriceLevel int `json:"price_level,omitempty"` // Vicinity contains a feature name of a nearby location. @@ -353,16 +348,6 @@ type PlacesSearchResult struct { ID string `json:"id,omitempty"` } -// AltID is the alternative place IDs for a place. -type AltID struct { - // PlaceID is the APP scoped Place ID that you received when you initially created - // this Place, before it was given a Google wide Place ID. - PlaceID string `json:"place_id,omitempty"` - // Scope is the scope of this alternative place ID. It will always be APP, - // indicating that the alternative place ID is recognised by your application only. - Scope string `json:"scope,omitempty"` -} - var placeDetailsAPI = &apiConfig{ host: "https://maps.googleapis.com", path: "/maps/api/place/details/json", @@ -469,8 +454,6 @@ type PlaceDetailsResult struct { Icon string `json:"icon,omitempty"` // PlaceID is a textual identifier that uniquely identifies a place. PlaceID string `json:"place_id,omitempty"` - // Scope indicates the scope of the PlaceID. - Scope string `json:"scope,omitempty"` // Rating contains the place's rating, from 1.0 to 5.0, based on aggregated user // reviews. Rating float32 `json:"rating,omitempty"` @@ -482,9 +465,6 @@ type PlaceDetailsResult struct { OpeningHours *OpeningHours `json:"opening_hours,omitempty"` // Photos is an array of photo objects, each containing a reference to an image. Photos []Photo `json:"photos,omitempty"` - // AltIDs — An array of zero, one or more alternative place IDs for the place, with - // a scope related to each alternative ID. - AltIDs []AltID `json:"alt_ids,omitempty"` // PriceLevel is the price level of the place, on a scale of 0 to 4. PriceLevel int `json:"price_level,omitempty"` // Vicinity contains a feature name of a nearby location. diff --git a/places_test.go b/places_test.go index 54e168e..3118651 100644 --- a/places_test.go +++ b/places_test.go @@ -713,7 +713,6 @@ func TestPlaceDetails(t *testing.T) { "time" : 1441848853 } ], - "scope" : "GOOGLE", "types" : [ "restaurant", "food", "point_of_interest", "establishment" ], "url" : "https://plus.google.com/105746337161979416551/about?hl=en-US", "user_ratings_total" : 275, @@ -845,7 +844,6 @@ func TestPlaceDetailsUTCOffsetAbsent(t *testing.T) { "place_id" : "ChIJ02qnq0KuEmsRHUJF4zo1x4I", "price_level" : 4, "rating" : 4.1, - "scope" : "GOOGLE", "types" : [ "restaurant", "food", "point_of_interest", "establishment" ], "url" : "https://plus.google.com/105746337161979416551/about?hl=en-US", "user_ratings_total" : 275, diff --git a/types.go b/types.go index ff89bf1..78a5ab9 100644 --- a/types.go +++ b/types.go @@ -509,7 +509,6 @@ type PlaceDetailsFieldMask string const ( PlaceDetailsFieldMaskAddressComponent = PlaceDetailsFieldMask("address_component") PlaceDetailsFieldMaskADRAddress = PlaceDetailsFieldMask("adr_address") - PlaceDetailsFieldMaskAltID = PlaceDetailsFieldMask("alt_id") PlaceDetailsFieldMaskBusinessStatus = PlaceDetailsFieldMask("business_status") PlaceDetailsFieldMaskFormattedAddress = PlaceDetailsFieldMask("formatted_address") PlaceDetailsFieldMaskFormattedPhoneNumber = PlaceDetailsFieldMask("formatted_phone_number") @@ -536,7 +535,6 @@ const ( PlaceDetailsFieldMaskRatings = PlaceDetailsFieldMask("rating") PlaceDetailsFieldMaskUserRatingsTotal = PlaceDetailsFieldMask("user_ratings_total") PlaceDetailsFieldMaskReviews = PlaceDetailsFieldMask("reviews") - PlaceDetailsFieldMaskScope = PlaceDetailsFieldMask("scope") PlaceDetailsFieldMaskTypes = PlaceDetailsFieldMask("types") PlaceDetailsFieldMaskURL = PlaceDetailsFieldMask("url") PlaceDetailsFieldMaskUTCOffset = PlaceDetailsFieldMask("utc_offset") @@ -552,8 +550,6 @@ func ParsePlaceDetailsFieldMask(placeDetailsFieldMask string) (PlaceDetailsField return PlaceDetailsFieldMaskAddressComponent, nil case "adr_address": return PlaceDetailsFieldMaskADRAddress, nil - case "alt_id": - return PlaceDetailsFieldMaskAltID, nil case "business_status": return PlaceDetailsFieldMaskBusinessStatus, nil case "formatted_address": @@ -606,8 +602,6 @@ func ParsePlaceDetailsFieldMask(placeDetailsFieldMask string) (PlaceDetailsField return PlaceDetailsFieldMaskUserRatingsTotal, nil case "reviews": return PlaceDetailsFieldMaskReviews, nil - case "scope": - return PlaceDetailsFieldMaskScope, nil case "types": return PlaceDetailsFieldMaskTypes, nil case "url": @@ -639,7 +633,6 @@ type PlaceSearchFieldMask string // The individual Place Search Field Masks. const ( - PlaceSearchFieldMaskAltID = PlaceSearchFieldMask("alt_id") PlaceSearchFieldMaskBusinessStatus = PlaceSearchFieldMask("business_status") PlaceSearchFieldMaskFormattedAddress = PlaceSearchFieldMask("formatted_address") PlaceSearchFieldMaskGeometry = PlaceSearchFieldMask("geometry") @@ -673,8 +666,6 @@ const ( // PlaceSearchFieldMask. func ParsePlaceSearchFieldMask(placeSearchFieldMask string) (PlaceSearchFieldMask, error) { switch strings.ToLower(placeSearchFieldMask) { - case "alt_id": - return PlaceSearchFieldMaskAltID, nil case "formatted_address": return PlaceSearchFieldMaskFormattedAddress, nil case "geometry":