summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-04-09 18:31:56 +0500
committerilotterytea <iltsu@alright.party>2025-04-09 18:31:56 +0500
commit0bde61429173313468a709fec9ecad174405dc9c (patch)
tree2a484cc4e1b989debb4a5c1d3924f2f1eed74e61
parent66b4eeb985e242cc0ee2925d639e976187727409 (diff)
feat: `emotes` field in `EmoteSet`
-rw-r--r--src/lib.rs1
-rw-r--r--src/seventv.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 3544321..76b17b3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -104,6 +104,7 @@ mod tests {
let set = user.unwrap();
assert_eq!(set.owner.username.eq("ilotterytea"), true);
+ assert_eq!(set.emotes.len() >= 1, true);
}
#[tokio::test]
diff --git a/src/seventv.rs b/src/seventv.rs
index eb0829b..c3a2006 100644
--- a/src/seventv.rs
+++ b/src/seventv.rs
@@ -25,6 +25,7 @@ pub struct EmoteSet {
pub id: String,
pub name: String,
pub owner: User,
+ pub emotes: Vec<Emote>,
}
pub struct SevenTVAPIClient {
@@ -104,6 +105,7 @@ impl SevenTVAPIClient {
id: id.to_string(),
name: name.to_string(),
owner,
+ emotes: self.parse_emoteset(&response),
})
}