WWW::Hatena::WanWanWorld - Client class to access Hatena Wan Wan World
use WWW::Hatena::WanWanWorld; ## Login my $www = WWW::Hatena::WanWanWorld->new; my $username = $www->login('username','password') or die "Login failed!"; ## Prepare $www->position(35.657540,139.702341); $www->voice('BowWow!!'); ## To set own position and voice, and get around users in 2km. my $arounds = $www->get_around(2); ## To get own friend. my $friends = $www->get_friend; ## To get markers (house, or so) in 2km around. my $markers = $www->get_marker(2); ## To add other user to own friend. $www->add_friend("otheruser"); ## To add other user to own friend. $www->delete_friend("otheruser"); ## To put own house here. $www->add_house; ## Logout. $www->logout;
WWW::Hatena::WanWanWorld is a client to operate your own dog in Hatena Wan Wan World from perl.
new
my $www = WWW::Hatena::Scraper->new([ %opts ]);
You can set the ua and charset option in constructor.
ua
charset
If you want to reuse LWP::UserAgent object, set it to this option.
You MUST set this option if you want to use multi-byte string as binary data. (Even if you use UTF-8!) With this, you specify the character code using in script. If you use this module under "use utf8;" or "use encoding foobar;" environment, you MUST NOT set this value.
MUST
MUST NOT
Login to Hatena Wan Wan World. Return value is Hatena user id, and if undef returns, login failed.
Logout from Hatena Wan Wan World.
Returns user id if login successed.
Returns login cookie if login successed. Give this value to login method later, you can relogin, unless it hasn't expired.
Set or get user's(dog's?) position in latitude,longitude array.
Set or get latitude of user's(dog's?) position.
Set or get longitude of user's(dog's?) position.
Set or get user's(dog's?) voice to show.
Send position and voice data to Hatena Wan Wan World's server. Return object is, other user's list of around $km kilo meters. Object is just raw hash-ref translated from JSON response. If $km value is too big, (maybe $km > 9), server returns no value. This may specification of Hatena Wan Wan World.
Return same object of get_around method returns. You can get it later by this method.
Return object is, friend's list of user. Object is just raw array-ref translated from JSON response.
Return same object of get_friend method returns. You can get it later by this method.
Return object is, marker (house, or so) list of around $km kilo meters. Object is just raw hash-ref translated from JSON response.
Return same object of get_marker method returns. You can get it later by this method.
Add other user to user's friend. Return 1 if succesed, 0 if failed.
Delete other user to user's friend. Return 1 if succesed, 0 if failed.
Build user's own house at user's position.
Returns the last error, in form "errcode: errtext"
Returns the last error code.
Returns the last error text.
Make user-friendry class to handle objects translated from JSON.
This module is Copyright (c) 2006 OHTSUKA Ko-hei. All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. If you need more liberal licensing terms, please contact the maintainer.
This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
Hatena Wan Wan World website: http://world.hatelabo.jp/
WWW::Hatena::Scraper -- part of this module
OHTSUKA Ko-hei <nene@kokogiko.net>
3 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install WWW::Hatena::Scraper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Hatena::Scraper
CPAN shell
perl -MCPAN -e shell install WWW::Hatena::Scraper
For more information on module installation, please visit the detailed CPAN module installation guide.