view release on metacpan or search on metacpan
(replaced by internal _comment method). Added _post, _get_, _del
methods, proxy to _request main method in API::Instagram. Added
like,dislike and comment methods to API::Instagram::Media. Added
media attribute to API::Instagram::Media::Comment. Added remove
method to API::Instagram::Media::Comment.
Change: ec7504d1d44f315b5db6c0d07a19fffe3dcbf9d5
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-27 00:20:02 +0000
Tests reorganized
Change: 18d4c00985ef334e019f94be9d2d7a1bfd00764e
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-26 23:16:30 +0000
Starting version 0.012. Add popular_medias method to API::Instagram.
Some methods do not require token anymore (as Instagram API Docs
describes). Add relatioship get/set method to API::Instagramm::User.
Change: 3e4383545f6a505294ff8a4eb0ed754e4720cd04
---
abstract: 'Object Oriented Interface for the Instagram REST and Search APIs'
author:
- 'Gabriel Vieira <gabriel.vieira@gmail.com>'
build_requires:
File::Spec: 0
Furl::Response: 0
IO::Handle: 0
IPC::Open3: 0
Inline::Files: 0
Test::MockObject::Extends: 0
Test::More: 0
perl: 5.010
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142060'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: API-Instagram
Makefile.PL view on Meta::CPAN
"experimental" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"File::Spec" => 0,
"Furl::Response" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Inline::Files" => 0,
"Test::MockObject::Extends" => 0,
"Test::More" => 0
},
"VERSION" => "0.013",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Carp" => 0,
"Data::Dumper" => 0,
"Digest::MD5" => 0,
"File::Spec" => 0,
"Furl" => 0,
"Furl::Response" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Inline::Files" => 0,
"JSON" => 0,
"Moo" => 0,
"Test::MockObject::Extends" => 0,
"Test::More" => 0,
"Time::Moment" => 0,
"URI" => 0,
"experimental" => 0,
"strict" => 0,
"warnings" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
t/00-comment.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 11;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1,
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
t/00-compile.t view on Meta::CPAN
use 5.006;
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.045
use Test::More tests => 7 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
my @module_files = (
'API/Instagram.pm',
'API/Instagram/Location.pm',
'API/Instagram/Media.pm',
'API/Instagram/Media/Comment.pm',
'API/Instagram/Search.pm',
'API/Instagram/Tag.pm',
t/00-instagram.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use Furl;
use Furl::Response;
use Inline::Files;
use API::Instagram;
use Test::More tests => 17;
my $data = join '', <DATA>;
my $ua = Test::MockObject::Extends->new( Furl->new() );
my $res = Test::MockObject::Extends->new( Furl::Response->new( 1, 200, 'OK', {}, $data) );
$ua->mock('get', sub { $res });
$ua->mock('post', sub { $res });
my $api = API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1,
_ua => $ua,
t/00-instagram.t view on Meta::CPAN
is $api2->access_token, 123456789;
isa_ok( $me, 'API::Instagram::User');
is $me->username, "snoopdogg";
is ref $api->_request('get','media'), 'HASH';
my @list = $api->_get_list( { url => 'media', count => 2 } );
is ~~@list , 2;
# Tests Popular Medias method with new DATA (__POPULAR__)
my $popular = join '', <POPULAR>;
my $res2 = Test::MockObject::Extends->new( Furl::Response->new( 1, 200, 'OK', {}, $popular) );
$ua->mock('get', sub { $res2 });
is ref $api2->popular_medias, 'ARRAY';
is $api2->popular_medias->[0]->user->username, 'cocomiin';
__DATA__
{
"meta": {
"code": 200
},
t/00-load.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More tests => 7;
BEGIN { use_ok 'API::Instagram'; }
BEGIN { use_ok 'API::Instagram::Media'; }
BEGIN { use_ok 'API::Instagram::Media::Comment'; }
BEGIN { use_ok 'API::Instagram::User'; }
BEGIN { use_ok 'API::Instagram::Tag'; }
BEGIN { use_ok 'API::Instagram::Location'; }
BEGIN { use_ok 'API::Instagram::Search'; }
t/00-location.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 6;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
$api->mock('_request', sub { $json });
t/00-media.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 27;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123', client_secret => '456', redirect_uri => 'http://localhost', no_cache => 1, })
);
my $data = join '', <DATA>;
my $json = decode_json $data;
$api->mock('_request', sub { $json });
$api->mock('_get_list', sub { {} });
# First Object
t/00-search.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 4;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
$api->mock('_request', sub { $json });
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 5;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
$api->mock('_request', sub { $json });
t/00-user.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 19;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
t/01-location.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 4;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
$api->mock('_request', sub { $json });
t/01-media.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 13;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1,
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
t/01-search.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 1;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
$api->mock('_request', sub { $json });
t/01-user.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 6;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
t/02-user.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 6;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
t/03-user.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 2;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
t/04-user.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::MockObject::Extends;
use JSON;
use API::Instagram;
use Test::More tests => 5;
my $api = Test::MockObject::Extends->new(
API::Instagram->new({
client_id => '123',
client_secret => '456',
redirect_uri => 'http://localhost',
no_cache => 1
})
);
my $data = join '', <DATA>;
my $json = decode_json $data;
t/release-pod-coverage.t view on Meta::CPAN
#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
}
# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
use Test::Pod::Coverage 1.08;
use Pod::Coverage::TrustPod;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
t/release-pod-syntax.t view on Meta::CPAN
#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
}
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use Test::More;
use Test::Pod 1.41;
all_pod_files_ok();