Giter Club home page Giter Club logo

hubot-giphy-gifme's People

Contributors

bencentra avatar loafoe avatar patcon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

patcon patsissons

hubot-giphy-gifme's Issues

Option for limited size

We are using Flowdock with Hubot and your script. Sometimes the gifs are that huge, it will just lag everyone's client to death. Would it be possible to implement an option to limit size or even better provide downsampled results if they exceed the given size limit?

The giphy API seems to be supporting this. Just take a look at the example response: https://github.com/Giphy/GiphyAPI#random-endpoint

use query rather than tags for search api

We're currently using the random api endpoint filtered by tags:
https://github.com/Giphy/GiphyAPI#random-endpoint

Tags are a little restricting, as often they return no results, which is pretty much the worst case scenario when trying to summon a random gif to brighten all your friend's days.

Let's instead take the top of random result from a simpler search query:
https://github.com/Giphy/GiphyAPI#search-endpoint

This could perhaps be a flag so that change isn't forced. Thoughts?

output when no results returned

hubot-slack adapter chokes when a message with no content is sent, and seems that this happens when there's no results:

   192  2016-02-13T01:41:55.548847+00:00 app[web.1]: [Sat Feb 13 2016 01:41:55 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'length' of undefined
   193  2016-02-13T01:41:55.548851+00:00 app[web.1]:   at SlackBot.send (/app/node_modules/hubot-slack/src/slack.coffee:226:7, <js>:275:16)
   194  2016-02-13T01:41:55.548852+00:00 app[web.1]:   at runAdapterSend (/app/node_modules/hubot/src/response.coffee:82:34, <js>:87:50)
   195  2016-02-13T01:41:55.548853+00:00 app[web.1]:   at allDone (/app/node_modules/hubot/src/middleware.coffee:44:37, <js>:34:16)
   196  2016-02-13T01:41:55.548854+00:00 app[web.1]:   at /app/node_modules/async/lib/async.js:274:13
   197  2016-02-13T01:41:55.548854+00:00 app[web.1]:   at Object.async.eachSeries (/app/node_modules/async/lib/async.js:142:20)
   198  2016-02-13T01:41:55.548855+00:00 app[web.1]:   at Object.async.reduce (/app/node_modules/async/lib/async.js:268:15)
   199  2016-02-13T01:41:55.548856+00:00 app[web.1]:   at /app/node_modules/hubot/src/middleware.coffee:49:7, <js>:37:22
   200  2016-02-13T01:41:55.548857+00:00 app[web.1]:   at nextTickCallbackWith0Args (node.js:453:9)
   201  2016-02-13T01:41:55.548857+00:00 app[web.1]:   at process._tickCallback (node.js:382:13)

Would be great to catch undefined results before kicking them to robot.send :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.