Support more than 50 hashes in strike_query
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Mar 2015 12:44:05 +0000 (14:44 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Mar 2015 12:44:05 +0000 (14:44 +0200)
lib/WebService/Strike.pm

index 396ec48676ba61990710417fc734ec9d17032f99..426a1131ce739d436df34dc737792b21caab7dde 100644 (file)
@@ -30,6 +30,9 @@ sub _query {
 
 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 }});
This page took 0.010875 seconds and 4 git commands to generate.