Hey @Brenyth - welcome to Bubble, didn’t want for your post to go unanswered. To confirm, this is very much possible within Bubble.
The Goodreads API is a great place to get started. (Since I’m an avid reader, I’ve played around with the Goodreads API a bit. I’ll convert my learnings into a plugin and share within you in the next few days).
In the meantime, since you’re getting started with Bubble, I really encourage you to explore some of the tutorials, resources listed on Stakk or on my own tutorials site, LearnTo.
Since working with APIs requires a bit of foundational knowledge, it’s good to ensure you have a good foundation on the other aspects of Bubble’s platform.
Yes, I try to learn more about Bubble, I followed tutorials to make a curation site and a site like Reddit, I test different things to understand well. Thank you for your resources!
Since you want to employ some randomness in the results, you can follow the example (as of this message) in the demo (ie. sort by popularity first, then sort randomly). The API only requires a single character be typed in order to retrieve results.
By resume of a book, do you mean a description? The search API doesn’t return descriptions. But it does for specific books.
I enabled three additional GoodReads APIs in the plugin (Get details via ISBN, GoodReads ID or Title). Using this, you can fetch additional details if you use the current cell’s details as a reference point. (Example is in the example app).
Yes, you can display them outside of a repeating group if you use one of the other APIs I enabled (ISBN, GoodReads ID, or Title).
When you display it in another group, you need to have one of those three data points - the ISBN, GoodReads ID or Title). You could either do this from a repeating group or if you know this off hand (ie. have it saved in the database), it should work just fine.
I just set up an example in the app (ie. to view the details of a book within a popup).
So, I put text for the title of the book, I put an image for the cover of the book, and I put another text for the description of the book.
I connected all this to the API.
But, as you say in a previous message, there is a need to do a search to get a result.
So, my “strategy” is to put a search box with a default search and hide that search box.
But, I can’t figure out how you linked your search box to your repeating group. I don’t see any connection between the two. Not in the workflow, not in dynamic data, not anywhere.
How does the search box display the results in the repeating group?
And even if I success to show the result in the repeating group how the application will display a book randomly without prior research afterward?
(Note: for illustration, I’d make these changes directly in your app, but it’s currently set to read only).
Getting data from an external API is a lot like fetching data from your own database. For example, say I have a repeating group and I want to display a list of users in that repeating group’s cells. So, I define the “type” of data as users. But, beyond this, I need to define the data source (ie. what list of users exactly am I going to display.
In the case of this API, there are two methods for retrieving information
Search_Global-Authors_and_Titles
Get Reviews (by ISBN, by Title, by GoodReads ID).
When we want to retrieve a list of books (ie. content to go in a repeating group), we would use the “Search_Global-Authors_and_Titles” as our data type. Then, we use the “Get data from an external API” option and select the corresponding API call (Search_Global-Authors_and_Titles). Once you do so, you see an input. (This is where your search term goes).
In the case of displaying an individual book, you largely follow the same process. (Except you’re no longer displaying a list, but a single value). Similar to the above, you provide some value for the search.
To generate “randomness”, this is a function that you would build on your end. The easiest approach is to have a table in your Bubble database of random values (ex. author’s names, subjects, words, etc) that you use for the API call’s search value.
Also, I just recorded a video walkthrough of the plugin setup. You may have already resolved these points. But sharing below in case others stumble on this thread.
@dan1 is this plugin still active and working? I have installed it but it doesn’t seem to retrieve any data from GoodReads. I see the link to the Bubble editor you previously shares is also no longer available so just trying to work out if I must set up my own API or I can use the one you built.