-
Notifications
You must be signed in to change notification settings - Fork 942
Conversation
@bryanhart Hey ! Thanks for taking the time to contribute! We really appreciate it. We work closely with every contributor to make Instant Answers the best they can be, so we appreciate your patience as we look over your code. From here, the process usually goes like this:
If you have any questions along the way, feel free to ask our staff or community: Community Leaders:
Staff:
|
attribution web => ["http://www.riffsy.com","Riffsy"], | ||
twitter => "riffsyapp"; | ||
|
||
spice to => 'http://api1.riffsy.com/v1/search?tag=$1&key={{ENV{DDG_SPICE_RIFFSY_APIKEY}}}&safesearch=strict&searchtype=emoji'; |
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.
@bryanhart can you please send me an API key for testing? moollaza[at]duckduckgo[dot]com
@bryanhart I've left some initial feedback. Sorry for all the noise, I didn't realize at first that the modules and JS were nearly identical. As I mentioned in the comments, we can combine the triggers into 1 or multiple regex triggers (unfortunately we can't mix regex and words triggers) and then we can remove the 2nd package, js file, test you made. Once things are simplified I'll be able to put this up on a testing machine 👍 We can also simplify the final package name. |
@bryanhart Ping! I'm just checking in to see if need anything from us? We'd love to see this go live! There's absolutely no rush, just wanted to make sure you're not stuck on anything. |
Hey @moollaza - yeah a few things came up here but I should be back to this sometime this week! |
IA Page for this: https://duck.co/ia/view/riffsy_emoji_search |
env.ddg_spice_riffsy_emoji_search = function(api_result){ | ||
|
||
// Validate the response (customize for your Spice) | ||
if (!api_result || api_result.error || !api_result.results) { |
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.
@bryanhart When the query is invalid results can still be an empty array. ![]
will result to false so probably best to check api_result.results.length
as well.
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.
@bryanhart does .error
actually come up?
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.
It can! It would most likely be a temporary issue on our side.
Let's up the caching to 30 days too if that's alright https://github.com/duckduckgo/zeroclickinfo-spice/search?utf8=%E2%9C%93&q=30d |
@bryanhart @moollaza I think the Gif in the detail view is too small. Don't you agree? |
Sorry for the delay! There's a few improvements that I made to the Riffsy API to simplify the IA module a bit. Otherwise, most of the changes requested have been made, the exception being that I set caching to be 1 day instead of the requested 30, as we do update these results pretty regularly. I'm actually not sure what the default value is, so that might have been unnecessary. Happy to have further discussion about what an appropriate value might be. |
@bryanhart thanks a lot, we'll take a look soon!
The default is 24 hours, but making it explicit doesn't hurt ;) |
Checking in to see if there's any other improvements you'd like me to make! |
@bryanhart sorry for the delay! This has now been deployed to beta.duckduckgo.com: https://beta.duckduckgo.com/?q=game+of+thrones+gifs I spoke with the team, and we have a couple concerns/issues with loading the moving gifs. We're worried that showing all the gifs moving will be overwhelming and irritate users.
I decided to mess around with this and wrote a little event handler that implements this. You can see the code here: https://gist.github.com/moollaza/f5435985c6058fd3d6df And here's a working demo: https://13f995a3.ngrok.io/?q=duck+gifs&ia=gifs -- this is running locally on my pc so it might be a little slow. If you update your PR with this I'll be able to deploy the updates to Beta. We plan to update the images template to handle all of this eventually, but in the interest of moving this PR along, I think this should work for now. What do you think? |
Ping! @bryanhart I'm just checking in to see if you're still interested in finishing this one up? We'd love to see this go live! There's absolutely no rush, just wanted to make sure you're not stuck on anything. |
Hey Zaahir! Yes most definitely - I'll be back to finish this up tomorrow! |
All set! I integrated your changes, many apologies for the delay getting that done. Let me know if you'd like to see any other improvements! |
@bryanhart sorry for the delay, thanks for updating, I'll take a look right now |
@bryanhart this LGTM 👍 Thanks a lot for contributing (we really appreciate it 😃). I'll be sure to get this live soon, and will let you know when it goes live! |
Riffsy GIF Search Instant Answer
Awwwyeahhhh thank you for your help @moollaza!! |
@bryanhart congrats! It's live: https://duckduckgo.com/?q=duck+gifs&t=ffab&ia=gifs Thanks again for taking the time to contribute! We really appreciate it. |
What does your Instant Answer do?
The Riffsy GIF Search and Emoji Search instant answers provide animated GIFs based on a simple query ("cat gifs"), or provide GIFs that relay an expression similar to a provided emoji.
What problem does your Instant Answer solve (Why is it better than organic links)?
GIF results animate inline so that a user can preview the GIF while scrolling through the list to quickly find the GIF she wants to share. GIFs are ranked by their likelihood to be shared in conversation, and emoji search enables a user to quickly locate a GIF to express a desired emotion.
What is the data source for your Instant Answer? (Provide a link if possible)
Riffsy - http://www.riffsy.com, http://api.riffsy.com
Riffsy's GIF Keyboard is the top-ranked and largest GIF-sharing app on iOS, driving 6 Billion+ GIF and video views per month.
Why did you choose this data source?
Are there any other alternative (better) data sources?
The Gifs instant answer currently uses an alternate source.
What are some example queries that trigger this Instant Answer?
"cat gifs", "happy gif", "thumbs up riffsy", "😂", "👍"
Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
Riffsy's ability to recommend GIFs for use in conversations is useful for a growing population of users looking to find GIFs to use in their conversations across messengers and social networks.
Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
https://duck.co/ideas/idea/6323/riffsy-gif-emoji-search
Which existing Instant Answers will this one supersede/overlap with?
There is currently a Gifs instant answer that provides GIF search functionality through an alternate source.
Are you having any problems? Do you need our help with anything?
I would like to consolidate the GIF Search and the Emoji Search answers into a single module, but it did not seem possible based on how the two modules parse search queries.
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?
We've created an API key for use with Riffsy's API. There are no costs associated with the API usage, and Riffsy's full TOS is here: http://www.riffsy.com/legal-terms. Feel free to contact frank@riffsy.com if there are any additional questions.
Where did you hear about DuckDuckHack? (For first time contributors)
Gabe // Stephen Mendel // David McIntosh
What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
IA Page: https://duck.co/ia/view/riffsy