our @EXPORT = qw/strike strike_search/; ## no critic (ProhibitAutomaticExportation)
our @EXPORT_OK = qw/strike_query strike strike_search/;
-our $VERSION = '0.002';
+our $VERSION = '0.003';
our $BASE_URL = 'http://getstrike.net/api/v2/torrents';
use JSON::MaybeXS qw/decode_json/;
sub strike_query {
my (@hashes) = @_;
+ if (@hashes > 50) {
+ return strike_query (@hashes[0 .. 49]), strike_query (@hashes[50 .. $#hashes]);
+ }
my $url = "$BASE_URL/info/?hashes=" . join ',', map { uc } @hashes;
my $sorter = sbe(\@hashes, {xform => sub { $_[0]->hash }});