view release on metacpan or search on metacpan
.travis.yml view on Meta::CPAN
- "5.16"
- "5.14"
- "5.12"
- "5.10"
branches:
only:
- /^build/
after_success:
- cpanm --quiet --notest Devel::Cover::Report::Coveralls
- cover -test -report coveralls
Change: 3ad5168aebfb3b4f0bfbb5ea35c9804143c1001c
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-21 21:38:52 +0000
Starting version 0.009
Change: c11b9ff04f2128df3e536b08fc54f108d659fad6
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-21 21:36:25 +0000
Added more tests. Now coverage of 100%
Change: c7d6c67501d1e0ca0168f8c020fed2701cf76cb3
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-21 21:35:10 +0000
Some bugs fixed. Add last_likes and last_comments mehtods to
API::Instagram::Media objects
Change: 78e1204e2c853e2e2f4f33261b0ac0a59b71f6e6
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-20 23:37:40 +0000
Adding API::Instagram::Media tests
Change: 1014b57b8f0a5135a8e2c0c366160b70d9ec1a4e
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-20 20:24:03 +0000
Replacing LWP::UserAgent with Furl
Change: 2284e36dc0b688c91ea316bfda29baedc9e803cd
Author: Gabriel Vieira <gabriel.vieira@gmail.com>
Date : 2014-08-20 17:29:55 +0000
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan API::Instagram
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
If you are installing into a system-wide directory, you may need to run:
% sudo make install
## Documentation
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Makefile.PL view on Meta::CPAN
"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,
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,
})
);
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
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',
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>;
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 { {} });
t/00-media.t view on Meta::CPAN
"height": 480
},
"standard_resolution": {
"url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4",
"width": 640,
"height": 640
}
},
"users_in_photo": null,
"filter": "Vesper",
"tags": ["test"],
"comments": {
"data": [{
"created_time": "1279332030",
"text": "Love the sign here",
"from": {
"username": "mikeyk",
"full_name": "Mikey Krieger",
"id": "4",
"profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
},
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>;
#!/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>;
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
})
);
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>;
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,
})
);
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>;
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
})
);
t/01-user.t view on Meta::CPAN
is ref $user->feed, 'ARRAY';
is ref $user->liked_media, 'ARRAY';
is ref $user->requested_by, 'ARRAY';
__DATA__
{
"data": {
"id": "self",
"username": "snoopdogg",
"full_name": "Snoop Dogg",
"profile_pic_url": "http://test.com/picture.jpg",
"profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1574083_75sq_1295469061.jpg",
"bio": "This is my bio",
"website": "http://snoopdogg.com",
"counts": {
"media": 1320,
"follows": 420,
"followed_by": 3410
}
}
}
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;
$api->mock('_request', sub { $json });
$api->mock('_get_list', sub { [] });
my $user = $api->user( $json->{data} );
isa_ok( $user, 'API::Instagram::User' );
is $user->id, 123;
is $user->profile_picture, 'http://test.com/picture.jpg';
is $user->feed, undef;
is $user->liked_media, undef;
is $user->requested_by, undef;
__DATA__
{
"data": {
"id": "123",
"username": "snoopdogg",
"full_name": "Snoop Dogg",
"profile_pic_url": "http://test.com/picture.jpg",
"bio": "This is my bio",
"website": "http://snoopdogg.com",
"counts": {
"media": 1320,
"follows": 420,
"followed_by": 3410
}
}
}
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
})
);
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
})
);
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();