subscribe-bot/osuapi/models.go

66 lines
1.6 KiB
Go
Raw Normal View History

2020-10-12 13:47:28 +00:00
package osuapi
2020-10-11 19:32:58 +00:00
2020-10-12 04:22:47 +00:00
type User struct {
2020-10-12 07:32:03 +00:00
ID int `json:"id"`
2020-10-12 04:22:47 +00:00
Username string `json:"username"`
CountryCode string `json:"country_code"`
}
type Beatmapset struct {
2020-10-12 07:32:03 +00:00
ID int `json:"id"`
2020-10-12 04:22:47 +00:00
Artist string `json:"artist"`
ArtistUnicode string `json:"artist_unicode"`
Title string `json:"title"`
TitleUnicode string `json:"title_unicode"`
Creator string `json:"creator"`
UserID int `json:"user_id"`
2020-10-12 04:22:47 +00:00
Covers BeatmapCovers `json:"covers"`
Beatmaps []Beatmap `json:"beatmaps,omitempty"`
LastUpdated string `json:"last_updated,omitempty"`
2020-10-12 04:22:47 +00:00
}
type Beatmap struct {
2020-10-12 07:32:03 +00:00
ID int `json:"id"`
2020-10-12 04:22:47 +00:00
DifficultyRating float64 `json:"difficulty_rating"`
DifficultyName string `json:"version"`
}
type BeatmapCovers struct {
Cover string `json:"cover"`
Cover2x string `json:"cover@2x"`
Card string `json:"card"`
Card2x string `json:"card@2x"`
SlimCover string `json:"slimcover"`
SlimCover2x string `json:"slimcover@2x"`
}
2020-10-11 19:32:58 +00:00
type Event struct {
CreatedAt string `json:"created_at"`
ID int `json:"id"`
Type string `json:"type"`
2020-10-12 04:22:47 +00:00
Achievement EventAchievement `json:"achievement,omitempty"`
2020-10-12 13:47:28 +00:00
Beatmapset EventBeatmapset `json:"beatmapset,omitempty"`
2020-10-11 19:32:58 +00:00
2020-10-12 04:22:47 +00:00
User EventUser `json:"user,omitempty"`
2020-10-11 19:32:58 +00:00
}
2020-10-12 04:22:47 +00:00
type EventAchievement struct{}
2020-10-11 19:32:58 +00:00
2020-10-12 04:22:47 +00:00
type EventBeatmapset struct {
2020-10-11 19:32:58 +00:00
Title string `json:"title"`
URL string `json:"url"`
}
2020-10-12 04:22:47 +00:00
type EventUser struct {
2020-10-11 19:32:58 +00:00
Username string `json:"username"`
URL string `json:"url"`
PreviousUsername string `json:"previousUsername,omitempty"`
}
type BeatmapSearch struct {
Beatmapsets []Beatmapset `json:"beatmapsets"`
}