From 77289052e964863886708ac14246532752fda5bf Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 9 Aug 2024 15:12:10 -0400 Subject: [PATCH] fixed simkl types --- SimklTypes.go | 16 +++--- frontend/src/simkl/types/simklTypes.ts | 76 +++++++++++++------------- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/SimklTypes.go b/SimklTypes.go index c86d66f..0df05a5 100644 --- a/SimklTypes.go +++ b/SimklTypes.go @@ -28,14 +28,14 @@ type SimklUser struct { type SimklWatchList struct { Anime []struct { - LastWatchedAt string `json:"last_watched_at" ts_type:"last_watched_at"` - Status string `json:"status" ts_type:"status"` - UserRating int `json:"user_rating" ts_type:"user_rating"` - LastWatched string `json:"last_watched" ts_type:"last_watched"` - NextToWatch string `json:"next_to_watch" ts_type:"next_to_watch"` - WatchedEpisodesCount int `json:"watched_episodes_count" ts_type:"watched_episodes_count"` - TotalEpisodesCount int `json:"total_episodes_count" ts_type:"total_episodes_count"` - NotAiredEpisodesCount int `json:"not_aired_episodes_count" ts_type:"not_aired_episodes_count"` + LastWatchedAt string `json:"last_watched_at" ts_type:"last_watched_at"` + Status string `json:"status" ts_type:"status"` + UserRating float64 `json:"user_rating" ts_type:"user_rating"` + LastWatched string `json:"last_watched" ts_type:"last_watched"` + NextToWatch string `json:"next_to_watch" ts_type:"next_to_watch"` + WatchedEpisodesCount int `json:"watched_episodes_count" ts_type:"watched_episodes_count"` + TotalEpisodesCount int `json:"total_episodes_count" ts_type:"total_episodes_count"` + NotAiredEpisodesCount int `json:"not_aired_episodes_count" ts_type:"not_aired_episodes_count"` Show struct { Title string `json:"title" ts_type:"title"` Poster string `json:"poster" ts_type:"poster"` diff --git a/frontend/src/simkl/types/simklTypes.ts b/frontend/src/simkl/types/simklTypes.ts index 3546c9e..54c12fa 100644 --- a/frontend/src/simkl/types/simklTypes.ts +++ b/frontend/src/simkl/types/simklTypes.ts @@ -19,41 +19,43 @@ export type SimklUser = { } export type SimklWatchList = { - anime: [{ - last_watched_at: string, - status: string - user_rating: number, - last_watched: string, - next_to_watch: string, - watched_episodes_count: number, - total_episodes_count: number, - not_aired_episodes_count: number, - show: { - title: string, - poster: string, - ids: { - simkl: number, - slug: string, - offjp: string, - tw: string, - ann: string, - mal: string, - wikien: string, - wikijp: string, - allcin: string, - imdb: string, - offen: string, - crunchyroll: string, - tvdbslug: string, - anilist: string, - animeplanet: string, - anisearch: string, - kitsu: string, - livechart: string, - traktslug: string, - anidb: string, - } - }, - anime_type: string - }] + anime: [SimklAnime] +} + +export type SimklAnime = { + last_watched_at: string, + status: string + user_rating: number, + last_watched: string, + next_to_watch: string, + watched_episodes_count: number, + total_episodes_count: number, + not_aired_episodes_count: number, + show: { + title: string, + poster: string, + ids: { + simkl: number, + slug: string, + offjp: string, + tw: string, + ann: string, + mal: string, + wikien: string, + wikijp: string, + allcin: string, + imdb: string, + offen: string, + crunchyroll: string, + tvdbslug: string, + anilist: string, + animeplanet: string, + anisearch: string, + kitsu: string, + livechart: string, + traktslug: string, + anidb: string, + } + }, + anime_type: string } \ No newline at end of file