NAME
API::Instagram::User - Instagram User Object
VERSION
version 0.013
SYNOPSIS
my $me = $instagram->user;
my $other = $instagra->user(12345);
printf "My username is %s and I follow %d other users.\n", $me->username, $me->follows;
printf "The other user full name is %s", $other->full_name;
DESCRIPTION
See http://instagr.am/developer/endpoints/users/ and http://instagram.com/developer/endpoints/relationships/.
ATTRIBUTES
id
Returns user id.
username
Returns user username.
full_name
Returns user full name.
bio
Returns user biography text.
website
Returns user website.
profile_picture
Returns user profile picture url.
media
Returns user total media.
follows
Returns user total follows.
followed_by
Returns user total followers.
METHODS
feed
my $medias = $user->feed( count => 5 );
print $_->caption . $/ for @$medias;
Returns a list of API::Instagram::Media objects of the authenticated user feed.
Accepts count
, min_id
and max_id
as parameters.
liked_media
my $medias = $user->liked_media( count => 5 );
print $_->caption . $/ for @$medias;
Returns a list of API::Instagram::Media objects of medias liked by the authenticated user.
Accepts count
and max_like_id
as parameters.
requested_by
my $requested_by = $user->get_requested_by( count => 5 );
print $_->username . $/ for @$requested_by;
Returns a list of API::Instagram::User objects of users who requested this user's permission to follow.
Accepts count
as parameter.
get_follows
my $follows = $user->get_follows( count => 5 );
print $_->username . $/ for @$follows;
Returns a list of API::Instagram::User objects of users this user follows.
Accepts count
as parameter.
get_followers
my $followers = $user->get_followers( count => 5 );
print $_->username . $/ for @$followers;
Returns a list of API::Instagram::User objects of users this user is followed by.
Accepts count
as parameter.
recent_medias
my $medias = $user->recent_medias( count => 5 );
print $_->caption . $/ for @$medias;
Returns a list of API::Instagram::Media objects of user's recent medias.
Accepts count
, min_timestamp
, min_id
, max_id
and max_timestamp
as parameters.
relationship
my $relationship = $user->relationship;
say $relationship->{incoming_status};
Returns a HASH
reference contaning information about the relationship of the user with the authenticated user.
This reference contains two keys:
outgoing_status: Authenticated user relationship to the user. Can be follows
, requested
, none
.
incoming_status: A user's relationship to the authenticated user. Can be followed_by
, requested_by
, blocked_by_you
, none
.
$user->relationship('follow');
When an action (as parameter) is given, it sends a request to modify the relationship to the given one.
The action can be one of follow
/unfollow
/block
/unblock
/approve
/ignore
.
AUTHOR
Gabriel Vieira <gabriel.vieira@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Gabriel Vieira.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.