|
1 | 1 | package osuapi |
2 | 2 |
|
3 | | -import ( |
4 | | - "time" |
5 | | -) |
6 | | - |
7 | 3 | type ScoresResult struct { |
8 | 4 | Scores []Score `json:"scores"` |
9 | 5 | } |
10 | 6 |
|
11 | | -type Mods struct { |
12 | | - Acronym string `json:"acronym"` |
13 | | -} |
14 | | - |
15 | | -type CurrentUserAttributes struct { |
16 | | - Pin any `json:"pin"` |
17 | | -} |
18 | | - |
19 | | -type Country struct { |
20 | | - Code string `json:"code"` |
21 | | - Name string `json:"name"` |
22 | | -} |
23 | | - |
24 | | -type Cover struct { |
25 | | - CustomURL string `json:"custom_url"` |
26 | | - URL string `json:"url"` |
27 | | - ID any `json:"id"` |
28 | | -} |
29 | | - |
30 | 7 | type User struct { |
31 | | - AvatarURL string `json:"avatar_url"` |
32 | | - CountryCode string `json:"country_code"` |
33 | | - DefaultGroup string `json:"default_group"` |
34 | | - ID int `json:"id"` |
35 | | - IsActive bool `json:"is_active"` |
36 | | - IsBot bool `json:"is_bot"` |
37 | | - IsDeleted bool `json:"is_deleted"` |
38 | | - IsOnline bool `json:"is_online"` |
39 | | - IsSupporter bool `json:"is_supporter"` |
40 | | - LastVisit any `json:"last_visit"` |
41 | | - PmFriendsOnly bool `json:"pm_friends_only"` |
42 | | - ProfileColour any `json:"profile_colour"` |
43 | | - Username string `json:"username"` |
44 | | - Country Country `json:"country"` |
45 | | - Cover Cover `json:"cover"` |
| 8 | + AvatarURL string `json:"avatar_url"` |
| 9 | + CountryCode string `json:"country_code"` |
| 10 | + ID int64 `json:"id"` |
| 11 | + Username string `json:"username"` |
46 | 12 | } |
47 | 13 |
|
48 | 14 | type Score struct { |
49 | | - ClassicTotalScore int64 `json:"classic_total_score"` |
50 | | - Preserve bool `json:"preserve"` |
51 | | - Processed bool `json:"processed"` |
52 | | - Ranked bool `json:"ranked"` |
53 | | - MaximumStatistics map[string]int64 `json:"maximum_statistics,omitempty"` |
54 | | - Mods []any `json:"mods"` |
55 | | - Statistics map[string]int64 `json:"statistics,omitempty"` |
56 | | - BeatmapID int `json:"beatmap_id"` |
57 | | - BestID any `json:"best_id"` |
58 | | - ID int64 `json:"id"` |
59 | | - Rank string `json:"rank"` |
60 | | - Type string `json:"type"` |
61 | | - UserID int `json:"user_id"` |
62 | | - Accuracy float64 `json:"accuracy"` |
63 | | - BuildID any `json:"build_id"` |
64 | | - EndedAt time.Time `json:"ended_at"` |
65 | | - HasReplay bool `json:"has_replay"` |
66 | | - IsPerfectCombo bool `json:"is_perfect_combo"` |
67 | | - LegacyPerfect bool `json:"legacy_perfect"` |
68 | | - LegacyScoreID int64 `json:"legacy_score_id"` |
69 | | - LegacyTotalScore int64 `json:"legacy_total_score"` |
70 | | - MaxCombo int64 `json:"max_combo"` |
71 | | - Passed bool `json:"passed"` |
72 | | - Pp float64 `json:"pp"` |
73 | | - RulesetID int `json:"ruleset_id"` |
74 | | - StartedAt any `json:"started_at"` |
75 | | - Score int64 `json:"score"` |
76 | | - TotalScore int64 `json:"total_score"` |
77 | | - Replay bool `json:"replay"` |
78 | | - CurrentUserAttributes CurrentUserAttributes `json:"current_user_attributes"` |
79 | | - User User `json:"user"` |
80 | | - TotalScoreWithoutMods int64 `json:"total_score_without_mods,omitempty"` |
| 15 | + ClassicTotalScore int64 `json:"classic_total_score"` |
| 16 | + BeatmapID int64 `json:"beatmap_id"` |
| 17 | + ID int64 `json:"id"` |
| 18 | + UserID int64 `json:"user_id"` |
| 19 | + Accuracy float64 `json:"accuracy"` |
| 20 | + LegacyScoreID int64 `json:"legacy_score_id"` |
| 21 | + LegacyTotalScore int64 `json:"legacy_total_score"` |
| 22 | + MaxCombo int64 `json:"max_combo"` |
| 23 | + Score int64 `json:"score"` |
| 24 | + TotalScore int64 `json:"total_score"` |
| 25 | + User User `json:"user"` |
| 26 | + TotalScoreWithoutMods int64 `json:"total_score_without_mods,omitempty"` |
81 | 27 | } |
82 | 28 |
|
83 | 29 | type LookupResult struct { |
84 | | - BeatmapsetID int `json:"beatmapset_id"` |
85 | | - DifficultyRating float64 `json:"difficulty_rating"` |
86 | | - ID int `json:"id"` |
87 | | - Mode string `json:"mode"` |
88 | | - Status string `json:"status"` |
89 | | - TotalLength int `json:"total_length"` |
90 | | - UserID int `json:"user_id"` |
91 | | - Version string `json:"version"` |
92 | | - Accuracy float64 `json:"accuracy"` |
93 | | - Ar float64 `json:"ar"` |
94 | | - Bpm float64 `json:"bpm"` |
95 | | - Convert bool `json:"convert"` |
96 | | - CountCircles int `json:"count_circles"` |
97 | | - CountSliders int `json:"count_sliders"` |
98 | | - CountSpinners int `json:"count_spinners"` |
99 | | - Cs float64 `json:"cs"` |
100 | | - DeletedAt any `json:"deleted_at"` |
101 | | - Drain float64 `json:"drain"` |
102 | | - HitLength int `json:"hit_length"` |
103 | | - IsScoreable bool `json:"is_scoreable"` |
104 | | - LastUpdated time.Time `json:"last_updated"` |
105 | | - ModeInt int `json:"mode_int"` |
106 | | - Passcount int `json:"passcount"` |
107 | | - Playcount int `json:"playcount"` |
108 | | - Ranked int `json:"ranked"` |
109 | | - URL string `json:"url"` |
110 | | - Checksum string `json:"checksum"` |
111 | | - Beatmapset Beatmapset `json:"beatmapset"` |
112 | | - Failtimes Failtimes `json:"failtimes"` |
113 | | - MaxCombo int `json:"max_combo"` |
114 | | -} |
115 | | - |
116 | | -type Covers struct { |
117 | | - Cover string `json:"cover"` |
118 | | - Cover2X string `json:"cover@2x"` |
119 | | - Card string `json:"card"` |
120 | | - Card2X string `json:"card@2x"` |
121 | | - List string `json:"list"` |
122 | | - List2X string `json:"list@2x"` |
123 | | - Slimcover string `json:"slimcover"` |
124 | | - Slimcover2X string `json:"slimcover@2x"` |
125 | | -} |
126 | | - |
127 | | -type RequiredMeta struct { |
128 | | - MainRuleset int `json:"main_ruleset"` |
129 | | - NonMainRuleset int `json:"non_main_ruleset"` |
130 | | -} |
131 | | - |
132 | | -type NominationsSummary struct { |
133 | | - Current int `json:"current"` |
134 | | - EligibleMainRulesets []string `json:"eligible_main_rulesets"` |
135 | | - RequiredMeta RequiredMeta `json:"required_meta"` |
136 | | -} |
137 | | - |
138 | | -type Availability struct { |
139 | | - DownloadDisabled bool `json:"download_disabled"` |
140 | | - MoreInformation any `json:"more_information"` |
| 30 | + BeatmapsetID int64 `json:"beatmapset_id"` |
| 31 | + ID int64 `json:"id"` |
| 32 | + Mode string `json:"mode"` |
| 33 | + URL string `json:"url"` |
| 34 | + Checksum string `json:"checksum"` |
| 35 | + Beatmapset Beatmapset `json:"beatmapset"` |
141 | 36 | } |
142 | 37 |
|
143 | 38 | type Beatmapset struct { |
144 | | - Artist string `json:"artist"` |
145 | | - ArtistUnicode string `json:"artist_unicode"` |
146 | | - Covers Covers `json:"covers"` |
147 | | - Creator string `json:"creator"` |
148 | | - FavouriteCount int `json:"favourite_count"` |
149 | | - Hype any `json:"hype"` |
150 | | - ID int `json:"id"` |
151 | | - Nsfw bool `json:"nsfw"` |
152 | | - Offset int `json:"offset"` |
153 | | - PlayCount int `json:"play_count"` |
154 | | - PreviewURL string `json:"preview_url"` |
155 | | - Source string `json:"source"` |
156 | | - Spotlight bool `json:"spotlight"` |
157 | | - Status string `json:"status"` |
158 | | - Title string `json:"title"` |
159 | | - TitleUnicode string `json:"title_unicode"` |
160 | | - TrackID any `json:"track_id"` |
161 | | - UserID int `json:"user_id"` |
162 | | - Video bool `json:"video"` |
163 | | - Bpm int `json:"bpm"` |
164 | | - CanBeHyped bool `json:"can_be_hyped"` |
165 | | - DeletedAt any `json:"deleted_at"` |
166 | | - DiscussionEnabled bool `json:"discussion_enabled"` |
167 | | - DiscussionLocked bool `json:"discussion_locked"` |
168 | | - IsScoreable bool `json:"is_scoreable"` |
169 | | - LastUpdated time.Time `json:"last_updated"` |
170 | | - LegacyThreadURL string `json:"legacy_thread_url"` |
171 | | - NominationsSummary NominationsSummary `json:"nominations_summary"` |
172 | | - Ranked int `json:"ranked"` |
173 | | - RankedDate time.Time `json:"ranked_date"` |
174 | | - Storyboard bool `json:"storyboard"` |
175 | | - SubmittedDate time.Time `json:"submitted_date"` |
176 | | - Tags string `json:"tags"` |
177 | | - Availability Availability `json:"availability"` |
178 | | - Ratings []int `json:"ratings"` |
179 | | -} |
180 | | - |
181 | | -type Failtimes struct { |
182 | | - Fail []int `json:"fail"` |
183 | | - Exit []int `json:"exit"` |
| 39 | + ID int64 `json:"id"` |
| 40 | + Offset float64 `json:"offset"` |
184 | 41 | } |
0 commit comments