-
Notifications
You must be signed in to change notification settings - Fork 942
Conversation
# Handle statement | ||
handle query_lc => sub { | ||
my $query = $_; | ||
my @stop_words = ("a", "an", "are", "being", "cocktail", "drink", "for", "how", "in", "ingredient", "ingredients", "is", "make", "making", "mix", "mixing", "needed", "of", "that", "to", "used", "what", "within"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's define this array outside the handle
-- no need to re-define it each time the handle
executes
@ozdemirburak thanks a lot for doing this, and for doing an awesome jobs as well 👍 I've left some feedback for improvements. Visually this is great, I just think we need to reign in the triggering. Once things are updated please let us know by leaving a comment, so we can review this again. If you have any questions, feel free to ask them here! |
@Razze can you _please_ put me in touch with the API maintainer? I don't really want to signup for the Kodi forum, but couldn't find him online elsewhere. Would love to get an API key from him! |
@moollaza updated as per your comments. |
|
||
env.ddg_spice_drinks = function(api_result){ | ||
|
||
if (!api_result || api_result.error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jagtalon thanks for pointing them out, updated. |
@ozdemirburak this is looking great. Apologies for the delay. I think for these drinks: https://github.com/ozdemirburak/zeroclickinfo-spice/blob/master/share/spice/drinks/drinks.txt#L17-#L26 we should remove the preceeding |
Spice.add({ | ||
id: 'drinks', | ||
data: drink, | ||
name: "Drinks", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change this to Recipes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed this 👍
@ozdemirburak this LGTM 👍 Thanks a lot for contributing (we really appreciate it 😃). We invite you to stick around and comment/help on other PR's & Issues or even submit an Instant Answer! |
@moollaza Thanks, I've opened an another pull request for improvements. |
Awesome work guys, happy to help! Oh I also run TheAudioDB.com, TheLogoDB.com and TheSportsDB.com if you want some other data sources ;) Also hoping to write a recipe site at some point for food things. Zag - TheCocktailDB.com |
@ozdemirburak excellent, thanks!
Hey @zag2me great to meet you, and thanks a lot for creating TheCocktailDB! It's awesome to see you have some other API's available! We could potentially use TheLogoDB to help users search for TV Channel logos (or potentially to supplement other IAs). Regarding Audio, we have a few different IA's, mostly from LastFM, but we've been looking for alternatives, or more complete sources. It seems like currently MusicBrainz may be the best choice, but we haven't built anything yet. Regarding Sports, we currently use SportsRadar to provide our existing NFL and MLB IAs (and we have more in the works), but there may yet be a use for that data as well! Similarly, we currently use Yummly for recipe search, but there may be a niche in the recipe query space that could be handled by another API. |
@ozdemirburak @zag2me congrats! It's live: https://duckduckgo.com/?q=how+to+mix+a+tom+collins&ia=recipes Thanks again for taking the time to contribute! We really appreciate it. Feel free to stick around and comment/help on other PR's, tackle open issues or even submit more Instant Answers! |
What does your Instant Answer do?
Shows cocktail recipes.
What problem does your Instant Answer solve (Why is it better than organic links)?
Makes easier to access cocktail recipes
What is the data source for your Instant Answer? (Provide a link if possible)
TheCocktailDB
Why did you choose this data source?
It was mentioned in the issue #2184, thus stable enough.
Are there any other alternative (better) data sources?
Nope, as far as I know
What are some example queries that trigger this Instant Answer?
how to make a white russian drink, mojito, ingredients of margarita, red eye cocktail
Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
People who love to drink
Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
https://duck.co/ideas/idea/5129/cocktail-recipes
Which existing Instant Answers will this one supersede/overlap with?
Recipes and maybe Wikipedia as this IA uses list of available drinks within the API for the triggers.
Are you having any problems? Do you need our help with anything?
Nope
What are the terms of use for the API? Will DuckDuckGo need specific authorization (e.g. an API key)? Are there any costs associated with API usage?
No, as far as I know, however within the link, developer mentions about something that makes me feel not sure:
NOTE: If you have a finished project, you will need an API key, please PM me or post in this thread.
What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
Checklist
Please place an 'X' where appropriate.
IA Page: https://duck.co/ia/view/drinks