or die "Usage: $0 <profile id>... [<clan name>...]\n";
my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches || []};
+my @realmget = (profile => 2 => 1); # common request path for european data
sub blizget {
state $bliz = do {
my @authdata = do './.blizzard.passwd.pl' and not $@ || $!
# prefer deprecated interface to prevent costly ladder search
my @ladderdata = map {
- blizget(legacy => profile => 2 => 1 => $_ => 'ladders')
+ blizget(legacy => @realmget => $_ => 'ladders')
} @{$profiles};
# merge relevant ladder data of all users
@ladders
],
members => [map {
- blizget(metadata => profile => 2 => 1 => $_->{id})
+ blizget(metadata => @realmget => $_->{id})
# lacks mmr, fav race (available in new api)
} @members],
}) =~ s/(?: \G \d,? | \[ ) \K \s+ (?=\d|\])/ /grx; # concat arrays of single digits