Closed NickPriv closed 1 week ago
Related conversation: https://github.com/NickPriv/FryRank/pull/30#discussion_r1456880899
This story is necessary to reduce the quantity of the below error from Google:
Error: Quota exceeded for quota metric 'GetPlaceRequest' and limit 'GetPlaceRequest per minute' of service 'places.googleapis.com' for consumer 'project_number:974382797798'.
When we make a text search, we get a list of Places with certain fields returned (whatever we specify in the field mask). Then, when we click into a specific restaurant, we're calling Google again to get the same details for that specific place.
We can reuse the details we already have instead of making that second call. However, if the user goes directly to the restaurant's reviews page, then we DO actually need to make the API call to get the restaurant's details.
Acceptance Criteria
API calls are only made to Google from the restaurant's reviews page if those details were not already retrieved using the Text Search API.