/lib/DDG/Spice/SeatGeek/Sports.pm
Perl | 19 lines | 11 code | 5 blank | 3 comment | 1 complexity | d0c97b4a1206c568f94354a9550d440e MD5 | raw file
Possible License(s): Apache-2.0
- package DDG::Spice::SeatGeek::Sports;
- # ABSTRACT: Returns upcoming sport events for a given team/performer.
- use DDG::Spice;
- triggers startend => 'upcoming matches', 'events', 'event', 'upcoming match', 'matches', 'sports', 'schedule', 'tickets', 'games';
- spice to => 'https://api.seatgeek.com/2/events?q=$1&taxonomies.name=sports&per_page=50&callback={{callback}}';
- handle remainder_lc => sub {
- # Removes spaces from the beginning of the query
- $_ =~ s/^\s+//;
- # Removes spaces from the end of the query
- $_ =~ s/\s+$//;
- return $_ if $_;
- return;
- };
- 1