AnyEvent::Mypeople::Client
version 0.0.1
use AnyEvent::HTTPD; use AnyEvent::Mepeople::Client; my $client = AnyEvent::Mypeople::Client->new( apikey => 'xxxx', ); my $httpd = AnyEvent::HTTPD->new(port => 8080); $httpd->reg_cb( '/' => sub { my $action = $req->parm('action'); my $buddyId = $req->parm('buddyId'); my $groupId = $req->parm('groupId'); my $content = $req->parm('content'); $req->respond({ content => [ 'text/plain', "AnyEvent::Mypeople::Client" ]}); if ($action =~ /^sendFrom/) { $client->send($buddyId || $groupId, 'hi', sub { my $json = shift; print "$json\n"; }); } } ); $httpd->run;
Hyungsuk Hong <hshong@perl.kr>
This software is copyright (c) 2013 by Hyungsuk Hong.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install AnyEvent::Mypeople::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::Mypeople::Client
CPAN shell
perl -MCPAN -e shell install AnyEvent::Mypeople::Client
For more information on module installation, please visit the detailed CPAN module installation guide.