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

feat: add relative_time_description property to PlaceReview #273

Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions places.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@ type PlaceReview struct {
// Rating the user's overall rating for this place. This is a whole number, ranging
// from 1 to 5.
Rating int `json:"rating,omitempty"`
// RelativeTimeDescription the time that the review was submitted in text, relative
// to the current time.
RelativeTimeDescription string `json:"relative_time_description,omitempty"`
// Text is the user's review. When reviewing a location with Google Places, text
// reviews are considered optional. Therefore, this field may by empty. Note that
// this field may include simple HTML markup.
Expand Down
4 changes: 2 additions & 2 deletions places_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func TestPlaceDetails(t *testing.T) {
"Sunday: 12:00 – 8:45 PM"
]
},
"secondary_opening_hours": [
"secondary_opening_hours": [
{
"open_now": true,
"periods": [
Expand Down Expand Up @@ -852,7 +852,7 @@ func TestPlaceDetails(t *testing.T) {
if placeID != resp.PlaceID {
t.Errorf("expected %+v, was %+v", placeID, resp.PlaceID)
}

if !*&resp.ServesDinner {
t.Errorf("Expected ServesDinner to be true")
}
Expand Down