From e6809a958f69a55bb8b5a4ba6a545fa9a4c96234 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Mon, 9 Sep 2024 21:09:27 -0400 Subject: [PATCH] Update SpotifyActivity model --- .../java/me/braydon/tether/model/DiscordUser.java | 12 +++++++++++- JS-SDK/package.json | 2 +- JS-SDK/src/types/user.ts | 12 +++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/API/src/main/java/me/braydon/tether/model/DiscordUser.java b/API/src/main/java/me/braydon/tether/model/DiscordUser.java index 5303650..d53a850 100644 --- a/API/src/main/java/me/braydon/tether/model/DiscordUser.java +++ b/API/src/main/java/me/braydon/tether/model/DiscordUser.java @@ -172,7 +172,12 @@ public final class DiscordUser { @AllArgsConstructor @Getter public static class SpotifyActivity { /** - * The currently playing song. + * The ID of the currently playing track. + */ + @NonNull private final String trackId; + + /** + * The name of the currently playing track. */ @NonNull private final String song; @@ -186,6 +191,11 @@ public final class DiscordUser { */ @NonNull private final String album; + /** + * The URL to the playing track. + */ + @NonNull private final String trackUrl; + /** * The current progress of the track (in millis). */ diff --git a/JS-SDK/package.json b/JS-SDK/package.json index 1ae6a0d..761717d 100644 --- a/JS-SDK/package.json +++ b/JS-SDK/package.json @@ -1,6 +1,6 @@ { "name": "usetether", - "version": "1.1.9", + "version": "1.2.0", "author": "Braydon (Rainnny) ", "description": "An API designed to provide real-time access to a user's Discord data.", "keywords": [ diff --git a/JS-SDK/src/types/user.ts b/JS-SDK/src/types/user.ts index 8cd5a73..a1d2213 100644 --- a/JS-SDK/src/types/user.ts +++ b/JS-SDK/src/types/user.ts @@ -127,7 +127,12 @@ export type Banner = { */ export type SpotifyActivity = { /** - * The currently playing song. + * The ID of the currently playing track. + */ + trackId: string; + + /** + * The name of the currently playing track. */ song: string; @@ -141,6 +146,11 @@ export type SpotifyActivity = { */ album: string; + /** + * The URL to the playing track. + */ + trackUrl: string; + /** * The current progress of the track (in millis). */