| Net-Plazes documentation | Contained in the Net-Plazes distribution. |
Net::Plazes::User - representation of remote resource http://plazes.com/users(.*)
$Revision$
my @aFields = $oObj->fields();
my $arActivities = $oUser->activities();
$Author: Roger Pettett$
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.10 or, at your option, any later version of Perl 5 you may have available.
| Net-Plazes documentation | Contained in the Net-Plazes distribution. |
######### # Author: rmp # Maintainer: $Author: rmp $ # Created: 2008-08-13 # Last Modified: $Date$ # Id: $Id$ # $HeadURL$ # package Net::Plazes::User; use strict; use warnings; use base qw(Net::Plazes::Base); use Net::Plazes::Activity; our $VERSION = '0.03'; __PACKAGE__->mk_accessors(fields()); __PACKAGE__->has_many(); sub service { return q[http://plazes.com/users]; } sub fields { return qw(id created_at full_name name updated_at avatar_url); } sub activities { my $self = shift; if(!$self->id()) { return []; } if(!$self->{activities}) { my $obj_uri = sprintf '%s/%d/activities', $self->service(), $self->id(); my $root_activity = Net::Plazes::Activity->new({ useragent => $self->useragent(), }); $root_activity->list($obj_uri); $self->{activities} = $root_activity->activities(); } return $self->{activities}; } 1; __END__