This repository has been archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstruct.go
89 lines (76 loc) · 2.2 KB
/
struct.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package tatsumakigo
// GuildRankedUser is the struct for a ranked user in a guild leaderboard.
type GuildRankedUser struct {
Rank int64 `json:"rank"`
Score int64 `json:"score,string"`
UserID string `json:"user_id"`
}
// GuildUserPoints is the struct for a user's adjusted points in a guild.
type GuildUserPoints struct {
Points int64 `json:"points,string"`
}
// GuildUserScore is the struct for a user's adjusted score in a guild.
type GuildUserScore struct {
Score int64 `json:"score,string"`
}
// GuildUserStats is the struct for a user's stats in a guild.
type GuildUserStats struct {
GuildID string `json:"guild_id"`
Points int64 `json:"points,string"`
Score int64 `json:"score,string"`
UserID int64 `json:"user_id,string"`
}
// Ping is the struct for a ping response.
type Ping struct {
Pong bool `json:"pong"`
}
// User is the struct for a Tatsumaki user profile.
type User struct {
AvatarURL string
Background *Background
BadgeSlots []*BadgeSlot
Credits int64
InfoBox string
Level int64
LevelProgress *LevelProgress
Name string
Rank int64
Reputation int64
Title string
TotalXp int64
}
// Background is the struct for a profile background.
type Background struct {
ImageURL string
Name string
}
// Badge is the struct for a profile badge.
type Badge struct {
ImageURL string
Name string
}
// BadgeSlot is the struct for a profile badge slot.
// If the badge slot does not contain an equipped badge, the badge is nil.
type BadgeSlot struct {
Badge *Badge
SlotNo int
}
// LevelProgress is the struct for a user's current level progress.
type LevelProgress struct {
CurrentXp int64
RequiredXp int64
}
// AdjustGuildUserPoints is the struct for the request body to adjust a user's points in a guild.
type adjustGuildUserPoints struct {
Amount int `json:"amount"`
Action string `json:"action"`
}
// adjustGuildUserScore is the struct for the request body to adjust a user's score in a guild.
type adjustGuildUserScore struct {
Amount int `json:"amount"`
Score string `json:"score"`
}
// TatsumakiError is the struct for a Tatsumaki API error JSON
type tatsumakiError struct {
Message string `json:"message"`
}