I am using the Google Places API to fetch data for info such as reviews and opening hours for different businesses (cafes and restaurants) for my start up.
This API costs a fortune to run so I have set daily limits. Downside is the limit is so low the API doesn’t really work at all.
I would love to find a way to save this info to the bubble database once a month ad juts pull it from there so it isn’t running each time the page is loaded. I have tried a few times but I find it really confusing.
Has anyone found any handy resources or tutorials on how to do this step by step?
Yes that sounds like what I am looking at doing. I am looking for a tutorial on how to set up the workflow to save to the database though and they seem to be a few steps ahead of that.
So when you set up your API call, Google responds back to it with a list of places. Those places will a certain datatype now available in your app to use.
You can create some new custom datatype in your app, and one of the fields can be the SAME datatype as your Google place datatype. (Make that field a list)
Now you can make an API call, create a thing in your database, and set the thing’s list field to the API calls list of places.
Now all that’s left is make some logic so you aren’t always storing it in your database.
So I recommended in that other thread, is have some date field (or use the Creation Date field), check if its within the time period you are okay with, if so use the database data. If not, make the API call and store it in the database. Then it is there to use until the expiration date is up again.