Call API inside the element in Bubble Plugin

Search for a command to run...

No comments yet. Be the first to comment.
I have included all the information related to how you can build the Bubble plugin in this series. Check my course on how to build plugin from scratch- https://nocodetalks.co/bubbleplugin
If you have ever attempted to work with the custom object list in the Bubble plugin editor, you know it has become a nightmare to manage. Not anymore. So let's assume you are building the plugin that consists of client-side element and you are passi...
Most websites use CSS :hover for hover effects. You can see them in the stylesheet, copy them, move on. Framer doesn't do that. Framer uses a React animation library (Framer Motion) with a whileHove

https://www.youtube.com/watch?v=63Lkpw8fGAw Introduction to Xano: A No-Code Backend Solution When it comes to choosing the right backend service for your project, Xano emerges as a noteworthy contender. This video explores the various facets of Xan...
Hi Everyone, This newsletter will be a little different from the ones before. In this edition, I'm excited to launch the Xano Cohort program, which I will be running. The program will start on May 6th for 6 weeks. Why I am starting this: Whenever I...

Learn what workload units are in Bubble, how they are calculated, and discover actionable strategies to optimize and reduce your app's workload units for better performance and cost efficiency. One think before moving forward- If you are reading thi...

There are instances when you may need to access an element created within the Bubble editor. For example, in a plugin, you might want to return the number of characters a user types into an input element. Follow these steps: Step 1: Enable the "Expos...

There are times when you need to call the API within the element section instead of the API section, but how do you do it?
Let me demonstrate with an example.
I will call this GET API: https://dummy.restapiexample.com/api/v1/employees
We will be using jQuery for this purpose.
$.getJSON('https://dummy.restapiexample.com/api/v1/employees')
.done(function(json_data) {
//success
console.log("data is " , json_data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
//come here if there is any error while calling the api
console.error("Error: " + textStatus + ", " + errorThrown);
});
POST API Example-
$.post('https://dummy.restapiexample.com/create', {name:'test',salary:'123',age:'23'} )
.done(function(response) {
console.log('Success:', response);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.error('Error:', textStatus, errorThrown);
});
That's all for this blog. Subscribe for more future updates. Thank you!
Follow me on Twitter.
Checkout My Bubble Plugin Course - Use coupon code "THEBUBBLEGROUP" at checkout for 10% discount.