/lib/DDG/Spice/Tvmaze/Show.pm

http://github.com/duckduckgo/zeroclickinfo-spice · Perl · 23 lines · 14 code · 7 blank · 2 comment · 0 complexity · 835c68dd7c78d603b5b8d9278a5a60e3 MD5 · raw file

  1. package DDG::Spice::Tvmaze::Show;
  2. # ABSTRACT: Information about TV series
  3. use strict;
  4. use DDG::Spice;
  5. # generic tv show information won't change very often, cache it for a day
  6. spice is_cached => 1;
  7. spice proxy_cache_valid => "200 301 302 404 1d";
  8. triggers startend => 'tv', 'tv show', 'tv series', 'series';
  9. triggers end => 'show';
  10. spice to => 'http://api.tvmaze.com/singlesearch/shows?q=$1';
  11. spice wrap_jsonp_callback => 1;
  12. handle remainder => sub {
  13. return unless $_;
  14. return $_;
  15. };
  16. 1;