/lib/DDG/Spice/UrbanDictionary.pm
Perl | 19 lines | 12 code | 6 blank | 1 comment | 1 complexity | 9600ccf7f732ab5cac83a0e0569c68c0 MD5 | raw file
Possible License(s): Apache-2.0
- package DDG::Spice::UrbanDictionary;
- # ABSTRACT: Give the Urban Dictionary definition of the search query.
- use strict;
- use DDG::Spice;
- spice is_unsafe => 1;
- triggers startend => "ud", "urban", "urbandictionary", "urban dictionary";
- spice to => 'http://api.urbandictionary.com/v0/define?term=$1&callback={{callback}}';
- handle remainder => sub {
- my ($term) = @_;
- return $term if $term;
- return;
- };
- 1;