added ability to get anime as needed from MAL
This commit is contained in:
87
MALTypes.go
87
MALTypes.go
@ -65,3 +65,90 @@ type MALWatchlist struct {
|
||||
Next string `json:"next" ts_type:"next"`
|
||||
} `json:"paging" ts_type:"paging"`
|
||||
}
|
||||
|
||||
type MALAnime struct {
|
||||
Id int `json:"id" ts_type:"id"`
|
||||
Title string `json:"title" ts_type:"title"`
|
||||
MainPicture struct {
|
||||
Large string `json:"large" json:"large"`
|
||||
Medium string `json:"medium" json:"medium"`
|
||||
} `json:"main_picture" json:"mainPicture"`
|
||||
AlternativeTitles struct {
|
||||
Synonyms []string `json:"synonyms" ts_type:"synonyms"`
|
||||
En string `json:"en" ts_type:"en"`
|
||||
Ja string `json:"ja" ts_type:"ja"`
|
||||
} `json:"alternative_titles" ts_type:"alternativeTitles"`
|
||||
StartDate string `json:"start_date" ts_type:"startDate"`
|
||||
EndDate string `json:"end_date" ts_type:"endDate"`
|
||||
Synopsis string `json:"synopsis" ts_type:"synopsis"`
|
||||
Mean float64 `json:"mean" ts_type:"mean"`
|
||||
Rank int `json:"rank" ts_type:"rank"`
|
||||
Popularity int `json:"popularity" ts_type:"popularity"`
|
||||
NumListUsers int `json:"num_list_users" ts_type:"numListUsers"`
|
||||
NumScoringUsers int `json:"num_scoring_users" ts_type:"numScoringUsers"`
|
||||
NSFW string `json:"nsfw" ts_type:"nsfw"`
|
||||
Genres []struct {
|
||||
Id int `json:"id" ts_type:"id"`
|
||||
Name string `json:"name" ts_type:"name"`
|
||||
} `json:"genres" ts_type:"genres"`
|
||||
CreatedAt string `json:"created_at" ts_type:"createdAt"`
|
||||
UpdatedAt string `json:"updated_at" ts_type:"updatedAt"`
|
||||
MediaType string `json:"media_type" ts_type:"mediaType"`
|
||||
Status string `json:"status" ts_type:"status"`
|
||||
MyListStatus MyListStatus `json:"my_list_status" ts_type:"myListStatus"`
|
||||
NumEpisodes int `json:"num_episodes" ts_type:"numEpisodes"`
|
||||
StartSeason struct {
|
||||
Year int `json:"year" ts_type:"year"`
|
||||
Season string `json:"season" ts_type:"season"`
|
||||
} `json:"start_season" ts_type:"startSeason"`
|
||||
Broadcast struct {
|
||||
DayOfTheWeek string `json:"day_of_the_week" ts_type:"dayOfTheWeek"`
|
||||
StartTime string `json:"start_time" ts_type:"startTime"`
|
||||
} `json:"broadcast" ts_type:"broadcast"`
|
||||
Source string `json:"source" ts_type:"source"`
|
||||
AverageEpisodeDuration int `json:"average_episode_duration" ts_type:"averageEpisodeDuration"`
|
||||
Rating string `json:"rating" ts_type:"rating"`
|
||||
Studios []struct {
|
||||
Id int `json:"id" ts_type:"id"`
|
||||
Name string `json:"name" ts_type:"name"`
|
||||
} `json:"studios" ts_type:"studios"`
|
||||
Pictures []struct {
|
||||
Large string `json:"large" ts_type:"large"`
|
||||
Medium string `json:"medium" ts_type:"medium"`
|
||||
} `json:"pictures" ts_type:"pictures"`
|
||||
Background string `json:"background" ts_type:"background"`
|
||||
RelatedAnime []struct {
|
||||
Node MALAnime `json:"node" ts_type:"node"`
|
||||
RelationType string `json:"relation_type" ts_type:"relationType"`
|
||||
RelationTypeFormatted string `json:"relation_type_formatted" ts_type:"relationTypeFormatted"`
|
||||
} `json:"related_anime" ts_type:"relatedAnime"`
|
||||
Recommendations []struct {
|
||||
Node MALAnime `json:"node" ts_type:"node"`
|
||||
NumRecommendations int `json:"num_recommendations" ts_type:"numRecommendations"`
|
||||
} `json:"recommendations" ts_type:"recommendations"`
|
||||
Statistics struct {
|
||||
NumListUsers int `json:"num_list_users" ts_type:"numListUsers"`
|
||||
Status struct {
|
||||
Watching string `json:"watching" ts_type:"watching"`
|
||||
Completed string `json:"completed" ts_type:"completed"`
|
||||
OnHold string `json:"on_hold" ts_type:"onHold"`
|
||||
Dropped string `json:"dropped" ts_type:"dropped"`
|
||||
PlanToWatch string `json:"plan_to_watch" ts_type:"planToWatch"`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type MyListStatus struct {
|
||||
Status string `json:"status" ts_type:"status"`
|
||||
Score int `json:"score" ts_type:"score"`
|
||||
NumEpisodesWatched int `json:"num_episodes_watched" ts_type:"numEpisodesWatched"`
|
||||
IsRewatching bool `json:"is_rewatching" ts_type:"isRewatching"`
|
||||
StartDate string `json:"start_date" ts_type:"startDate"`
|
||||
FinishDate string `json:"finish_date" ts_type:"finishDate"`
|
||||
Priority int `json:"priority" ts_type:"priority"`
|
||||
NumTimesRewatched int `json:"num_times_rewatched" ts_type:"numTimesRewatched"`
|
||||
RewatchValue int `json:"rewatch_value" ts_type:"rewatchValue"`
|
||||
Tags []string `json:"tags" ts_type:"tags"`
|
||||
Comments string `json:"comments" ts_type:"comments"`
|
||||
UpdatedAt string `json:"updated_at" ts_type:"updatedAt"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user