Skip to content

Instantly share code, notes, and snippets.

@kazuph
Created March 18, 2013 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuph/5186384 to your computer and use it in GitHub Desktop.
Save kazuph/5186384 to your computer and use it in GitHub Desktop.
WebService::Simple::ATNDのテスト
use strict;
use warnings;
use utf8;
use Encode;
use WebService::Simple::ATND;
my @keywords = qw/東京 perl/;
my @ym = qw/201302 201303 201304/;
my $query = WebService::Simple::ATND->query_events(count => 30);
$query->add_keyword(\@keywords);
$query->add_ym(\@ym);
my $atnd = WebService::Simple::ATND->new;
my $res = $atnd->get($query);
for my $event (@{ $res->events }) {
my $info = $event->{started_at}.":".$event->{address}.":".$event->{title}.":".$event->{event_url}."\n";
print Encode::encode_utf8($info);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment