Name mysterious parameters used to access profile data.
Subdivision values are for Europe as documented on:
<https://develop.battle.net/documentation/guides/regionality-partitions-and-localization>
Remains hardcoded without support for configurable region
and adaptability for multiple realms (no Russian members yet).
or die "Usage: $0 <profile id>... [<clan name>...]\n";
my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches || []};
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 $@ || $!
sub blizget {
state $bliz = do {
my @authdata = do './.blizzard.passwd.pl' and not $@ || $!
# prefer deprecated interface to prevent costly ladder search
my @ladderdata = map {
# 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
} @{$profiles};
# merge relevant ladder data of all users
@ladders
],
members => [map {
@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
# lacks mmr, fav race (available in new api)
} @members],
}) =~ s/(?: \G \d,? | \[ ) \K \s+ (?=\d|\])/ /grx; # concat arrays of single digits