API-Instagram
view release on metacpan or search on metacpan
printf "Posted by %s at %s (%d likes)\n\n", $media->user->username, $media->created_time, $media->likes;
}
DESCRIPTION
This module implements an OO interface to Instagram REST API.
Authentication
Instagram API uses the OAuth2 for authentication, requering a
"client_id" and "client_secret". See
<http://instagr.am/developer/register/> for details.
Authorize
Get the AUTH URL to authenticate.
use API::Instagram;
my $instagram = API::Instagram->new({
client_id => 'xxxxxxxxxx',
client_secret => 'xxxxxxxxxx',
redirect_uri => 'http://localhost',
scope => 'basic',
response_type => 'code',
granty_type => 'authorization_code',
no_cache => 1,
});
Returns an API::Instagram object.
Set "client_id", "client_secret" and "redirect_uri" with the ones
registered to your application. See
<http://instagram.com/developer/clients/manage/>.
"scope" is the scope of access. See
<http://instagram.com/developer/authentication/#scope>.
"response_type" and "granty_type" do no vary. See
<http://instagram.com/developer/authentication/>.
By default, API::Instagram caches created objects to avoid duplications.
You can disable this feature setting a true value to "no_chace"
parameter.
instance
my $instagram = API::Instagram->instance;
print $instagram->user->full_name;
or
lib/API/Instagram.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
API::Instagram - Object Oriented Interface for the Instagram REST and Search APIs
=for Pod::Coverage client_id client_secret grant_type no_cache redirect_uri response_type scope BUILD
=for HTML <a href="https://travis-ci.org/gabrielmad/API-Instagram"><img src="https://travis-ci.org/gabrielmad/API-Instagram.svg?branch=build%2Fmaster"></a>
=for HTML <a href='https://coveralls.io/r/gabrielmad/API-Instagram?branch=build%2Fmaster'><img src='https://coveralls.io/repos/gabrielmad/API-Instagram/badge.png?branch=build%2Fmaster' alt='Coverage Status' /></a>
=head1 VERSION
version 0.013
=head1 SYNOPSIS
use API::Instagram;
my $instagram = API::Instagram->new({
lib/API/Instagram.pm view on Meta::CPAN
}
=head1 DESCRIPTION
This module implements an OO interface to Instagram REST API.
=head2 Authentication
Instagram API uses the OAuth2 for authentication, requering a C<client_id> and
C<client_secret>. See L<http://instagr.am/developer/register/> for details.
=head3 Authorize
Get the AUTH URL to authenticate.
use API::Instagram;
my $instagram = API::Instagram->new({
client_id => 'xxxxxxxxxx',
client_secret => 'xxxxxxxxxx',
lib/API/Instagram.pm view on Meta::CPAN
redirect_uri => 'http://localhost',
scope => 'basic',
response_type => 'code',
granty_type => 'authorization_code',
no_cache => 1,
});
Returns an L<API::Instagram> object.
Set C<client_id>, C<client_secret> and C<redirect_uri> with the ones registered
to your application. See L<http://instagram.com/developer/clients/manage/>.
C<scope> is the scope of access. See L<http://instagram.com/developer/authentication/#scope>.
C<response_type> and C<granty_type> do no vary. See L<http://instagram.com/developer/authentication/>.
By default, L<API::Instagram> caches created objects to avoid duplications. You can disable
this feature setting a true value to C<no_chace> parameter.
=head2 instance
my $instagram = API::Instagram->instance;
print $instagram->user->full_name;
or
lib/API/Instagram/Location.pm view on Meta::CPAN
for my $media ( @{ $location->recent_medias( count => 5) } ) {
printf "Caption: %s\n", $media->caption;
printf "Posted by %s (%d likes)\n\n", $media->user->username, $media->likes;
}
=head1 DESCRIPTION
See L<http://instagr.am/developer/endpoints/locations/>.
=head1 ATTRIBUTES
=head2 id
Returns the location id.
=head2 name
Returns the name of the location.
lib/API/Instagram/Media.pm view on Meta::CPAN
my $media = $instagram->media(3);
printf "Caption: %s\n", $media->caption;
printf "Posted by %s (%d likes)\n\n", $media->user->username, $media->likes;
my $location = $media->location;
printf "Media Location: %s (%f,%f)", $location->name, $location->latitude, $location->longitude;
=head1 DESCRIPTION
See L<http://instagr.am/developer/endpoints/media/>.
=head1 ATTRIBUTES
=head2 id
Returns media id.
=head2 type
Returns media type.
lib/API/Instagram/Media/Comment.pm view on Meta::CPAN
version 0.013
=head1 SYNOPSIS
print $comment->text . "\n-\n";
print "By %s, at year %d\n", $comment->from->full_name, $comment->created_time->year;
=head1 DESCRIPTION
See L<http://instagr.am/developer/endpoints/comments/>.
=head1 ATTRIBUTES
=head2 id
Returns comment id.
=head2 from
Returns commenter L<API::Instagram::User> object.
lib/API/Instagram/Tag.pm view on Meta::CPAN
for my $media ( @{ $tag->recent_medias( count => 5) } ) {
printf "Caption: %s\n", $media->caption;
printf "Posted by %s (%d likes)\n\n", $media->user->username, $media->likes;
}
=head1 DESCRIPTION
See L<http://instagr.am/developer/endpoints/tags/>.
=head1 ATTRIBUTES
=head2 name
Returns the Tag name.
=head2 media_count
Returns the total media tagged with it.
lib/API/Instagram/User.pm view on Meta::CPAN
=head1 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;
=head1 DESCRIPTION
See L<http://instagr.am/developer/endpoints/users/> and L<http://instagram.com/developer/endpoints/relationships/>.
=head1 ATTRIBUTES
=head2 id
Returns user id.
=head2 username
Returns user username.
( run in 2.140 seconds using v1.01-cache-2.11-cpan-e1769b4cff6 )