This commit is contained in:
Lanta 2023-11-28 22:45:47 +01:00
parent 81918e07b2
commit 1e7fe58627

View file

@ -44,7 +44,7 @@ foreach ($player in $player_data) {
}
else {
$stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$match" -Method GET -Headers $headers
$sortedStats = $stats.included | Where-Object { $_.attributes.stats } | Sort-Object { $_.attributes.stats.winplace }
$sortedStats = $stats.included | Sort-Object { $_.attributes.stats.winplace }
$stats.included = $sortedStats
$stats | ConvertTo-Json -Depth 100 | Out-File "$scriptroot/../data/matches/$match.json"
}