mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-14 10:39:53 +01:00
camelCase
This commit is contained in:
53
klotz.go
53
klotz.go
@@ -14,32 +14,33 @@ type AnimeUserDetail struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Anime struct {
|
type Anime struct {
|
||||||
Anime int64 `json:"anime"`
|
Anime int64 `json:"anime"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
TitleEn string `json:"title_en"`
|
TitleEn string `json:"titleEn"`
|
||||||
TitleJp string `json:"title_jp"`
|
TitleJp string `json:"titleJp"`
|
||||||
ImageMediumURL string `json:"image_medium"`
|
ImageMediumURL string `json:"imageMedium"`
|
||||||
ImageLargeURL string `json:"image_large"`
|
ImageLargeURL string `json:"imageLarge"`
|
||||||
ImageThumbURL string `json:"image_thumb"`
|
ImageThumbURL string `json:"imageThumb"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Episodes int `json:"episodes"`
|
Episodes int `json:"episodes"`
|
||||||
Synopsis string `json:"synopsis"`
|
Synopsis string `json:"synopsis"`
|
||||||
Genres []AnimeGenre `json:"genres"`
|
Genres []AnimeGenre `json:"genres"`
|
||||||
StartDate time.Time `json:"start_date"`
|
StartDate time.Time `json:"startDate"`
|
||||||
EndDate time.Time `json:"end_date"`
|
EndDate time.Time `json:"endDate"`
|
||||||
Year int `json:"year"`
|
Year int `json:"year"`
|
||||||
Season string `json:"season"`
|
Season string `json:"season"`
|
||||||
Score float64 `json:"score"`
|
Score float64 `json:"score"`
|
||||||
ScoredBy int `json:"scored_by"`
|
ScoredBy int `json:"scoredBy"`
|
||||||
Rank int `json:"rank"`
|
Rank int `json:"rank"`
|
||||||
Popularity int `json:"popularity"`
|
Popularity int `json:"popularity"`
|
||||||
Members int `json:"members"`
|
Members int `json:"members"`
|
||||||
Source string `json:"source"`
|
Source string `json:"source"`
|
||||||
DayOfTheWeek string `json:"day_of_the_week"`
|
Weekday string `json:"weekday"`
|
||||||
StartTime string `json:"start_time"`
|
StartTime string `json:"startTime"`
|
||||||
Studios []AnimeStudio `json:"studios"`
|
Studios []AnimeStudio `json:"studios"`
|
||||||
TrailerURL string `json:"trailer_url"`
|
TrailerURL string `json:"trailerUrl"`
|
||||||
|
TrailerEmbedURL string `json:"trailerEmbedUrl"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AnimeGenre struct {
|
type AnimeGenre struct {
|
||||||
|
|||||||
51
schaffer.go
51
schaffer.go
@@ -8,30 +8,31 @@ import (
|
|||||||
|
|
||||||
func JikanConvert(jik *SeasonAnimeJikan) Anime {
|
func JikanConvert(jik *SeasonAnimeJikan) Anime {
|
||||||
res := Anime{
|
res := Anime{
|
||||||
Anime: jik.MalID,
|
Anime: jik.MalID,
|
||||||
Title: jik.Title,
|
Title: jik.Title,
|
||||||
TitleEn: jik.TitleEnglish,
|
TitleEn: jik.TitleEnglish,
|
||||||
TitleJp: jik.TitleJapanese,
|
TitleJp: jik.TitleJapanese,
|
||||||
ImageMediumURL: jik.Images.Jpg.ImageURL,
|
ImageMediumURL: jik.Images.Jpg.ImageURL,
|
||||||
ImageLargeURL: jik.Images.Jpg.LargeImageURL,
|
ImageLargeURL: jik.Images.Jpg.LargeImageURL,
|
||||||
ImageThumbURL: jik.Images.Jpg.SmallImageURL,
|
ImageThumbURL: jik.Images.Jpg.SmallImageURL,
|
||||||
Type: jik.Type,
|
Type: jik.Type,
|
||||||
Status: jik.Status,
|
Status: jik.Status,
|
||||||
Episodes: jik.Episodes,
|
Episodes: jik.Episodes,
|
||||||
Synopsis: jik.Synopsis,
|
Synopsis: jik.Synopsis,
|
||||||
StartDate: jik.Aired.From,
|
StartDate: jik.Aired.From,
|
||||||
EndDate: jik.Aired.To,
|
EndDate: jik.Aired.To,
|
||||||
Year: jik.Year,
|
Year: jik.Year,
|
||||||
Season: jik.Season,
|
Season: jik.Season,
|
||||||
Score: jik.Score,
|
Score: jik.Score,
|
||||||
ScoredBy: jik.ScoredBy,
|
ScoredBy: jik.ScoredBy,
|
||||||
Rank: jik.Rank,
|
Rank: jik.Rank,
|
||||||
Popularity: jik.Popularity,
|
Popularity: jik.Popularity,
|
||||||
Members: jik.Members,
|
Members: jik.Members,
|
||||||
Source: jik.Source,
|
Source: jik.Source,
|
||||||
DayOfTheWeek: jik.Broadcast.Day,
|
Weekday: jik.Broadcast.Day,
|
||||||
StartTime: jik.Broadcast.Time,
|
StartTime: jik.Broadcast.Time,
|
||||||
TrailerURL: jik.Trailer.URL,
|
TrailerURL: jik.Trailer.URL,
|
||||||
|
TrailerEmbedURL: jik.Trailer.EmbedURL,
|
||||||
}
|
}
|
||||||
for _, g := range jik.Genres {
|
for _, g := range jik.Genres {
|
||||||
res.Genres = append(res.Genres, AnimeGenre{
|
res.Genres = append(res.Genres, AnimeGenre{
|
||||||
@@ -69,7 +70,7 @@ func MalConvert(mal *AnimeDetailMal) Anime {
|
|||||||
Popularity: mal.Popularity,
|
Popularity: mal.Popularity,
|
||||||
Members: mal.NumListUsers,
|
Members: mal.NumListUsers,
|
||||||
Source: mal.Source,
|
Source: mal.Source,
|
||||||
DayOfTheWeek: mal.Broadcast.DayOfTheWeek,
|
Weekday: mal.Broadcast.DayOfTheWeek,
|
||||||
StartTime: mal.Broadcast.StartTime,
|
StartTime: mal.Broadcast.StartTime,
|
||||||
TrailerURL: "",
|
TrailerURL: "",
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user