Documentation ¶
Overview ¶
Package tvrage provides basic access to tvrage.com services for finding out the last and next episodes of a given TV show (plus a bit more), no API key required.
Index ¶
Constants ¶
View Source
const ( SEARCHURL = `http://services.tvrage.com/feeds/search.php?show=%s` // URL for show searching EPLISTURL = `http://services.tvrage.com/feeds/episode_list.php?sid=%d` // URL for episode list TIMEFMT = `2006-01-02` // time.Parse format string for air date VERSION = `0.0.1` // library version )
Variables ¶
View Source
var (
Client = &http.Client{} // default HTTP client
)
Functions ¶
This section is empty.
Types ¶
type Episode ¶
type Episode struct { Season int Ordinal int `xml:"epnum"` Number int `xml:"seasonnum"` Production string `xml:"prodnum"` AirDate tvrageTime `xml:"airdate"` Link string `xml:"link"` Title string `xml:"title"` }
Episode maps all available episode data, as retrieved via EpisodeList.
func (*Episode) DeltaDays ¶
DeltaDays returns a pretty string indicating the delta in days between now and the episode air date.
func (*Episode) DeltaDaysInt ¶
DeltaDaysInt returns number of days since or to the episode's air date.
type Episodes ¶
type Episodes []Episode
Episodes is a thin shim over []Episodes to enable methods on Episode slices.
func EpisodeList ¶
EpisodeList retrieves the list of episodes for the given show id.
type Show ¶
type Show struct { ID 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 []string `xml:"genres>genre"` }
Show maps all available show data, as retrieved via Search.
Click to show internal directories.
Click to hide internal directories.