NAME
WWW::Vimeo::Simple::User - User requests for the Vimeo Simple API
VERSION
version 0.10
SYNOPSIS
This module is a full object-oriented implementation of the Vimeo Simple API. The specifications are available at http://vimeo.com/api/docs/simple-api.
User requests implementation.
use feature 'say';
use WWW::Vimeo::Simple::User;
# create a new user object
my $user = WWW::Vimeo::Simple::User -> new(display_name => $user);
# retrieve user's information
$user -> info;
# print user's information
say $user -> display_name;
say $user -> bio;
say $user -> url;
# retrieve user's videos
my $videos = $user -> videos;
foreach my $video (@$videos) {
say $video -> title;
say $video -> description;
say $video -> url;
}
METHODS
new( id => $user_id, display_name => $user_name )
Create a WWW::Vimeo::Simple::User object using the given user ID or name.
An User object has the following attributes:
id
User ID
display_name
User name
created_on
Date the user signed up
is_staff
Is this user a staff member?
is_plus
Is this user a Vimeo Plus member?
location
The location of the user
url
User supplied url
bio
The bio information from the user profile
profile_url
URL to the user profile
videos_url
URL to the video list for this user
total_videos_uploaded
Total # of videos uploaded
total_videos_appears_in
Total # of videos user appears in
total_videos_liked
Total # of videos liked by user
total_contacts
Total # of contacts
total_albums
Total # of albums
total_channels
Total # of channels moderated by user
portrait_small
Small user portrait (30px)
portrait_medium
Medium user portrait (100px)
portrait_large
Large user portrait (300px)
info
Fetch video info for the specified user.
videos( $page )
Fetch videos created by user, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Video objects.
likes( $page )
Fetch videos the user likes, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Video objects.
appears_in( $page )
Fetch videos that the user appears in, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Video objects.
all_videos( $page )
Fetch videos that the user appears in and created, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Video objects.
subscriptions( $page )
Fetch videos the user is subscribed to, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Video objects.
albums( $page )
Fetch albums the user has created, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Album objects.
channels( $page )
Fetch channels the user has created and subscribed to, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Channel objects.
groups( $page )
Fetch groups the user has created and joined, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Group objects.
contacts_videos( $page )
Fetch videos that the user's contacts created, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Video objects.
contacts_like( $page )
Fetch videos that the user's contacts like, page optional (default 1). This method returns an array reference of WWW::Vimeo::Simple::Video objects.
INTERNAL SUBROUTINES
_make_url( $request )
Build a Vimeo Simple API url
AUTHOR
Alessandro Ghedini <alexbio@cpan.org>
LICENSE AND COPYRIGHT
Copyright 2011 Alessandro Ghedini.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.