Home > Fun, Tech > Check this week’s Upcoming.org events in Perl!

Check this week’s Upcoming.org events in Perl!

April 18th, 2005

Hey developers,

I whipped up a quick perl script using Greg Knauss’s Upcoming CPAN module (should be released by the time you read this, and if not, then soon). The module is called WWW::Service::Upcoming::API, and it’s pretty badass. It handles all the negotations and REST parsing for you, and it would be awesome if a lot of development took off with it.

This script looks up your metros by the username and password you provide. It then searches through events in those metros that start in the next seven days, and emails a list of those events in chronological order to you. Feel free to use this script as a starting point for your own creations – it’s pretty barebones, but it actually does something useful. :)

I ended up extending the Upcoming.org REST API somewhat to allow the script work from your username and password, instead of requiring numeric event_id’s. The API now allows you to get a list of metros from your username, so the whole script only makes the minimum number of API calls possible at this moment.

It requires the WWW::Service::Upcoming::API module, Date::Calc, and Mail::Sendmail for the mailing. Here’s a link to the code, which i’m making available via the BSD license. Have fun!

http://getluky.net/code/upcoming-thisweek.pl

Fun, Tech

  1. No comments yet.
  1. No trackbacks yet.