PageRenderTime 47ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/DDG/Spice/HackerNews.pm

https://github.com/robertbrook/zeroclickinfo-spice
Perl | 25 lines | 19 code | 6 blank | 0 comment | 2 complexity | ad792ac47c7aacaf6627625fe74c7a91 MD5 | raw file
  1. package DDG::Spice::HackerNews;
  2. use DDG::Spice;
  3. primary_example_queries "hn postgresql";
  4. description "Search the Hacker News database for related stories/comments";
  5. name "HackerNews";
  6. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/HackerNews.pm";
  7. icon_url "/i/www.hnsearch.com.ico";
  8. topics "programming", "social";
  9. category "forums";
  10. attribution github => ['https://github.com/adman','Adman'],
  11. twitter => ['http://twitter.com/adman_X','adman_X'];
  12. triggers startend => "hn", "hackernews", "hacker news", "news.yc", "news.ycombinator.com", "hn search", "hnsearch", "hacker news search", "hackernews search";
  13. spice to => 'https://hn.algolia.com/api/v1/search?query=$1&tags=story';
  14. spice wrap_jsonp_callback => 1;
  15. handle remainder => sub {
  16. return $_ if $_;
  17. return;
  18. };
  19. 1;