All Content
Timespan
explore our new search
Creating a Cocktail Finder App: Part 1 - API Development
Image Source: Shutterstock.com
Developer Tools
Sep 29, 2023 4:15 PM

Creating a Cocktail Finder App: Part 1 - API Development

by HubSite 365 about Lewis Baybutt [MVP]

Power Platform Consultant 💬 at HybrIT Services | Low Code Lewis 👨🏻‍💻 | Microsoft 365 | Power Platform | SharePoint | Dynamics 365 | #CommunityRocks 🚀

Citizen DeveloperDeveloper Tools

Explore building a fun cocktails finding app using Power Apps and The Cocktail DB API.

Developing a Cocktail Finding Application

In a recent blog post by MVP Lewis Baybutt, a new, fascinating experiment with Power Apps was shown - an app for finding cocktails. With the assistance of a virtually free API returning drinks data, the author takes us through building a cocktail search app. Users can easily find detailed information about cocktails.

This series of articles will guide the reader step-by-step in making their own version of a cocktails finding app. The blog post mainly elaborates on obtaining the necessary API and building the primary workflow to put it to the test.

For those curious about the outcome, here's a glimpse of what will be generated at the end of the blog series. Moving onto the API, it's mentioned to be the primary solution we're employing for this application. Courtesy of Rapid API, it's dubbed The Cocktail DB API.

upon registration for an account with Rapid API, one can play around in the playground for testing purposes. The author wishes to search for cocktails based on specific contents of one's home bar, which is feasible using the API, employing a GET call with 'i' as the query parameter. An example of usage depicts filtering drinks based on specified alcohol or ingredients.

Paying closer attention to the code it generates, they reveal it's utilizing fetch via JavaScript. Dissecting this, we get to learn its translation when we have to make our flow using Power Automate. Key focuses include the method, headers, and request URL.

Explaining these constituents further, it's specified that GET as the method is needed, as we call the API to fetch data. The headers to be utilized in the object come after the headers property. Lastly, the request URL required format is given as an example, replacing Specified_Alcohol with input parameter value.

The author then proceeds in crafting a solution and button flow. Initiating through establishing a solution in a development environment called Cocktails, and author as the publisher. Following, a new cloud flow will be generated using an instant trigger. Adding an HTTP step for the API call is the next target task.

Setting the method to GET is a must. Afterwards, the mentioned URL format and headers values will be used. The more detailed part of testing the API's response is left to the reader, providing the information required to run their own test.

Finally, the API appears to work, returning a good response where the body contains an array of drinks. Looking into the future, the author hints in the upcoming post they will start to create an app. Changing the current flow from button-triggered to Power Apps triggered to utilize the API data in the app.

The Future of Power App Development

Apps like the cocktail finder are just the beginning of a wave of innovative applications under development utilizing Power Apps. From food delivery to cocktail making, the possibilities are endless. As we increasingly rely on digital solutions, such examples highlight the ease of creating user-friendly, personalized solutions that cater to niche markets. It's this type of creative thinking that paints a lively future picture for software development, offering tailored, functional solutions for a myriad of user needs. Stay tuned for more exciting developments within this space.

Read the full article Building a cocktails finding app – Part 1 – The API

Developer Tools - Creating a Cocktail Finder App: Part 1 - API Development

Learn about Building a cocktails finding app – Part 1 – The API

The creation of a cocktail discovery application is the focus of this blog post. Here, utilizing Power Apps in conjunction with a freely available API for drink returns is discussed. The application's primary function is to enable users to search for cocktails and gather information about them. This learning would prove beneficial for those interested in experimenting with Power Apps or desiring to create practical applications for daily use.

As we delve further into the topic, the API used plays a critical role. The Cocktail DB API from Rapid API is employed in this case. For usage access, you must register an account with Rapid API. The solution being created will allow for cocktail selection based on spirits or alcohol stored in the user’s home, demonstrating a practical and helpful application.

The API employs a GET call with 'i' as the search query parameter. It is illustrated in the blog post using a filter to find drinks where the specified alcohol or ingredient is the key. Following this, the method, headers, and request URL specifics of the code snippet are delved into. The aim is to understand and replicate these when building a flow in Power Automate.

Attention is particularly focused on the method, which utilizes GET as it retrieves data from the API. The headers in the object are following along with the headers property in the options variable. Finally, the Request URL that is needed is detailed, showing that the Specified_Alcohol is replaced with an input parameter value for the flow. This streamlines the pushing of a search value from the app to the flow.

Transitioning to the solution-building segment, the creation of a solution in a development environment is initiated, referred to as Cocktails. The publisher assigned is the author themselves. An instant trigger cloud flow within the solution is the next step. An HTTP step is then included to call the API and apply a test. The URL, method, and headers are defined as per previous explanations.

Being mindful of the X-RapidAPI-Key header value, it is supposed to be copied after signing up for Rapid API. Attention is drawn to the fact that post 100 API calls; charging begins per call. Beyond this, no further additions are mandated, and the API's response upon the flow test is eagerly anticipated.

Upon evaluation, a successful response is received with an array of 'drinks' contained within the body. The following post in the series will deal with converting the flow from a button-triggered flow to a Power Apps-triggered flow. This enables data pushing from the API call into the app. Readers are therefore urged to subscribe for updates on this fascinating application build journey.

This blog post will surely appeal to aspiring app creators, Power App enthusiasts, and even cocktail enthusiasts. By breaking down the technical steps of using API and Power Apps, it gathers interest and initiates practical learning among its readers. So why wait? Dive into Power Apps and start mixing ingredients to your perfect cocktail finding application!

More links on about Building a cocktails finding app – Part 1 – The API

Building a cocktails finding app - Part 1 - The API
Apr 9, 2023 — In this series of blog posts I'll show you how you can make your own cocktails finding app! In this post we'll focus primarily on getting hold ...
Building a cocktails finding app – Part 1 – The API
Apr 14, 2023 — In this series of blog posts I'll show you how you can make your own cocktails finding app! In this post we'll focus primarily on getting hold ...
Building a cocktails finding app – Part 1 – The API
So! I recently had some spare time and wanted to try something fun with Power Apps. After spotting a cool, and pretty much free API for returning drinks,

Keywords

Building a cocktails finding app, API development, Cocktail App API, Part 1- API building, Mobile App Development, Cocktail Finder Application, Mixology App API, API for cocktail recipes, Developing API for apps, Cocktails API integration