/lib/DDG/Spice/Github.pm

https://github.com/pardocz/zeroclickinfo-spice · Perl · 25 lines · 19 code · 5 blank · 1 comment · 0 complexity · 46da3c9c6bb42c985040bfbe7eeb471f MD5 · raw file

  1. package DDG::Spice::Github;
  2. # ABSTRACT: Search for information about GitHub repositories
  3. use DDG::Spice;
  4. primary_example_queries "github zeroclickinfo";
  5. description "Github info";
  6. name "Github";
  7. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Github.pm";
  8. topics "programming", "web_design";
  9. category "programming";
  10. attribution web => ['http://dylansserver.com','Dylan Lloyd'],
  11. email => ['dylan@dylansserver.com','Dylan Lloyd'];
  12. triggers startend => "github";
  13. spice to => 'https://api.github.com/legacy/repos/search/$1?callback={{callback}}';
  14. spice proxy_cache_valid => '200 30d';
  15. handle query_lc => sub {
  16. s/^github\s+|\s+github$//;
  17. return $_ unless /^jobs\b|\bjobs$|^status\b|\bstatus$/;
  18. return;
  19. };
  20. 1;