/lib/DDG/Spice/Dictionary/Audio.pm

http://github.com/duckduckgo/zeroclickinfo-spice · Perl · 19 lines · 13 code · 5 blank · 1 comment · 1 complexity · 67221ee93f104f3626907dd80177c042 MD5 · raw file

  1. package DDG::Spice::Dictionary::Audio;
  2. # ABSTRACT: Get audio file for pronounciation of a word
  3. use strict;
  4. use DDG::Spice;
  5. attribution web => ['http://duckduckgo.com', 'DuckDuckGo'],
  6. twitter => ['http://twitter.com/duckduckgo', 'DuckDuckGo'];
  7. spice to => 'http://api.wordnik.com/v4/word.json/$1/audio?limit=10&useCanonical=false&api_key={{ENV{DDG_SPICE_WORDNIK_APIKEY}}}&callback={{callback}}';
  8. triggers any => "///***never_trigger***///";
  9. spice proxy_cache_valid => "418 1d";
  10. handle remainder => sub {
  11. return $_ if $_;
  12. return;
  13. };
  14. 1;