feat: 更新 blPlus 函数以支持获取当前用户所在区对应 + N 位的玩家列表,并修正 PlayerData 中的字段名为大写形式

This commit is contained in:
lixiangwuxian
2025-05-03 23:21:18 +08:00
parent ec6d65c9b8
commit a5b6f070b4
4 changed files with 47 additions and 27 deletions

View File

@@ -143,8 +143,7 @@ func FetchCountryLeaderboard(country string, offset int, ssID string) (Leaderboa
if offset < 1 {
offset = 1
}
page := (offset-1)/50 + 1
url := fmt.Sprintf("https://scoresaber.com/api/players?countries=%s&page=%d", country, page)
url := fmt.Sprintf("https://scoresaber.com/api/players?countries=%s&page=%d", country, (offset-1)/50+1)
// 创建请求
req, err := http.NewRequest("GET", url, nil)