Created
March 18, 2013 10:50
-
-
Save kazuph/5186384 to your computer and use it in GitHub Desktop.
WebService::Simple::ATNDのテスト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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