PREREQ_PM => {
qw/Class::Accessor::Fast 0
Date::Parse 0
+ IO::Socket::SSL 0
JSON::MaybeXS 0
+ Mozilla::CA 0
Sort::ByExample 0/,
},
META_ADD => {
our @EXPORT = qw/strike strike_search/; ## no critic (ProhibitAutomaticExportation)
our @EXPORT_OK = qw/strike_query strike strike_search/;
our $VERSION = '0.003';
-our $BASE_URL = 'http://getstrike.net/api/v2/torrents';
+our $BASE_URL = 'https://getstrike.net/api/v2/torrents';
use JSON::MaybeXS qw/decode_json/;
use HTTP::Tiny;
use Sort::ByExample qw/sbe/;
use WebService::Strike::Torrent;
-sub _ht { HTTP::Tiny->new(agent => "WebService-Strike/$VERSION") }
+sub _ht { HTTP::Tiny->new(agent => "WebService-Strike/$VERSION", verify_SSL => 1) }
sub _query {
my ($url) = @_;
=head1 SEE ALSO
-L<WebService::Strike::Torrent>, L<http://getstrike.net/api/>, L<WWW::Search::Torrentz>
+L<WebService::Strike::Torrent>, L<https://getstrike.net/api/>, L<WWW::Search::Torrentz>
=head1 AUTHOR
=head1 SEE ALSO
-L<WebService::Strike>, L<http://getstrike.net/api/>
+L<WebService::Strike>, L<https://getstrike.net/api/>
=head1 AUTHOR
use strict;
use warnings;
-use Test::RequiresInternet qw/getstrike.net 80/;
+use Data::Dumper qw/Dumper/;
+use Test::RequiresInternet qw/getstrike.net 443/;
use Test::More tests => 9;
use Try::Tiny;
BEGIN { use_ok('WebService::Strike') };
-my ($t1, $t2, $t3) = strike qw/B425907E5755031BDA4A8D1B6DCCACA97DA14C04 5D4FD5A64E436A831383773F85FB38B888B9ECC9 85DF191A921C20B2DDAFF72368CAB93BA18C5ACE/;
+my ($t1, $t2, $t3);
+try {
+ ($t1, $t2, $t3) = strike qw/B425907E5755031BDA4A8D1B6DCCACA97DA14C04 5D4FD5A64E436A831383773F85FB38B888B9ECC9 85DF191A921C20B2DDAFF72368CAB93BA18C5ACE/;
+} catch {
+ diag 'Error while calling strike:', "\n", Dumper $_
+};
subtest 'order' => sub {
plan tests => 3;