emote: add json annotations

This commit is contained in:
Branden J Brown 2025-04-20 22:22:51 -04:00
parent 2849b42745
commit d70bdba98c
2 changed files with 9 additions and 9 deletions

View File

@ -8,15 +8,15 @@ import (
// Emote is the information Kaiyan needs about an emote. // Emote is the information Kaiyan needs about an emote.
type Emote struct { type Emote struct {
// ID is the emote ID per the source. // 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 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 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 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 is a hyperlink to the emote image of any size.
Image string Image string `json:"image"`
} }
// Parser finds emotes in a message. // Parser finds emotes in a message.

View File

@ -16,11 +16,11 @@ type Store interface {
// Metric is the metrics for a single emote. // Metric is the metrics for a single emote.
type Metric struct { type Metric struct {
// Emote is the emote that the metrics describe. // 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 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 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 is the number of users who used the emote.
Users int64 Users int64 `json:"users"`
} }