Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MuteCmd = &cobra.Command{ Use: "mute", Short: "Show channel muting.", RunE: func(cmd *cobra.Command, args []string) error { ctx := context.Background() client, err := internal.NewClient(common.Addr, common.Token) if err != nil { return err } settingsResponse, err := client.GetSettingsWithResponse(ctx) if err != nil { return err } log.WithFields(log.Fields{"settings": spew.Sdump(settingsResponse.JSON200)}).Debug("Got settings") if settingsResponse.JSON200.Channel != nil { for _, channel := range *settingsResponse.JSON200.Channel { log.WithFields(log.Fields{"channel": *channel.ChannelId, "muted": *channel.Dsp.Mute.Value}).Printf("Mute status") } } return nil }, }
MuteCmd is a quick and dirty placeholder showing how to interact with the REST API.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.