Advertisement
Whitesunset

StayMap Goodie

Jun 26th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. package DDG::Goodie::StayMap;
  2. # ABSTRACT: Accommodations on the map
  3.  
  4. use strict;
  5. use DDG::Goodie;
  6.  
  7. triggers start => "rental";
  8.  
  9. zci is_cached => 0;
  10. zci answer_type => "stay_map";
  11.  
  12. # Handle statement
  13. handle remainder => sub {
  14. my $address = $_ unless '';
  15. my $plaintext = "Accommodations in $address";
  16.  
  17. return $plaintext, structured_answer => {
  18. data => {
  19. address => $address,
  20. },
  21. meta => {
  22. sourceUrl => 'https://www.stay22.com/',
  23. sourceName => 'Stay22',
  24. },
  25. templates => {
  26. group => 'info',
  27. options => {
  28. content => 'DDH.stay_map.content',
  29. chompContent => 1,
  30. },
  31. },
  32. };
  33. };
  34.  
  35. 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement