Posts: 1,746
Joined: Nov 2014
Reputation:
160
docwra
Posting Freak
Posts: 1,746
No, you should never query an entire db at once it would be very inefficient and painfully slow for the user interface even with lazy loading.
Use the filters for ingredients and create category buttons in your app. Then list the cocktails to browse, then do another lookup on the ID once a user clicks on the cocktail for the details.
Posts: 1
Joined: May 2021
Reputation:
0
Why do I get the error "AppId is over the quota" after paying? I used the key assigned to me
Posts: 1
Joined: Nov 2021
Reputation:
0
Hello,
I would like to show all the output in german, is there a way to do so?
also I need an api key please
Posts: 1
Joined: Nov 2021
Reputation:
0
Hello, I am potentially interested in becoming a Patreon supporter, but I first would like to know if it is possible to search using multiple queries, e.g. for vodka drinks that go in a cocktail glass (ingredient by name + by glass). If so, what is the URL format. Thanks!
Posts: 2
Joined: Jan 2022
Reputation:
0
In terms of loading the db at once, you can do something like:
```dart
final futures = 'abcdefghijklmnopqrstuvwxyz'.split('').map((char) => _sendRequest('search.php?f=$char'));
final results = await Future.wait(futures);
```
That will fire off 26 concurrent network requests, and load the entire db. It's very fast, and only transfers about 200kb (which is equal to like half of one image)
Posts: 1
Joined: Feb 2022
Reputation:
0
Hi wondering if anyone can help. I'm currently in a coding bootcamp and am using the cocktailDB api as part of a project and I'm having an issue creating a dynamic link to a cocktail ingredient. If I use the api to get details of an ingredient e.g. `https://www.thecocktaildb.com/api/json/v1/1/search.php?i=vodka`
I don't get the ingredient imageUrl. I've tried constructing from the ingredient name, ie.`www.thecocktaildb.com/images/ingredients/${strIngredient}-Small.png`, but this only works for a few as there are a lot of other naming conventions. Is there any api route that includes the ingredient image path?
Thanks.
Posts: 1,746
Joined: Nov 2014
Reputation:
160
docwra
Posting Freak
Posts: 1,746
Ha! thats pretty cool. Well done on making a nice little project.