use E2::Usergroup;
my $group = new E2::Usergroup;
$group->login( "username", "password" ); # See E2::Interface
if( $group->load( "edev" ) ) { # See E2::Node
print "Listing for group " . $group->title; # See E2::Node
print "\n(Description: " . $group->description . ")";
print "\nMembers:\n";
foreach my $m ($group->list_members) {
print " " . $m->{name} . "\n";
}
# Note, this weblog listing will only be available to
# members of this group.
print "\nWeblog:\n";
foreach my $w ($group->list_weblog) {
print " " . $w->{title} . "\n";
}
}
This module provides access to http://everything2.com's usergroup lists. It inherits E2::Node.
new creates a new E2::Usergroup object. Until that object is logged in in one way or another (see the E2::Interface manpage), it will use the ``Guest User'' account, and will be limited in what information it can fetch and which operations it can perform.
clear clears all the information currently stored in $group.
undef if no usergroup is loaded.
undef if no usergroup is loaded.
The keys to the returned hashrefs are the following:
name # Username
id # user_id
title # Title of the weblogged node
id # node_id of the weblogged node
NOTE: To recieve this weblog, the user must be logged in and must be a member of this usergroup. If the usergroup has no weblog or if the user has no access to it, this method returns an empty list. If there is no usergroup currently loaded, this method returns undef.
the E2::Interface manpage, the E2::Node manpage, http://everything2.com, http://everything2.com/
Jose M. Weeks <jose@joseweeks.com> (Simpleton on E2)
This software is public domain.