/src/thetvdb/types.go

http://gothetvdb.googlecode.com/ · Go · 94 lines · 84 code · 10 blank · 0 comment · 0 complexity · 88b1d0421e84ca0afb205b52e6739cb7 MD5 · raw file

  1. package thetvdb
  2. import "xml"
  3. type Mirrors struct {
  4. XMLName xml.Name "Mirrors"
  5. Mirror []Mirror
  6. }
  7. type Mirror struct {
  8. Id int
  9. Mirrorpath string
  10. Typemask int
  11. }
  12. type Data struct {
  13. Series []SimpleSeries
  14. }
  15. type SeriesData struct {
  16. XMLName xml.Name "Data"
  17. Series Series
  18. Episode []Episode
  19. }
  20. type SimpleSeries struct {
  21. Id string
  22. SeriesName string
  23. Banner string
  24. }
  25. type Series struct {
  26. SimpleSeries
  27. Actors string
  28. Airs_DayOfWeek string
  29. Airs_Time string
  30. ContentRating string
  31. FirstAired string
  32. Genre string
  33. Imdb_Id string
  34. Language string
  35. Network string
  36. Overview string
  37. Rating string
  38. Runtime string
  39. SeriesId string
  40. Status string
  41. Added string
  42. AddedBy string
  43. FanArt string
  44. LastUpdated string
  45. Poster string
  46. Zap2It_Id string
  47. }
  48. func (s *Series) String() string {
  49. return "[" + s.Id + "|" + s.SeriesName + "]"
  50. }
  51. type Episode struct {
  52. Id string
  53. Combined_episodenumber string
  54. Combined_season string
  55. DVD_chapter string
  56. DVD_discid string
  57. DVD_episodenumber string
  58. DVD_season string
  59. Director string
  60. EpImgFlag string
  61. EpisodeName string
  62. EpisodeNumber string
  63. FirstAired string
  64. GuestStars string
  65. IMDB_ID string
  66. Language string
  67. Overview string
  68. ProductionCode string
  69. Rating string
  70. RatingCount string
  71. SeasonNumber string
  72. Writer string
  73. absolute_number string
  74. Airsafter_season string
  75. Airsbefore_episode string
  76. airsbefore_season string
  77. Filename string
  78. Lastupdated string
  79. SeasonId string
  80. SeriesId string
  81. }
  82. func (e Episode) String() string {
  83. return "\t{" + e.EpisodeNumber + "x" + e.SeasonNumber + " | " + e.EpisodeName + " }"
  84. }