I’ve set up a custom API using the Bubble API Connector that scrapes websites like Google, Yelp, etc for review information (star ratings, reviewers’ names, the full text of their reviews, etc). I believe I have structured the calls correctly, as they are returning JSON objects.
Here’s the thing: I want to display the JSON data that is returned on Bubble elements. The goal would be to make something that (loosely) looks like this:
It is what I meant…and that’s what I thought I should be doing.
One more question, though: the API I am using has several steps. First, you have to add a job to the queue and pass the URL of the review site you want in as a parameter by POSTing to the API.
After the job is added to the queue, you need to call the API again to GET the results of the previous job, which displays the JSON objects whose data I want to use (API documentation here - may do a better job of explaining it than I can )
So, I have this multi-step API call process.
Is there a best way to set this up? Should I make this entire sequence of multiple calls an API Workflow and then call that API Workflow when the button to retrieve reviews is clicked?
Update: I figured out that I am calling the API just fine, even with multiple steps. The only problem is that I have to wait until the 2nd step of the API (the “get results” step) is finished before I can set the values of Bubble elements based on the JSON data that the API returns.
Is there any way to do this in Bubble? To wait until an API call has finished and returned data before Making Changes to a Thing?
@romanmg, you seem to have done a lot with APIs – is what I’m wanting to do possible?