|
NAMEWebService::Prowl::AnyEventHTTP - a sub class of WebService::Prowl sending http requests by using AnyEvent::HTTP SYNOPSIS =for test_synopsis my($ws,$apikey); use WebService::Prowl::AnyEventHTTP;
my $ws = WebService::Prowl::AnyEventHTTP->new(apikey => $apikey, on_error => sub {warn $_[0]})
$ws->add('event' => $event, application => $application, description => $description);
DESCRIPTIONWebService::Prowl::AnyEvent is a sub class of WebService::Prowl to use AnyEvent::HTTP non-blocking http client SYNOPSIS =for test_synopsis my($ws,$apikey);This module aims to be a implementation of a interface to the Prowl Public API by using AnyEvent::HTTP non-blocking http client library my $ws = WebService::Prowl::AnyEventHTTP->new(apikey => $apikey, on_error => sub {warn $_[0]});
AnyEvent::Twitter::Stream->new(
username => $username,
passwordn => $password,
method => 'track',
keyword => '@' . $username,
on_tweet => sub {
my $tweet = shift;
my $screen_name = Encode::decode_utf8($tweet->{user}{screen_name});
my $text = Encode::decode_utf8($tweet->{text});
my $description = "$screen_name: $text";
$ws->add('event' => $event, application => $application, description => $description);
}
)
AnyEvent->condvar->recv;
METHODS
AUTHORMasayoshi Sekimura <sekimura@cpan.org> LICENSEThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSOAnyEvent::HTTP, <https://prowl.weks.net/>, <http://forums.cocoaforge.com/viewtopic.php?f=45&t=20339>
|