Android food recipes app tutorial using retrofit|mvvm|edamam|api #9

'

#Edamam #Retrofit #Android #Food #MVVM #API

This is a series of video tutorials in which we are going to create an android recipes application that will allow us to search over 2 million recipes online using Android Studio, Retrofit, and Edamam API'S website. Get up to date with the latest video upload by turning on the notification bell icon from this channel.

REQUIREMENTS: --Java JDK --Android Studio --Retrofit library --Background knowledge of Java language

Hello everyone welcome back again to our retrofit android food recipes search application that we are going to create so if you are just into this build and want to create an application like this please be sure to the complete videos that I have updated on my youtube channel so I will be updated the playlist so you can watch the entire videos so without saying too much so let's get to our android studio this is up on the previous video actually we have already created also the class which will hold another class inside of this class so uh to watch my previous video so you will not get lost anywhere and our uh tutorial so uh back to our adapter so you need to add an if statement here to check to make sure that to check if our recipes or our array has a content recipes so this is an array so we need to check our array if it has a content so if recipes is not equal to null so meaning that it has a content then we need to return the recipes to the array that size so we just need to return the size of the recipes so now uh gather nothing that we need to do so now we need to create another uh package here so I'll name it response okay inside of this response package I will create another class search recipes I will go to search recipes and click ok now I need to create another package just name this apis so this will be the package inside of this we need to create another class but kind will be interfaced okay I will call this one epi client so this is an interface okay we have a responsibility for the search I need to create another but let's call it uterus click ok then I will create a job API so this will hold okay so actually, I have a blog I'll just go to the documentation so in here, we are going to go to the search recipe and then you need to define it into the API so we can access it so actually this APIs we need to use the, okay so you can just use the get API so but first, we need to

create a call is because you put moments class inside of this line so otherwise uh if you have put the slash at the end of this so now we need to define the query so exposed we have a parameter type query so since this value is required so we need to define it into the API client so we need to type add query what we are going to query first will be the type so this one so the type parameter so we need to create it for the type so you can pass type and after that, we need to define what they type so the type will be a string so we need to define it as a string so now the query so we have it here so since this is required in the query and then we need to define the type will be a string of course so we name it queries where here is define it by query and the next will be the uh the app id so be sure to write it with the same spelling,

okay so you can just go and add it as a query we need to pass the app id the one will be the so we have this one copy so remember that it is required so we need to add it to our interface so key up so now this uh this is only the required parameter so now once you've already done that so for this tutorial, we will just leave it like this I'll just continue it on the next video so, for now, we have successfully created the API client which is an interface type so this one will send a call so retrofit call to the online server and we are going to provide this later on when we use this one in the retrofit so this is now for today's in this video guys and I hope you

learned something within this tutorial so please be sure to subscribe to my channel and if you have some comments or confusion about my tutorial please leave them in the comment section if you want to get access to the codes that I have already created so you can just write the request in the comment box so I can update it into my blog please be sure to subscribe if you want to learn how you can create a complete uh application like what we have already what I have already created so be sure to uh uh turn on also the notification bell so every time I upload a new video you will get thanks for watching guys I hope to see you in the next video

Post a Comment

0 Comments