emote: add json annotations
This commit is contained in:
parent
2849b42745
commit
d70bdba98c
@ -8,15 +8,15 @@ import (
|
||||
// Emote is the information Kaiyan needs about an emote.
|
||||
type Emote struct {
|
||||
// ID is the emote ID per the source.
|
||||
ID string
|
||||
ID string `json:"id"`
|
||||
// Name is the text of the emote as would be parsed from message text.
|
||||
Name string
|
||||
Name string `json:"name"`
|
||||
// Source is the name of the emote source, e.g. "7TV", "Twitch:cirno_tv", &c.
|
||||
Source string
|
||||
Source string `json:"source"`
|
||||
// Link is a hyperlink to manage the emote.
|
||||
Link string
|
||||
Link string `json:"link"`
|
||||
// Image is a hyperlink to the emote image of any size.
|
||||
Image string
|
||||
Image string `json:"image"`
|
||||
}
|
||||
|
||||
// Parser finds emotes in a message.
|
||||
|
@ -16,11 +16,11 @@ type Store interface {
|
||||
// Metric is the metrics for a single emote.
|
||||
type Metric struct {
|
||||
// Emote is the emote that the metrics describe.
|
||||
Emote Emote
|
||||
Emote Emote `json:"emote"`
|
||||
// Tokens is the total number of occurrences of the emote.
|
||||
Tokens int64
|
||||
Tokens int64 `json:"tokens"`
|
||||
// Messages is the number of unique messages which contained the emote.
|
||||
Messages int64
|
||||
Messages int64 `json:"messages"`
|
||||
// Users is the number of users who used the emote.
|
||||
Users int64
|
||||
Users int64 `json:"users"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user