This commit is contained in:
daru
2022-04-15 01:26:18 +02:00
parent 9dfe6424c8
commit ea49d83475
6 changed files with 160 additions and 45 deletions

View File

@@ -2,15 +2,26 @@ package main
import "time"
type Anime struct {
Anime int64 `json:"anime"`
Users []WatchUser `json:"users"`
}
type WatchUser struct {
Username string `json:"username"`
MalID int64 `json:"malId"`
Progress int `json:"progress"`
}
type UserData struct {
Username string `json:"username"`
MalId int `json:"malId"`
MalID int64 `json:"malId"`
Secret string `json:"secret"`
}
type RegisterData struct {
Username string `json:"username"`
MalId int `json:"malId"`
MalID int64 `json:"malId"`
Secret string `json:"secret"`
Sauce string `json:"sauce"`
}
@@ -18,7 +29,7 @@ type RegisterData struct {
type AnimeListMal struct {
Data []struct {
Node struct {
ID int `json:"id"`
ID int64 `json:"id"`
Title string `json:"title"`
MainPicture struct {
Medium string `json:"medium"`
@@ -33,7 +44,7 @@ type AnimeListMal struct {
type UserJikan struct {
Data struct {
MalID int `json:"mal_id"`
MalID int64 `json:"mal_id"`
Username string `json:"username"`
URL string `json:"url"`
Images struct {
@@ -44,18 +55,18 @@ type UserJikan struct {
ImageURL string `json:"image_url"`
} `json:"webp"`
} `json:"images"`
LastOnline time.Time `json:"last_online"`
Gender interface{} `json:"gender"`
Birthday interface{} `json:"birthday"`
Location string `json:"location"`
Joined time.Time `json:"joined"`
LastOnline time.Time `json:"last_online"`
Gender string `json:"gender"`
Birthday time.Time `json:"birthday"`
Location string `json:"location"`
Joined time.Time `json:"joined"`
} `json:"data"`
}
type SeasonMal struct {
Data []struct {
Node struct {
ID int `json:"id"`
ID int64 `json:"id"`
Title string `json:"title"`
MainPicture struct {
Medium string `json:"medium"`
@@ -84,7 +95,7 @@ type SeasonJikan struct {
} `json:"items"`
} `json:"pagination"`
Data []struct {
MalID int `json:"mal_id"`
MalID int64 `json:"mal_id"`
URL string `json:"url"`
Images struct {
Jpg struct {
@@ -120,8 +131,8 @@ type SeasonJikan struct {
Status string `json:"status"`
Airing bool `json:"airing"`
Aired struct {
From time.Time `json:"from"`
To interface{} `json:"to"`
From time.Time `json:"from"`
To time.Time `json:"to"`
Prop struct {
From struct {
Day int `json:"day"`
@@ -129,25 +140,25 @@ type SeasonJikan struct {
Year int `json:"year"`
} `json:"from"`
To struct {
Day interface{} `json:"day"`
Month interface{} `json:"month"`
Year interface{} `json:"year"`
Day int `json:"day"`
Month int `json:"month"`
Year int `json:"year"`
} `json:"to"`
} `json:"prop"`
String string `json:"string"`
} `json:"aired"`
Duration string `json:"duration"`
Rating string `json:"rating"`
Score float64 `json:"score"`
ScoredBy int `json:"scored_by"`
Rank int `json:"rank"`
Popularity int `json:"popularity"`
Members int `json:"members"`
Favorites int `json:"favorites"`
Synopsis string `json:"synopsis"`
Background interface{} `json:"background"`
Season string `json:"season"`
Year int `json:"year"`
Duration string `json:"duration"`
Rating string `json:"rating"`
Score float64 `json:"score"`
ScoredBy int `json:"scored_by"`
Rank int `json:"rank"`
Popularity int `json:"popularity"`
Members int `json:"members"`
Favorites int `json:"favorites"`
Synopsis string `json:"synopsis"`
Background string `json:"background"`
Season string `json:"season"`
Year int `json:"year"`
Broadcast struct {
Day string `json:"day"`
Time string `json:"time"`
@@ -160,8 +171,13 @@ type SeasonJikan struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"producers"`
Licensors []interface{} `json:"licensors"`
Studios []struct {
Licensors []struct {
MalID int `json:"mal_id"`
Type string `json:"type"`
Name string `json:"name"`
URL string `json:"url"`
} `json:"licensors"`
Studios []struct {
MalID int `json:"mal_id"`
Type string `json:"type"`
Name string `json:"name"`
@@ -180,6 +196,11 @@ type SeasonJikan struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"themes"`
Demographics []interface{} `json:"demographics"`
Demographics []struct {
MalID int `json:"mal_id"`
Type string `json:"type"`
Name string `json:"name"`
URL string `json:"url"`
} `json:"demographics"`
} `json:"data"`
}