aboutsummaryrefslogtreecommitdiff
path: root/utils/api/malsync/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/api/malsync/types.go')
-rw-r--r--utils/api/malsync/types.go35
1 files changed, 8 insertions, 27 deletions
diff --git a/utils/api/malsync/types.go b/utils/api/malsync/types.go
index 9944166..6d4303c 100644
--- a/utils/api/malsync/types.go
+++ b/utils/api/malsync/types.go
@@ -1,31 +1,12 @@
package malsync
-// MALSyncStreamingSite represents a single streaming site entry in the MALSync API
-type MALSyncStreamingSite struct {
- ID int `json:"id,omitempty"`
- Identifier any `json:"identifier"`
- Image string `json:"image,omitempty"`
- MalID int `json:"malId,omitempty"`
- AniID int `json:"aniId,omitempty"`
- Page string `json:"page"`
- Title string `json:"title"`
- Type string `json:"type"`
- URL string `json:"url"`
- External bool `json:"external,omitempty"`
-}
-
-// MALSyncSitesCollection represents the nested structure of streaming sites
-// Format: map[platformName]map[identifier]siteObject
-type MALSyncSitesCollection map[string]map[string]MALSyncStreamingSite
+import (
+ "net/http"
+ "time"
+)
-// MALSyncAnimeResponse is the top-level response from the MALSync API
-type MALSyncAnimeResponse struct {
- ID int `json:"id"`
- Type string `json:"type"`
- Title string `json:"title"`
- URL string `json:"url"`
- Total int `json:"total"`
- Image string `json:"image"`
- AnidbID int `json:"anidbId,omitempty"`
- Sites MALSyncSitesCollection `json:"Sites"`
+type client struct {
+ httpClient *http.Client
+ maxRetries int
+ backoff time.Duration
}