PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/DDG/Spice/Dictionary/Reference.pm

http://github.com/duckduckgo/zeroclickinfo-spice
Perl | 20 lines | 13 code | 6 blank | 1 comment | 1 complexity | 46fb99b2ef3db285682bb29b790ccc8c MD5 | raw file
Possible License(s): Apache-2.0
  1. package DDG::Spice::Dictionary::Reference;
  2. # ABSTRACT: Used to get the definition of the singular form for plural queries
  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/definitions?includeRelated=true&includeTags=true&limit=3&api_key={{ENV{DDG_SPICE_WORDNIK_APIKEY}}}&callback={{callback}}';
  8. spice proxy_cache_valid => '200 30d';
  9. triggers startend => "///***never trigger***///";
  10. handle query_lc => sub {
  11. return $_ if $_;
  12. return;
  13. };
  14. 1;