124 lines
3.8 KiB
Go
124 lines
3.8 KiB
Go
// Package api provides primitives to interact with the openapi HTTP API.
|
|
//
|
|
// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
|
|
package api
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Defines values for PlayoutSpecStrategy.
|
|
const (
|
|
PlayoutSpecStrategyFadeout PlayoutSpecStrategy = "fadeout"
|
|
PlayoutSpecStrategyInstant PlayoutSpecStrategy = "instant"
|
|
PlayoutSpecStrategyRollout PlayoutSpecStrategy = "rollout"
|
|
)
|
|
|
|
// Defines values for SpeakerSpecStrategy.
|
|
const (
|
|
SpeakerSpecStrategyFadeout SpeakerSpecStrategy = "fadeout"
|
|
SpeakerSpecStrategyFollow SpeakerSpecStrategy = "follow"
|
|
SpeakerSpecStrategyIdle SpeakerSpecStrategy = "idle"
|
|
SpeakerSpecStrategyInstant SpeakerSpecStrategy = "instant"
|
|
SpeakerSpecStrategyPlay SpeakerSpecStrategy = "play"
|
|
SpeakerSpecStrategyRollout SpeakerSpecStrategy = "rollout"
|
|
)
|
|
|
|
// Defines values for SpeakerStatusPlaybackState.
|
|
const (
|
|
Fadeout SpeakerStatusPlaybackState = "fadeout"
|
|
Idle SpeakerStatusPlaybackState = "idle"
|
|
Playing SpeakerStatusPlaybackState = "playing"
|
|
Rollout SpeakerStatusPlaybackState = "rollout"
|
|
)
|
|
|
|
// Playout Playback state and config
|
|
type Playout struct {
|
|
// Spec Playout settings for controlling how to playout media
|
|
Spec PlayoutSpec `json:"spec"`
|
|
|
|
// Status The Status of the playout
|
|
Status *PlayoutStatus `json:"status,omitempty"`
|
|
}
|
|
|
|
// PlayoutSpec Playout settings for controlling how to playout media
|
|
type PlayoutSpec struct {
|
|
// Strategy Strategy to use when playing out media
|
|
Strategy PlayoutSpecStrategy `json:"strategy"`
|
|
|
|
// Uri Media URI to playout.
|
|
// Can be one of:
|
|
// spotify:track:6rqhFgbbKwnb9MLmUQDhG6 //track/album/playlist to playout
|
|
// speaker:<id> //speaker to follow
|
|
Uri string `json:"uri"`
|
|
}
|
|
|
|
// PlayoutSpecStrategy Strategy to use when playing out media
|
|
type PlayoutSpecStrategy string
|
|
|
|
// PlayoutStatus The Status of the playout
|
|
type PlayoutStatus struct {
|
|
// Speaker primary speaker reporting the status
|
|
Speaker string `json:"speaker"`
|
|
|
|
// Spec Playout settings for controlling how to playout media
|
|
Spec PlayoutSpec `json:"spec"`
|
|
|
|
// Timestamp timestamp of the current status
|
|
Timestamp time.Time `json:"timestamp"`
|
|
}
|
|
|
|
// Speaker Individual config of a Speaker
|
|
type Speaker struct {
|
|
// Id ID of the speaker
|
|
Id string `json:"id"`
|
|
|
|
// Spec Playout settings for controlling how to playout media
|
|
Spec SpeakerSpec `json:"spec"`
|
|
|
|
// Status The Status of the playout
|
|
Status *SpeakerStatus `json:"status,omitempty"`
|
|
}
|
|
|
|
// SpeakerSpec Playout settings for controlling how to playout media
|
|
type SpeakerSpec struct {
|
|
// Strategy Strategy to use when playing out media
|
|
Strategy SpeakerSpecStrategy `json:"strategy"`
|
|
|
|
// Uri Media URI to playout.
|
|
// Can be one of:
|
|
// spotify:track:6rqhFgbbKwnb9MLmUQDhG6 //track/album/playlist to playout
|
|
// speaker:<id> //speaker to follow
|
|
Uri string `json:"uri"`
|
|
}
|
|
|
|
// SpeakerSpecStrategy Strategy to use when playing out media
|
|
type SpeakerSpecStrategy string
|
|
|
|
// SpeakerStatus The Status of the playout
|
|
type SpeakerStatus struct {
|
|
// PlaybackMediaUri The media currently being played.
|
|
PlaybackMediaUri string `json:"playback_media_uri"`
|
|
|
|
// PlaybackState Defines the current state of the playback.
|
|
PlaybackState SpeakerStatusPlaybackState `json:"playback_state"`
|
|
|
|
// PlaybackTimestamp The seeker head location in the song.
|
|
PlaybackTimestamp float32 `json:"playback_timestamp"`
|
|
|
|
// Spec Playout settings for controlling how to playout media
|
|
Spec SpeakerSpec `json:"spec"`
|
|
|
|
// Timestamp Timestamp of the status
|
|
Timestamp time.Time `json:"timestamp"`
|
|
}
|
|
|
|
// SpeakerStatusPlaybackState Defines the current state of the playback.
|
|
type SpeakerStatusPlaybackState string
|
|
|
|
// ApplyPlayoutJSONRequestBody defines body for ApplyPlayout for application/json ContentType.
|
|
type ApplyPlayoutJSONRequestBody = PlayoutSpec
|
|
|
|
// HeartbeatJSONRequestBody defines body for Heartbeat for application/json ContentType.
|
|
type HeartbeatJSONRequestBody = Speaker
|