schedule

package
v0.0.0-...-bf87dab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL