quintilesims / slackbot

Slack bot for IQVIA
MIT License
2 stars 0 forks source link

add !gif command #10

Closed nehayward closed 6 years ago

nehayward commented 6 years ago

Replicate the gif command on current devbot, with google custom search api

zpatrick commented 6 years ago

google image api is no longer supported, may want to try other apis such as giphy: https://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&rating=pg13&tag=SEARCH_TAG_HERE

nehayward commented 6 years ago

I just don't think the results will be as good. We can use google custom search api curl ’https://www.googleapis.com/customsearch/v1?q=monkey&searchType=image&imgtype=animated&cx=017761564406976645410:cc4umzwhcbc&key=AIzaSyD_9xeeBrIk_amCdiUv7-H_0S-bLn8oz1k'

zpatrick commented 6 years ago

fair point - i saw in passing that unpaid google auth tokens only give you like 50 requests/day or something like that though?

nehayward commented 6 years ago

Yeah it's like a 100 :/. I'm wondering how the current dev bot works. The only thing with giphy though is that they don't have that big of a selection.

jparsons04 commented 6 years ago

The previous gif implementation can be found here: https://gitlab.ims.io/Dev/ircrestapi/blob/master/appengine/plugins/gif.py

zpatrick commented 6 years ago

https://github.com/wilwade/google-api-custom-search-example/blob/master/google-api-custom-search-example.go

zpatrick commented 6 years ago

closing this via https://github.com/quintilesims/slackbot/pull/15

We can re-open this issue if/when we would like to move from the Giphy API to the Google API, but I need this complete to unblock some other work.