Skip to content

Commit f2f6eaa

Browse files
authored
fix: remove old fields #201 (#247)
1 parent 9c4a66a commit f2f6eaa

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

places.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,6 @@ type PlacesSearchResult struct {
323323
Icon string `json:"icon,omitempty"`
324324
// PlaceID is a textual identifier that uniquely identifies a place.
325325
PlaceID string `json:"place_id,omitempty"`
326-
// Scope indicates the scope of the PlaceID.
327-
Scope string `json:"scope,omitempty"`
328326
// Rating contains the place's rating, from 1.0 to 5.0, based on aggregated user
329327
// reviews.
330328
Rating float32 `json:"rating,omitempty"`
@@ -336,9 +334,6 @@ type PlacesSearchResult struct {
336334
OpeningHours *OpeningHours `json:"opening_hours,omitempty"`
337335
// Photos is an array of photo objects, each containing a reference to an image.
338336
Photos []Photo `json:"photos,omitempty"`
339-
// AltIDs — An array of zero, one or more alternative place IDs for the place, with
340-
// a scope related to each alternative ID.
341-
AltIDs []AltID `json:"alt_ids,omitempty"`
342337
// PriceLevel is the price level of the place, on a scale of 0 to 4.
343338
PriceLevel int `json:"price_level,omitempty"`
344339
// Vicinity contains a feature name of a nearby location.
@@ -353,16 +348,6 @@ type PlacesSearchResult struct {
353348
ID string `json:"id,omitempty"`
354349
}
355350

356-
// AltID is the alternative place IDs for a place.
357-
type AltID struct {
358-
// PlaceID is the APP scoped Place ID that you received when you initially created
359-
// this Place, before it was given a Google wide Place ID.
360-
PlaceID string `json:"place_id,omitempty"`
361-
// Scope is the scope of this alternative place ID. It will always be APP,
362-
// indicating that the alternative place ID is recognised by your application only.
363-
Scope string `json:"scope,omitempty"`
364-
}
365-
366351
var placeDetailsAPI = &apiConfig{
367352
host: "https://maps.googleapis.com",
368353
path: "/maps/api/place/details/json",
@@ -469,8 +454,6 @@ type PlaceDetailsResult struct {
469454
Icon string `json:"icon,omitempty"`
470455
// PlaceID is a textual identifier that uniquely identifies a place.
471456
PlaceID string `json:"place_id,omitempty"`
472-
// Scope indicates the scope of the PlaceID.
473-
Scope string `json:"scope,omitempty"`
474457
// Rating contains the place's rating, from 1.0 to 5.0, based on aggregated user
475458
// reviews.
476459
Rating float32 `json:"rating,omitempty"`
@@ -482,9 +465,6 @@ type PlaceDetailsResult struct {
482465
OpeningHours *OpeningHours `json:"opening_hours,omitempty"`
483466
// Photos is an array of photo objects, each containing a reference to an image.
484467
Photos []Photo `json:"photos,omitempty"`
485-
// AltIDs — An array of zero, one or more alternative place IDs for the place, with
486-
// a scope related to each alternative ID.
487-
AltIDs []AltID `json:"alt_ids,omitempty"`
488468
// PriceLevel is the price level of the place, on a scale of 0 to 4.
489469
PriceLevel int `json:"price_level,omitempty"`
490470
// Vicinity contains a feature name of a nearby location.

places_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ func TestPlaceDetails(t *testing.T) {
713713
"time" : 1441848853
714714
}
715715
],
716-
"scope" : "GOOGLE",
717716
"types" : [ "restaurant", "food", "point_of_interest", "establishment" ],
718717
"url" : "https://plus.google.com/105746337161979416551/about?hl=en-US",
719718
"user_ratings_total" : 275,
@@ -845,7 +844,6 @@ func TestPlaceDetailsUTCOffsetAbsent(t *testing.T) {
845844
"place_id" : "ChIJ02qnq0KuEmsRHUJF4zo1x4I",
846845
"price_level" : 4,
847846
"rating" : 4.1,
848-
"scope" : "GOOGLE",
849847
"types" : [ "restaurant", "food", "point_of_interest", "establishment" ],
850848
"url" : "https://plus.google.com/105746337161979416551/about?hl=en-US",
851849
"user_ratings_total" : 275,

types.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ type PlaceDetailsFieldMask string
509509
const (
510510
PlaceDetailsFieldMaskAddressComponent = PlaceDetailsFieldMask("address_component")
511511
PlaceDetailsFieldMaskADRAddress = PlaceDetailsFieldMask("adr_address")
512-
PlaceDetailsFieldMaskAltID = PlaceDetailsFieldMask("alt_id")
513512
PlaceDetailsFieldMaskBusinessStatus = PlaceDetailsFieldMask("business_status")
514513
PlaceDetailsFieldMaskFormattedAddress = PlaceDetailsFieldMask("formatted_address")
515514
PlaceDetailsFieldMaskFormattedPhoneNumber = PlaceDetailsFieldMask("formatted_phone_number")
@@ -536,7 +535,6 @@ const (
536535
PlaceDetailsFieldMaskRatings = PlaceDetailsFieldMask("rating")
537536
PlaceDetailsFieldMaskUserRatingsTotal = PlaceDetailsFieldMask("user_ratings_total")
538537
PlaceDetailsFieldMaskReviews = PlaceDetailsFieldMask("reviews")
539-
PlaceDetailsFieldMaskScope = PlaceDetailsFieldMask("scope")
540538
PlaceDetailsFieldMaskTypes = PlaceDetailsFieldMask("types")
541539
PlaceDetailsFieldMaskURL = PlaceDetailsFieldMask("url")
542540
PlaceDetailsFieldMaskUTCOffset = PlaceDetailsFieldMask("utc_offset")
@@ -552,8 +550,6 @@ func ParsePlaceDetailsFieldMask(placeDetailsFieldMask string) (PlaceDetailsField
552550
return PlaceDetailsFieldMaskAddressComponent, nil
553551
case "adr_address":
554552
return PlaceDetailsFieldMaskADRAddress, nil
555-
case "alt_id":
556-
return PlaceDetailsFieldMaskAltID, nil
557553
case "business_status":
558554
return PlaceDetailsFieldMaskBusinessStatus, nil
559555
case "formatted_address":
@@ -606,8 +602,6 @@ func ParsePlaceDetailsFieldMask(placeDetailsFieldMask string) (PlaceDetailsField
606602
return PlaceDetailsFieldMaskUserRatingsTotal, nil
607603
case "reviews":
608604
return PlaceDetailsFieldMaskReviews, nil
609-
case "scope":
610-
return PlaceDetailsFieldMaskScope, nil
611605
case "types":
612606
return PlaceDetailsFieldMaskTypes, nil
613607
case "url":
@@ -639,7 +633,6 @@ type PlaceSearchFieldMask string
639633

640634
// The individual Place Search Field Masks.
641635
const (
642-
PlaceSearchFieldMaskAltID = PlaceSearchFieldMask("alt_id")
643636
PlaceSearchFieldMaskBusinessStatus = PlaceSearchFieldMask("business_status")
644637
PlaceSearchFieldMaskFormattedAddress = PlaceSearchFieldMask("formatted_address")
645638
PlaceSearchFieldMaskGeometry = PlaceSearchFieldMask("geometry")
@@ -673,8 +666,6 @@ const (
673666
// PlaceSearchFieldMask.
674667
func ParsePlaceSearchFieldMask(placeSearchFieldMask string) (PlaceSearchFieldMask, error) {
675668
switch strings.ToLower(placeSearchFieldMask) {
676-
case "alt_id":
677-
return PlaceSearchFieldMaskAltID, nil
678669
case "formatted_address":
679670
return PlaceSearchFieldMaskFormattedAddress, nil
680671
case "geometry":

0 commit comments

Comments
 (0)