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

Get the avarage rating #16

Closed
artur-grigoryan-cgn opened this issue Mar 17, 2021 · 8 comments
Closed

Get the avarage rating #16

artur-grigoryan-cgn opened this issue Mar 17, 2021 · 8 comments

Comments

@artur-grigoryan-cgn
Copy link

Hello,
is it possible to get the avarage rating of a location and nothing more?

@simonneutert
Copy link
Owner

https://developers.google.com/maps/documentation/places/web-service/details#PlaceDetailsResponses

check the "rating" attribute, I guess it is possible then

@simonneutert
Copy link
Owner

debug code around here, console.log(place):
var filteredReviews = filterReviewsByMinRating(place.reviews);

then drilling in, by checking "place.rating" and you should be good. please share your results @artur-grigoryan-cgn (a screenshot would be awesome 👍 )

I might add this as a feature via options then 💪

@simonneutert
Copy link
Owner

var filteredReviews = filterReviewsByMinRating(place.reviews);

@artur-grigoryan-cgn
Copy link
Author

artur-grigoryan-cgn commented Mar 18, 2021

The rating-attribute did it.
console.log(place.rating); on line 175 did it. i can write a function for it and create a request if you want. :)

@artur-grigoryan-cgn
Copy link
Author

artur-grigoryan-cgn commented Mar 18, 2021

hrf
I finished it now. Also also added the overall count of reviews and half stars if the count is a float.

@simonneutert
Copy link
Owner

i would love to receive a pull request, it makes me happy so many people enjoy the tool 🍻 ❤️ @artur-grigoryan-cgn

@artur-grigoryan-cgn
Copy link
Author

artur-grigoryan-cgn commented Mar 18, 2021

I wrote you an email. Could you check your mailbox? :)

@simonneutert
Copy link
Owner

https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork

und gib der repo bitte einen stern 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants