NAME

WebService::Ustream::API::User - Perl interface to Ustream User API Service

SYNOPSIS

use WebService::Ustream::API::User;

$ust = WebService::Ustream::API::User->new( { key => YOUR_KEY } );
my $ret = $ust->info('koba206'); 

print $ret->{id};
print $ret->{registereAt};
print $ret->{gender};
print $ret->{url};
print $ret->{website};
print $ret->{about};
print $ret->{rating};
print $ret->{numberOf}->{comments};
print $ret->{numberOf}->{friends};

my $ret = $ust->list_channels('spacevidcast');

print $ret->{array}->{0}->{id};
print $ret->{array}->{0}->{title};
print $ret->{array}->{0}->{urlTitleName};
print $ret->{array}->{0}->{description};
print $ret->{array}->{0}->{totalViews};
print $ret->{array}->{0}->{status};
print $ret->{array}->{0}->{url};
print $ret->{array}->{0}->{embedTag};

my $ret = $ust->list_videos('spacevidcast');

print $ret->{array}->{id};
print $ret->{array}->{title};
print $ret->{array}->{lengthInSecond};
print $ret->{array}->{url};
print $ret->{array}->{embedTag};

DESCRIPTION

WebService::Ustream::API::User is a simple interface to Ustream's user information.

METHODS

new(\%fields)

$ust = WebService::Ustream::API::User->new( { key => YOUR_KEY } );

Creates an instace of WebService::Ustream::API::User. KEY is required when you call Ustream API.

info([username or userid])
my $ret = $ust->info('koba206');
my $ret = $ust->info('19185'); #19185 is koba206's userid 

retrieve user account information

list_channels([username or userid])
my $ret = $ust->list_channels('koba206');

retrieve all the channels belonging to a user

list_videos([username or userid])
my $ret = $ust->list_videos('spacevidcast');

retrieve all the videos belonging to the user specified

comments([username or userid])
my $ret = $ust->comments('koba206');

returns any comments for the user profile specified by username or userid

SEE ALSO

URI::Fetch http://developer.ustream.tv/

AUTHOR

Takeshi Kobayashi, <koba206@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Takeshi Kobayashi

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.8 or, at your option, any later version of Perl 5 you may have available.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 148:

'=item' outside of any '=over'

Around line 180:

You forgot a '=back' before '=head1'