Mojo::WebService::Twitter::User - A Twitter user
use Mojo::WebService::Twitter; my $twitter = Mojo::WebService::Twitter->new(api_key => $api_key, api_secret => $api_secret); my $user = $twitter->get_user(user_id => $user_id); my $username = $user->screen_name; my $name = $user->name; my $created_at = $user->created_at; my $description = $user->description; say "[$created_at] \@$username ($user): $description";
Mojo::WebService::Twitter::User is an object representing a Twitter user. See https://dev.twitter.com/overview/api/users for more information.
my $href = $user->source;
Source data hashref from Twitter API.
my $ts = $user->created_at;
Time::Piece object representing the creation time of the user in UTC.
my $description = $user->description;
User's profile description.
my $count = $user->followers;
Number of followers of the user.
my $count = $user->friends;
Number of friends of the user.
my $user_id = $user->id;
User identifier.
my $tweet = $user->last_tweet;
Most recent tweet by the user (if any), as a Mojo::WebService::Twitter::Tweet object.
my $name = $user->name;
User's full name.
my $bool = $user->protected;
Whether the user's tweets are protected.
my $screen_name = $user->screen_name;
User's twitter screen name.
my $count = $user->statuses;
Number of tweets the user has sent.
my $tz = $user->time_zone;
String describing the user's time zone. This is now always undefined; see https://twittercommunity.com/t/upcoming-changes-to-the-developer-platform/104603.
my $url = $user->url;
User's profile URL.
my $seconds = $user->utc_offset;
User's current offset from UTC in seconds. This is now always undefined; see https://twittercommunity.com/t/upcoming-changes-to-the-developer-platform/104603.
my $bool = $user->verified;
Whether the user is a Verified Account.
Mojo::WebService::Twitter::User inherits all methods from Mojo::Base, and implements the following new ones.
$user = $user->from_source($hr);
Populate attributes from hashref of Twitter API source data.
Report any issues on the public bugtracker.
Dan Book <dbook@cpan.org>
This software is Copyright (c) 2015 by Dan Book.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Mojo::WebService::Twitter
To install Mojo::WebService::Twitter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::WebService::Twitter
CPAN shell
perl -MCPAN -e shell install Mojo::WebService::Twitter
For more information on module installation, please visit the detailed CPAN module installation guide.