‫The nice thing of this API is that it allows the nice thing of this APA is that it allows you to have
‫some freedom and gives you like interesting endpoints that you can use to get interesting apps.
‫So for example, you can have some tips, you can have the full list of texts and maybe even show them
‫in a separate screen.
‫You can even list similarity.
‫So by sending the recipe ID, you get similar recipes to show like more like this or something like
‫that.
‫Yeah, such section.
‫So you can extend this app actually yourself, even if it's not covered in this course by just using
‫this endpoint and getting more data to draw here and it will become much more interesting.
‫But for now, we will just limit it to some extent.
‫And what I want to achieve is to have five items here from one category, and we will decide now and
‫let's say 15 other items here.
‫And I want to fetch the first 15 or let's say first 15 items.
‫And based on what I get, I want to extract the tags that exist in these items instead of showing the
‫full text list.
‫But first, let's decide on with this one.
‫So I think there is no feature to tag specifically.
‫So what I will do is I will try to fetch this list in Postman and let's see which one is the best to
‫use for our case.
‫So I will call this.
‫And here we get the least of the item.
‫So we have the, um, the countries.
‫Uh, which cuisine we want healthy, easy, tasty, seasonal, and etc..
‫So you have like the type and then based on that, different items, if I search featured, what will
‫I get here?
‫Nothing.
‫So feature page.
‫There are some items that are specifically in feature like category, but I what I liked more is healthy,
‫so I want to have five healthy items here.
‫So it will be healthy recipes and then the rest will be random.
‫So the other items here, so I will use this one for yeah, for fishing and for that let's try to call
‫our end Point with this tag and see if that works properly.
‫So I will add another item here and this is our list.
‫So I will collect this.
‫I will add the headers.
‫Actually, can I maybe duplicate this?
‫Uh, I think if I was logged in, I could.
‫But now.
‫Maybe.
‫Let's try.
‫Okay, I have text list and I can duplicate.
‫Amazing.
‫So the headers are here as well.
‫And the parameter I want to say is tags.
‫I think the tree.
‫But let's check.
‫So it didn't find anything.
‫Let's try healthy.
‫I tried with type.
‫So let's try healthy.
‫And in front of some items, which is great.
‫Um, yeah, we can use healthy.
‫So I want to have five healthy items fetched here.
‫Well, let's go and do that.
‫So besides this, like, full recipes, I want to have another one which will hold healthy recipes.
‫And here as well, I need another context because it will be different data.
‫We could also have another property of recipes and keep them in the same one.
‫That's just how you prefer.
‫This is my preference, at least right now.
‫Uh, so I will use this one and then for the provider as well, let's keep the spacing.
‫And then here I will have this two pressed.
‫Okay, so here is beside the handle recipe.
‫First, I want to also have healthy recipes, which but what I can also do is to keep the same function
‫and then just press healthy.
‫And five.
‫Not like this.
‫And here I want the size to be controllable as well.
‫So I will say size or.
‫So the default will be 20.
‫But I can also change that.
‫So here I will say size.
‫And I will take tax and size your pass to this one.
‫Okay, so now we have two calls, but both of them are actually setting the same item, which is not
‫what we want.
‫We want them to have different functions.
‫So what we can do is we can instead of setting here, we can set here, which is doable, but we need
‫to have a sync call here.
‫So for having us in, call in set, you need to like having self calling functions at the same which
‫is written like this.
‫So you open the function and you call immediately.
‫And with that way I will have cost roles is equal await.
‫And here I will just return this one.
‫And I will say set recipes.
‫And it will happen the same for this one as well.
‫Just it will be healthy.
‫And then I also said healthy recipes healthy.
‫Oh, Kim.
‫No,
‫Let's use the healthy recipes here as well.
‫Import that one and lock this one.
‫Let's see what we have got.
‫And I need this one active.
‫So.
‫Start cooking and we got five healthy recipes, which is amazing.
‫So next, let's start using the real data for these items.