NickPriv / FryRankBackend

A back-end Java application allowing users to create and view reviews for french fries at restaurants
https://fryrank.oxyserver.com
0 stars 0 forks source link

[Enhancement] Minimize API calls to Google by reusing specific restaurant details #31

Closed NickPriv closed 1 week ago

NickPriv commented 7 months ago

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.

NickPriv commented 7 months ago

Related conversation: https://github.com/NickPriv/FryRank/pull/30#discussion_r1456880899

NickPriv commented 4 weeks ago

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'.