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.
new
E2::User
These return, respectively, the username, user_id, the time of account creation, and the last time the specified user was seen on E2.
NOTE: E2::Node provides $user->createtime, as well as other methods that might be useful in displaying user information.
These return, respectively, the username and user_id of this user's alias (for message forwarding) if he indeed has one.
text returns the text of the "User Bio" section of the user's homenode.
text
These return, respectively, the XP number of the user in question, the level number, and the level including description text ("13 (Pseudo God)", etc.).
These return, respectively, the number of writeups written by the user in question, and the number of C!s he has spent.
image returns a relative URL to the homenode image of the user in question.
image
These return the name and id, respectively, of the most recent node written by this user.
These return the strings that are displayed in the user's homenode regarding his mission drive, specialties, motto, and his employer or school.
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'.
groups
bookmarks returns a list of hashrefs corresponding to the nodes that this user has bookmarked. Hash keys include 'title' and 'id'.
bookmarks
E2::Interface, E2::Node, E2::UserSearch, http://everything2.com, http://everything2.com/?node=clientdev
Jose M. Weeks <jose@joseweeks.com> (Simpleton on E2)
This software is public domain.
To install E2::Interface, copy and paste the appropriate command in to your terminal.
cpanm
cpanm E2::Interface
CPAN shell
perl -MCPAN -e shell install E2::Interface
For more information on module installation, please visit the detailed CPAN module installation guide.