api

package
v0.0.0-...-b325b5c Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NewEpisodeDays is the number of days worth of episodes we'll fetch
	NewEpisodeDays = 30
)

Variables

This section is empty.

Functions

func Setup

func Setup(r *mux.Router) error

Setup is called from server.go and sets up our routes, etc.

Types

type LastPlayedResponse

type LastPlayedResponse struct {
	Podcast *store.Podcast `json:"podcast"`
	Episode *store.Episode `json:"episode"`
}

LastPlayedResponse is the response we give for a last played request.

type PlaybackState

type PlaybackState struct {
	// PodcastID is the ID of the podcast this episode belongs to.
	PodcastID int64 `json:"podcastID"`

	// EpisodeID is the ID of the episode.
	EpisodeID int64 `json:"episodeID"`

	// Position is the position, in seconds, that playback is up to. Negative means you've completely
	// finished the episode and we mark it "done".
	Position int32 `json:"position"`

	// LastUpdated is the time this playback state was recorded by the client. It could be a while
	// ago, if it's taken a while for the client to sync.
	LastUpdated time.Time `json:"lastUpdated"`
}

PlaybackState is the state of a single episode of a podcast.

Jump to

Keyboard shortcuts

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