Update data structure

This commit is contained in:
Chris Sexton 2023-12-02 00:28:42 -05:00
parent e4b21fc080
commit 1b2a337b79
1 changed files with 44 additions and 21 deletions

View File

@ -67,15 +67,38 @@ func GetLeaderboard(session string, year, id int) (LeaderBoard, error) {
} }
type Member struct { type Member struct {
ID string `json:"id"`
Stars int `json:"stars"`
GlobalScore int `json:"global_score"` GlobalScore int `json:"global_score"`
Name string `json:"name"` Stars int `json:"stars"`
LocalScore int `json:"local_score"` LocalScore int `json:"local_score"`
LastStarTs int `json:"last_star_ts"`
ID int `json:"id"`
CompletionDayLevel struct {
Num1 struct {
Num1 struct {
GetStarTs int `json:"get_star_ts"`
StarIndex int `json:"star_index"`
} `json:"1"`
Num2 struct {
GetStarTs int `json:"get_star_ts"`
StarIndex int `json:"star_index"`
} `json:"2"`
} `json:"1"`
Num2 struct {
Num1 struct {
GetStarTs int `json:"get_star_ts"`
StarIndex int `json:"star_index"`
} `json:"1"`
Num2 struct {
GetStarTs int `json:"get_star_ts"`
StarIndex int `json:"star_index"`
} `json:"2"`
} `json:"2"`
} `json:"completion_day_level"`
Name string `json:"name"`
} }
type LeaderBoard struct { type LeaderBoard struct {
Event string `json:"event"` Event string `json:"event"`
OwnerID string `json:"owner_id"` OwnerID int `json:"owner_id"`
Members map[string]Member `json:"members"` Members map[string]Member `json:"members"`
} }