nu-api/genre.go
2023-03-03 14:37:16 +01:00

196 lines
4.3 KiB
Go

package nuapi
type GenreID string
const (
GenreAction GenreID = "action"
GenreAdult GenreID = "adult"
GenreAdventure GenreID = "adventure"
GenreComedy GenreID = "comedy"
GenreDrama GenreID = "drama"
GenreEcchi GenreID = "ecchi"
GenreFantasy GenreID = "fantasy"
GenreGenderBender GenreID = "gender-bender"
GenreHarem GenreID = "harem"
GenreHistorical GenreID = "historical"
GenreHorror GenreID = "horror"
GenreJosei GenreID = "josei"
GenreMartialArts GenreID = "martial-arts"
GenreMature GenreID = "mature"
GenreMecha GenreID = "mecha"
GenreMystery GenreID = "mystery"
GenrePsychological GenreID = "psychological"
GenreRomance GenreID = "romance"
GenreSchoolLife GenreID = "school-life"
GenreSciFi GenreID = "sci-fi"
GenreSeinen GenreID = "seinen"
GenreShoujo GenreID = "shoujo"
GenreShoujoAi GenreID = "shoujo-ai"
GenreShounen GenreID = "shounen"
GenreShounenAi GenreID = "shounen-ai"
GenreSliceOfLife GenreID = "slice-of-life"
GenreSmut GenreID = "smut"
GenreSports GenreID = "sports"
GenreSupernatural GenreID = "supernatural"
GenreTragedy GenreID = "tragedy"
GenreWuxia GenreID = "wuxia"
GenreXianxia GenreID = "xianxia"
GenreXuanhuan GenreID = "xuanhuan"
GenreYaoi GenreID = "yaoi"
GenreYuri GenreID = "yuri"
)
func (g GenreID) String() string {
switch g {
case GenreAction:
return "Action"
case GenreAdult:
return "Adult"
case GenreAdventure:
return "Adventure"
case GenreComedy:
return "Comedy"
case GenreDrama:
return "Drama"
case GenreEcchi:
return "Ecchi"
case GenreFantasy:
return "Fantasy"
case GenreGenderBender:
return "Gender Bender"
case GenreHarem:
return "Harem"
case GenreHistorical:
return "Historical"
case GenreHorror:
return "Horror"
case GenreJosei:
return "Josei"
case GenreMartialArts:
return "Martial Arts"
case GenreMature:
return "Mature"
case GenreMecha:
return "Mecha"
case GenreMystery:
return "Mystery"
case GenrePsychological:
return "Psychological"
case GenreRomance:
return "Romance"
case GenreSchoolLife:
return "School Life"
case GenreSciFi:
return "Sci-fi"
case GenreSeinen:
return "Seinen"
case GenreShoujo:
return "Shoujo"
case GenreShoujoAi:
return "Shoujo Ai"
case GenreShounen:
return "Shounen"
case GenreShounenAi:
return "Shounen Ai"
case GenreSliceOfLife:
return "Slice of Life"
case GenreSmut:
return "Smut"
case GenreSports:
return "Sports"
case GenreSupernatural:
return "Supernatural"
case GenreTragedy:
return "Tragedy"
case GenreWuxia:
return "Wuxia"
case GenreXianxia:
return "Xianxia"
case GenreXuanhuan:
return "Xuanhuan"
case GenreYaoi:
return "Yaoi"
case GenreYuri:
return "Yuri"
default:
panic("invalid genre: " + g)
}
}
func ParseGenre(str string) GenreID {
switch str {
case "Action":
return GenreAction
case "Adult":
return GenreAdult
case "Adventure":
return GenreAdventure
case "Comedy":
return GenreComedy
case "Drama":
return GenreDrama
case "Ecchi":
return GenreEcchi
case "Fantasy":
return GenreFantasy
case "Gender Bender":
return GenreGenderBender
case "Harem":
return GenreHarem
case "Historical":
return GenreHistorical
case "Horror":
return GenreHorror
case "Josei":
return GenreJosei
case "Martial Arts":
return GenreMartialArts
case "Mature":
return GenreMature
case "Mecha":
return GenreMecha
case "Mystery":
return GenreMystery
case "Psychological":
return GenrePsychological
case "Romance":
return GenreRomance
case "School Life":
return GenreSchoolLife
case "Sci-fi":
return GenreSciFi
case "Seinen":
return GenreSeinen
case "Shoujo":
return GenreShoujo
case "Shoujo Ai":
return GenreShoujoAi
case "Shounen":
return GenreShounen
case "Shounen Ai":
return GenreShounenAi
case "Slice of Life":
return GenreSliceOfLife
case "Smut":
return GenreSmut
case "Sports":
return GenreSports
case "Supernatural":
return GenreSupernatural
case "Tragedy":
return GenreTragedy
case "Wuxia":
return GenreWuxia
case "Xianxia":
return GenreXianxia
case "Xuanhuan":
return GenreXuanhuan
case "Yaoi":
return GenreYaoi
case "Yuri":
return GenreYuri
default:
panic("invalid genre: " + str)
}
}