PageRenderTime 45ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/DDG/Spice/Mtg.pm

http://github.com/duckduckgo/zeroclickinfo-spice
Perl | 27 lines | 19 code | 7 blank | 1 comment | 1 complexity | 8c9c78329c4572c32af6b5d5b30cc592 MD5 | raw file
Possible License(s): Apache-2.0
  1. package DDG::Spice::Mtg;
  2. # ABSTRACT: Information on 'Magic The Gathering' cards
  3. use strict;
  4. use DDG::Spice;
  5. name "Mtg Card Search";
  6. description "Returns information about Magic The Gathering Cards";
  7. primary_example_queries "mtg nullify", "mtg Boros Reckoner";
  8. category "entertainment";
  9. topics "entertainment", "gaming";
  10. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/mtg/lib/DDG/Spice/Mtg.pm";
  11. attribution github => ["https://github.com/puskin94", "puskin"];
  12. triggers start => 'mtg', 'magic card', 'magic cards', 'magic the gathering';
  13. spice to => 'http://api.mtgdb.info/cards/$1';
  14. spice wrap_jsonp_callback => 1;
  15. handle remainder => sub {
  16. $_ =~ s/\://;
  17. return $_ if $_;
  18. return;
  19. };
  20. 1;