Documentation ¶
Overview ¶
Package schedule grabs DJ schedule data from Ponyville FM's servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScheduleEntry ¶
type ScheduleEntry struct { StartTime string `json:"start_time"` StartUnix int `json:"start_unix"` Duration int `json:"duration"` // minutes EndTime string `json:"end_time"` EndUnix int `json:"end_unix"` Name string `json:"name"` Host string `json:"host"` Description string `json:"description"` Showcard string `json:"showcard"` Background string `json:"background"` Timezone string `json:"timezone"` Status string `json:"status"` }
ScheduleEntry is an individual schedule datum.
func Get ¶
func Get() ([]ScheduleEntry, error)
Get returns schedule entries, only fetching new data at most every n seconds, where n is defined above.
func (ScheduleEntry) String ¶
func (s ScheduleEntry) String() string
type ScheduleResult ¶
type ScheduleResult struct {
Result []ScheduleEntry `json:"result"`
}
ScheduleResult is a wrapper for a list of ScheduleEntry records.
type Wrapper ¶
type Wrapper struct { Age time.Time Info *ScheduleResult }
Wrapper is a time, info pair. This is used to invalidate the cache of data from ponyvillefm.com.
Click to show internal directories.
Click to hide internal directories.