summaryrefslogtreecommitdiff
path: root/src/betterttv.rs
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-04-04 01:26:09 +0500
committerilotterytea <iltsu@alright.party>2025-04-04 01:26:09 +0500
commitb8ee90bac9d004022c4da0216c6462a627c90756 (patch)
tree5b868495481a05944a832d1d791be14402f42e70 /src/betterttv.rs
parent89b2b38f9c9cbc1419676de055bad93a2ef1c428 (diff)
feat: emote base
Diffstat (limited to 'src/betterttv.rs')
-rw-r--r--src/betterttv.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/betterttv.rs b/src/betterttv.rs
index 0698a16..1fc99b2 100644
--- a/src/betterttv.rs
+++ b/src/betterttv.rs
@@ -2,7 +2,7 @@ use reqwest::{Client, Error};
use serde::Deserialize;
use serde_json::Value;
-use crate::emotes::RetrieveEmoteAPI;
+use crate::emotes::{EmoteBase, RetrieveEmoteAPI};
#[derive(Debug, Deserialize, Clone)]
pub struct BetterTTVEmote {
@@ -15,6 +15,20 @@ pub struct BetterTTVEmote {
pub animated: bool,
}
+impl EmoteBase for BetterTTVEmote {
+ fn get_id(&self) -> &String {
+ &self.id
+ }
+
+ fn get_code(&self) -> &String {
+ &self.code
+ }
+
+ fn get_original_code(&self) -> &Option<String> {
+ &self.original_code
+ }
+}
+
pub struct BetterTTVAPIClient {
client: Client,
base_url: String,