WWW::Plurk::Friend - A plurk friend


WWW-Plurk documentation Contained in the WWW-Plurk distribution.

Index


Code Index:

NAME

Top

WWW::Plurk::Friend - A plurk friend

VERSION

Top

This document describes WWW::Plurk::Friend version 0.02

SYNOPSIS

Top

    use WWW::Plurk;
    my $plurk = WWW::Plurk->new( 'username', 'password' );
    my @friends = $plurk->friends;

DESCRIPTION

Top

Represents a user other than the logged in user.

Based on Ryan Lim's unofficial PHP API: http://code.google.com/p/rlplurkapi/

INTERFACE

Top

new

Called internally.

friends

Get this user's friends. See WWW::Plurk#friends for more details.

Accessors

The following accessors provide access to the content of this Plurk:

* display_name
* full_name
* gender
* has_profile_image
* id
* is_channel
* karma
* location
* nick_name
* page_title
* relationship
* star_reward
* uid
* plurk

CONFIGURATION AND ENVIRONMENT

Top

WWW::Plurk requires no configuration files or environment variables.

DEPENDENCIES

Top

None.

INCOMPATIBILITIES

Top

None reported.

BUGS AND LIMITATIONS

Top

No bugs have been reported.

Please report any bugs or feature requests to bug-www-plurk@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Top

Andy Armstrong <andy.armstrong@messagesystems.com>

http://www.plurk.com/user/AndyArmstrong

LICENCE AND COPYRIGHT

Top


WWW-Plurk documentation Contained in the WWW-Plurk distribution.
package WWW::Plurk::Friend;

use warnings;
use strict;
use Carp;

our $VERSION = '0.02';

BEGIN {
    my @INFO = qw(
      display_name
      full_name
      gender
      has_profile_image
      id
      is_channel
      karma
      location
      nick_name
      page_title
      relationship
      star_reward
      uid
      plurk
    );

    for my $info ( @INFO ) {
        no strict 'refs';
        *{$info} = sub { shift->{$info} };
    }
}

sub new {
    my ( $class, $plurk, $uid, $detail ) = @_;
    return bless {
        plurk => $plurk,
        uid   => $uid,
        %$detail,
    }, $class;
}

sub friends {
    my $self = shift;
    return $self->plurk->friends_for( $self );
}

1;
__END__