/lib/DDG/Spice/Gifs.pm
Perl | 20 lines | 14 code | 5 blank | 1 comment | 1 complexity | 862208a4b4c736fbb6b8f5ba89854f20 MD5 | raw file
Possible License(s): Apache-2.0
- package DDG::Spice::Gifs;
- # ABSTRACT: Search for gifs
- use strict;
- use DDG::Spice;
- use Text::Trim;
- triggers startend => "giphy", "giphy";
- spice to => 'http://api.giphy.com/v1/gifs/search?q=$1&api_key={{ENV{DDG_SPICE_GIPHY_APIKEY}}}';
- spice wrap_jsonp_callback => 1;
- handle remainder => sub {
- s/\bgifs?\b//;
- trim;
- return $_ if $_;
- return;
- };
- 1;