From d70bdba98ceaa0210ce3c7f82dc070bda22e61ef Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Sun, 20 Apr 2025 22:22:51 -0400 Subject: [PATCH] emote: add json annotations --- emote/emote.go | 10 +++++----- emote/store.go | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/emote/emote.go b/emote/emote.go index a73381d..a7e60e6 100644 --- a/emote/emote.go +++ b/emote/emote.go @@ -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. diff --git a/emote/store.go b/emote/store.go index 098b28d..4f04808 100644 --- a/emote/store.go +++ b/emote/store.go @@ -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"` }