PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/src/thetvdb/types.go

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