PageRenderTime 51ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/DDG/Spice/Github.pm

https://github.com/tarnfeld/zeroclickinfo-spice
Perl | 25 lines | 19 code | 5 blank | 1 comment | 1 complexity | db9a575782e8f6fbcf3a208507066307 MD5 | raw file
  1. package DDG::Spice::Github;
  2. # ABSTRACT: Search for information about GitHub repositories
  3. use DDG::Spice;
  4. triggers any => "github";
  5. spice to => 'https://api.github.com/legacy/repos/search/$1?callback={{callback}}';
  6. primary_example_queries => "github zeroclickinfo";
  7. description "Github info";
  8. name "Github";
  9. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Github.pm";
  10. topics => "programming", "web design";
  11. category => "programming";
  12. attribution web => ['http://dylansserver.com','Dylan Lloyd'],
  13. email => ['dylan@dylansserver.com','Dylan Lloyd'];
  14. handle query_lc => sub {
  15. if (/^github\s+(?!jobs?)(.+)$/) {
  16. return $1;
  17. }
  18. return;
  19. };
  20. 1;