PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/DDG/Spice/Kwixer.pm

https://github.com/robertbrook/zeroclickinfo-spice
Perl | 43 lines | 31 code | 8 blank | 4 comment | 1 complexity | a17a34d1549ae5533a402c733229afc1 MD5 | raw file
  1. package DDG::Spice::Kwixer;
  2. use DDG::Spice;
  3. #metadata
  4. primary_example_queries "movies with Keira Knightley";
  5. secondary_example_queries "films with with Tom Cruise and Emily";
  6. description "Advanced movie queries with Kwixer";
  7. name "Kwixer";
  8. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Kwixer.pm";
  9. icon_url "https://kwixer.com/favicon.ico";
  10. topics "entertainment", "special_interest";
  11. category "entertainment";
  12. attribution twitter => ['kwixerapp','Kwixer'],
  13. web => ['https://www.kwixer.com','Kwixer'];
  14. spice to => 'https://www.kwixer.com/api/search?filter=movie&take=40&source=ddg&lang=en&query=$1';
  15. spice wrap_jsonp_callback => 1;
  16. my @triggers = ('new movies with','new movies featuring','new movies starring',
  17. 'new movie with','new movie featuring','new movie starring',
  18. 'newest movies with','newest movies featuring','newest movies starring',
  19. 'newest movie with','newest movie featuring','newest movie starring',
  20. 'new films with','new films starring','new films featuring',
  21. 'new film with','new film starring','new film featuring',
  22. 'newest films with','newest films starring','newest films featuring',
  23. 'newest film with','newest film starring','newest film featuring',
  24. 'movie with','movies with', 'movies starring','film with','films with','films starring','film starring','movies featuring','films featuring',
  25. #'movies directed by','movies directed', 'directed movies', 'director','film director','film by',
  26. #'films by','films directed by',
  27. #'actor','actress',
  28. 'kwixer');
  29. triggers start => @triggers;
  30. triggers end => ('actor','actress');
  31. handle query => sub {
  32. return $_ if $_;
  33. return;
  34. };
  35. 1;