PageRenderTime 40ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/lib/DDG/Spice/Gifs.pm

https://github.com/robertbrook/zeroclickinfo-spice
Perl | 23 lines | 16 code | 6 blank | 1 comment | 1 complexity | 83ec258402a8d63214869f5f41f46071 MD5 | raw file
  1. package DDG::Spice::Gifs;
  2. use DDG::Spice;
  3. primary_example_queries "funny cat gifs";
  4. description "Animated Gifs";
  5. name "Gifs";
  6. source "Giphy";
  7. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Gifs.pm";
  8. attribution github => ['https://github.com/bsstoner','bsstoner'];
  9. triggers any => "gifs", "gif", "giphy";
  10. # TODO: this is their beta/trial key, need to contact them if we want to srsly use:
  11. spice to => 'http://api.giphy.com/v1/gifs/search?q=$1&api_key=dc6zaTOxFJmzC';
  12. spice wrap_jsonp_callback => 1;
  13. handle remainder => sub {
  14. return $_ if $_;
  15. return;
  16. };
  17. 1;