sorting
This commit is contained in:
parent
88875f16c7
commit
17abedc23c
2 changed files with 3 additions and 1 deletions
|
|
@ -46,6 +46,8 @@ foreach ($player in $player_data) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$match" -Method GET -Headers $headers
|
$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 }
|
||||||
|
$stats.included = $sortedStats
|
||||||
$stats | ConvertTo-Json -Depth 100 | Out-File "$scriptroot/../data/matches/$match.json"
|
$stats | ConvertTo-Json -Depth 100 | Out-File "$scriptroot/../data/matches/$match.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ while($playerinfo.data.Count -gt $i) {
|
||||||
$i++
|
$i++
|
||||||
|
|
||||||
}
|
}
|
||||||
$seasonstats | convertto-json -Depth 100| Out-File "$scriptroot/../data/player_season_data.json"
|
$seasonstats | Sort-Object -Property {$_.stat.data.attributes.rankedGameModeStats.'squad-fpp'.currentRankPoint} -Descending | convertto-json -Depth 100| Out-File "$scriptroot/../data/player_season_data.json"
|
||||||
|
|
||||||
remove-lock
|
remove-lock
|
||||||
Stop-Transcript
|
Stop-Transcript
|
||||||
Loading…
Add table
Add a link
Reference in a new issue