-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow.go
31 lines (26 loc) · 902 Bytes
/
show.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package tvrage
import (
"encoding/xml"
)
type Genre string
type Result struct {
XMLName xml.Name `xml:"Results"`
Shows []Show `xml:"show"`
}
type Show struct {
ShowID int `xml:"showid"`
Name string `xml:"name"`
Link string `xml:"link"`
Country string `xml:"country"`
Started int `xml:"started"`
Ended int `xml:"ended"`
Seasons int `xml:"seasons"`
Status string `xml:"status"`
Classification string `xml:"classification"`
Genres []Genre `xml:"genres>genre"`
}
func NewShow(showid int, name string, link string, country string, started int, ended int, status string,
classification string, genres []Genre) *Show {
return &Show{ShowID: showid, Name: name, Link: link, Country: country, Started: started,
Ended: ended, Status: status, Classification: classification, Genres: genres}
}