NAME
Weewar::User - a user of weewar
SYNOPSIS
# make a user
my $user = WeeWar::User->new({ name => 'jrockway' });
# then get their data
my $points = $user->points;
my @units = $user->favorite_units
my @games = $user->games;
# etc.
METHODS
name
Returns the user's username.
id
Returns the user's id.
points
rating
Returns the player's score, usually around 1500.
profile
Returns the URL of the user's profile page.
draws
Returns the number of times the user has ended a game with a draw.
victories
Returns the number of times the user has won.
losses
Returns the number of times the user has lost.
account_type
Returns the user's account type.
ready_to_play
Returns a boolean (undef or "true) indicating whether or not the user is "ready to play".
games_running
Returns the number of games the user is currently playing.
last_login
Returns a DateTime object representing the last time the user logged in.
bases_captured
Returns the number of basses the user has captured.
credits_spent
Returns the number of credits the user has spent.
favorite_units
Returns a list of the user's favorite units.
preferred_players
Returns a list of Weewar::User
objects representing the user's preferred players.
preferred_by
Returns a list of Weewar::User
objects representing players that prefer this user.
games
Returns a list of Weewar::Game
objects representing games that the user has played or is playing.
result
If this User object was returned from Weewar::Game->players
and the game is finished, this field will contain the win/loss status of the game.
For example, the result
of the user that won will be victory
.
INTERNAL METHODS
get
If you call this method, you will die.
SEE ALSO
See Weewar for the main docs.