/lib/DDG/Spice/SeatGeek/EventsByVenue.pm
Perl | 27 lines | 19 code | 6 blank | 2 comment | 1 complexity | f324e368484ed14be2e1f72d5ee0dabd MD5 | raw file
Possible License(s): Apache-2.0
- package DDG::Spice::SeatGeek::EventsByVenue;
- # ABSTRACT: Returns upcoming concerts at a venue
- use strict;
- use DDG::Spice;
- triggers start =>
- 'upcoming concert at',
- 'upcoming concerts at',
- 'concerts at',
- 'live at',
- 'live shows at',
- 'shows at',
- 'gigs at';
- spice proxy_cache_valid => "200 304 12h";
- spice to => 'https://api.seatgeek.com/2/events?taxonomies.name=concert&per_page=20&venue.slug=$1&callback={{callback}}';
- handle remainder_lc => sub {
- # Replaces spaces between words with dashes, because the API requires it
- $_ =~ s/\s/\-/g;
- return $_ if $_;
- return;
- };
- 1;