|
NAMENet::Plurk - A perl interface to Plurk API VERSIONVersion 0.11 SYNOPSISQuick summary of what the module does. Perhaps a little code snippet. use Net::Plurk;
my $key = $CONSUMER_KEY;
my $secret = $CONSUMER_SECRET;
my $access_token = $ACCESS_TOKEN
my $access_secret = $ACCESS_TOKEN_SECRET
my $p = Net::Plurk->new(consumer_key => $key, consumer_secret => $secret);
my $p->authorize(access_token => $access_token,
access_token_secret => $access_secret)
my $profile = $p->get_own_profile();
$p->add_events(
on_new_plurk => sub {
my $plurk = shift;
use Data::Dumper; warn Dumper $plurk;
},
on_private_plurk => sub {
my $plurk = shift;
# blah
},
);
$p->listen;
my $json = $p->callAPI( '/api');
...
EXPORTA list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module. FUNCTIONScallAPIEverything from here errorcodereturn errorcode errormsgreturn errormsg authorizeauthorize with access token/secret callAPIEverything from here _get_unique_idgiven nick_name, return unique_id get_nick_namegiven unique_id, return nick_name get_public_profilecall /Profile/getPublicProfile get_own_profilecall /Profile/getOwnProfile get_new_plurkscall /Polling/getPlurks arguments =>
karmareturn user's karma, or specify user => 'who' followreturn 1 if followed someone, 0 otherwise (see errormsg) unfollowreturn 1 if unfollowed someone, 0 otherwise (see errormsg) add_plurk add_plurk ($content, $qualifier %opt)
%opt: limited_to, no_comment, lang
get_plurk get_plurk ($plurk_id)
$plurk_id can be base 36 encoded, or not
AUTHORCheng-Lung Sung, "<clsung at cpan.org>" BUGSPlease report any bugs or feature requests to "bug-net-plurk at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Plurk>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORTYou can find documentation for this module with the perldoc command. perldoc Net::Plurk You can also look for information at:
ACKNOWLEDGEMENTSCOPYRIGHT & LICENSECopyright 2009~2011 Cheng-Lung Sung, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|