Documentation ¶
Index ¶
- Variables
- type App
- type Channel
- type ChannelProgramList
- type Input
- type LgTv
- func (tv *LgTv) ChannelDown() error
- func (tv *LgTv) ChannelUp() error
- func (tv *LgTv) Connect(clientKey string, timeout int) (string, error)
- func (tv *LgTv) Disconnect() error
- func (tv *LgTv) FastForward() error
- func (tv *LgTv) GetChannelProgramList() (ChannelProgramList, error)
- func (tv *LgTv) GetCurrentChannel() (Channel, error)
- func (tv *LgTv) GetMute() (bool, error)
- func (tv *LgTv) GetVolume() (int, error)
- func (tv *LgTv) LaunchApp(appID string) (string, error)
- func (tv *LgTv) ListChannels() ([]Channel, error)
- func (tv *LgTv) ListExternalInputs() ([]Input, error)
- func (tv *LgTv) ListInstalledApps() ([]App, error)
- func (tv *LgTv) Pause() error
- func (tv *LgTv) Play() error
- func (tv *LgTv) Rewind() error
- func (tv *LgTv) SetChannel(channelNumber int) error
- func (tv *LgTv) SetMute(isMute bool) error
- func (tv *LgTv) SetVolume(value int) error
- func (tv *LgTv) Stop() error
- func (tv *LgTv) SwitchInput(inputID string) error
- func (tv *LgTv) TurnOff() error
- func (tv *LgTv) TurnOn() error
- func (tv *LgTv) VolumeDown() error
- func (tv *LgTv) VolumeUp() error
- type Program
Constants ¶
This section is empty.
Variables ¶
var ErrInsufficientNetworkDetails = errors.New("Insufficient network information was supplied to use this function")
ErrInsufficientNetworkDetails is returned if an attempt is made to turn on a tv without providing a mac address and subnet mask
var ErrNotConnected = errors.New("Client is not connected to TV")
ErrNotConnected is returned if an request is attempted to a TV which is not connected to the client
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { ChannelName string ChannelNumber int IsScrambled bool IsHdtv bool // contains filtered or unexported fields }
Channel represents a tv channel
type ChannelProgramList ¶
ChannelProgramList is the list of programs broadcast on a particular channel
type LgTv ¶
LgTv represents the TV being controlled
func (*LgTv) ChannelDown ¶
ChannelDown changes the current channel down by 1
func (*LgTv) Connect ¶
Connect connects to the tv using the provided client key. If an empty client key is provided, a new one will be provisioned
func (*LgTv) FastForward ¶
FastForward fast forwards the current media
func (*LgTv) GetChannelProgramList ¶
func (tv *LgTv) GetChannelProgramList() (ChannelProgramList, error)
GetChannelProgramList gets the list of programs broadcast on the current channel
func (*LgTv) GetCurrentChannel ¶
GetCurrentChannel returns the channel the TV is currently set to
func (*LgTv) LaunchApp ¶
LaunchApp launches the app with the provided ID. If successfully launched, it returns the ID of the new session
func (*LgTv) ListChannels ¶
ListChannels returns a slice of available TV channels
func (*LgTv) ListExternalInputs ¶
ListExternalInputs lists the external input devices for the TV
func (*LgTv) ListInstalledApps ¶
ListInstalledApps lists the apps currently installed on the TV
func (*LgTv) SetChannel ¶
SetChannel sets the current viewed channel to the specified number
func (*LgTv) SwitchInput ¶
SwitchInput switches the input of the TV to the one with the specified input ID