Skip to content

Commit

Permalink
fix: Add Language to FindPlaceFromTextRequest (#254)
Browse files Browse the repository at this point in the history
This adds the Language field to FindPlaceFromTextRequest.  For more
information, see:
https://developers.google.com/maps/documentation/places/web-service/search
  • Loading branch information
tekkamanendless authored Mar 29, 2021
1 parent 621d707 commit 6584713
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions places.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,9 @@ type FindPlaceFromTextRequest struct {
// should be filled in.
Fields []PlaceSearchFieldMask

// Language specifies the language in which to return results. Optional.
Language string

// LocationBias is the type of location bias to apply to this request
LocationBias FindPlaceFromTextLocationBiasType

Expand Down Expand Up @@ -950,6 +953,10 @@ func (r *FindPlaceFromTextRequest) params() url.Values {
q.Set("fields", strings.Join(placeSearchFieldMasksAsStringArray(r.Fields), ","))
}

if r.Language != "" {
q.Set("language", r.Language)
}

if r.LocationBias != "" {
switch r.LocationBias {
case FindPlaceFromTextLocationBiasIP:
Expand Down

0 comments on commit 6584713

Please sign in to comment.