E2::User - A module for loading user data and sorting and listing a user's writeups
use E2::User;
# Display homenode info
my $user = new E2::User;
$user->load( "dem bones" ); # see E2::Node
print $user->name;
print "\nuser since: " . $user->createtime; # See E2::Node
print "\nlast seen: " . $user->lasttime;
print "\nnumber of writeups / XP: ";
print $user->writeup_count . '/' . $user->experience;
print "\nlevel: " . $user->level_string;
print "\nC!s spent: " . $user->cool_count;
print "\nmission drive within everything:\n\t";
print $user->mission;
print "\nspecialties:\n\t" . $user->specialties;
print "\nschool/company:\n\t" . $user->employment;
print "\nmotto:\n\t" . $user->motto;
print "\nmember of:\n\t";
foreach my $g ( $user->groups ) { print $g->{title} . ' '; }
print "\nmost recent writeup:\n\t";
print $user->lastnode;
print "\n-------------------------------------\n\n";
print $user->text;
print "\n\nUser Bookmarks:\n";
foreach my $g ( $user->bookmarks ) {
print $g->{title};
print "\n";
}
This module provides access to user information that is normally displayed on a user's homenode. It inherits E2::Node.
NOTE: E2::Node provides $user->createtime and other methods that might be useful in displaying user information.
new creates an E2::User object.
NOTE: E2::Node provides $user->createtime, as well as other methods that might be useful in displaying user information.
text returns the text of the ``User Bio'' section of the user's homenode.
image returns a relative URL to the homenode image of the user in question.
groups returns a list of hashrefs corresponding to the groups which this user is a member. It only lists membership in 'gods', 'Content Editors', and 'edev'. Hash keys include 'title' and 'id'.
bookmarks returns a list of hashrefs corresponding to the nodes that this user has bookmarked. Hash keys include 'title' and 'id'.
the E2::Interface manpage, the E2::Node manpage, the E2::UserSearch manpage, http://everything2.com, http://everything2.com/
Jose M. Weeks <jose@joseweeks.com> (Simpleton on E2)
This software is public domain.