PageRenderTime 46ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/DDG/Spice/Kwixer.pm

http://github.com/duckduckgo/zeroclickinfo-spice
Perl | 33 lines | 22 code | 8 blank | 3 comment | 1 complexity | 23f68574940c473055499d75927c87a4 MD5 | raw file
Possible License(s): Apache-2.0
  1. package DDG::Spice::Kwixer;
  2. # ABSTRACT: Movie search
  3. use strict;
  4. use DDG::Spice;
  5. #metadata
  6. primary_example_queries "movies with Keira Knightley";
  7. secondary_example_queries "films with with Tom Cruise and Emily";
  8. description "Advanced movie queries with Kwixer";
  9. name "Kwixer";
  10. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Kwixer.pm";
  11. icon_url "https://kwixer.com/favicon.ico";
  12. topics "entertainment", "special_interest";
  13. category "entertainment";
  14. attribution twitter => ['kwixerapp','Kwixer'],
  15. web => ['https://www.kwixer.com','Kwixer'];
  16. spice to => 'https://www.kwixer.com/api/search?filter=movie&take=40&source=ddg&lang=en&query=$1';
  17. spice wrap_jsonp_callback => 1;
  18. my @triggers = share("triggers.txt")->slurp;
  19. triggers start => @triggers;
  20. #triggers end => ('actor','actress', 'director');
  21. handle query => sub {
  22. return $_ if $_;
  23. return;
  24. };
  25. 1;