lmsquery

package module
v0.0.0-...-e11e1c7 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 10 Imported by: 0

README

go-lmsquery

Go library for queries to Logitech Media Server

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarm

type Alarm struct {
	Enabled       string `json:"enabled"`
	Dow           string `json:"dow"`
	Time          string `json:"time"`
	Volume        string `json:"volume"`
	Repeat        string `json:"repeat"`
	Url           string `json:"url"`
	NextExecution time.Time
}

type Lmsquery

type Lmsquery struct {
	// contains filtered or unexported fields
}

func CreateLms

func CreateLms(host string, port int) Lmsquery

func (*Lmsquery) GetAlarms

func (l *Lmsquery) GetAlarms(playerId string, enabled bool) (int, []Alarm)

func (*Lmsquery) GetNextAlarm

func (l *Lmsquery) GetNextAlarm(playerId string) (bool, Alarm)

func (*Lmsquery) GetPlayerPref

func (l *Lmsquery) GetPlayerPref(playerId string, pref string) string

func (*Lmsquery) GetPlayers

func (l *Lmsquery) GetPlayers() []playerInfo

func (*Lmsquery) GetServerStatus

func (l *Lmsquery) GetServerStatus() Result

* Server functions

func (*Lmsquery) IsPowered

func (l *Lmsquery) IsPowered(playerId string) bool

func (*Lmsquery) SetPause

func (l *Lmsquery) SetPause(playerId string, power int)

func (*Lmsquery) SetPauseAll

func (l *Lmsquery) SetPauseAll(power int)

func (*Lmsquery) SetPower

func (l *Lmsquery) SetPower(playerId string, power int)

func (*Lmsquery) SetPowerAll

func (l *Lmsquery) SetPowerAll(power int)

func (*Lmsquery) SetRepeat

func (l *Lmsquery) SetRepeat(playerId string, power int)

func (*Lmsquery) SetRepeatAll

func (l *Lmsquery) SetRepeatAll(power int)

type Result

type Result struct {
	PlayerCount      string       `json:"player_count"`
	PlayersLoop      []playerInfo `json:"players_loop"`
	AlarmsLoop       []Alarm      `json:"alarms_loop"`
	InfoTotalAlbums  string       `json:"info_total_albums"`
	InfoTotalArtists string       `json:"info_total_artists"`
	InfoTotalSongs   string       `json:"info_total_songs"`
	InfoTotalGenres  string       `json:"info_total_genres"`
	Power            string       `json:"_power"`
	Param0           string       `json:"_p0"`
	Param1           string       `json:"_p1"`
	Param2           string       `json:"_p2"`
	Param3           string       `json:"_p3"`
	Param4           string       `json:"_p4"`
	Count            int          `json:"count"`
}

Jump to

Keyboard shortcuts

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