Documentation ¶
Index ¶
- Constants
- Variables
- func NewTestClient(fn RoundTripFunc) *http.Client
- func TestingHTTPClient(resp *string) *http.Client
- type ActiveAppResponse
- type App
- type AppsResponse
- type BaseClient
- type Client
- type DeviceInfo
- type EcpClient
- func (ec *EcpClient) GetActiveApp() (*App, error)
- func (ec *EcpClient) GetAppUi() (*Node, error)
- func (ec *EcpClient) GetApps() (*[]App, error)
- func (ec *EcpClient) GetDeviceInfo() (*DeviceInfo, error)
- func (ec *EcpClient) GetIcon(channelId string) (image.Image, error)
- func (ec *EcpClient) GetPlayer() (*Player, error)
- func (ec *EcpClient) GetSource() ([]byte, error)
- func (ec *EcpClient) GetTimeout() int
- func (ec *EcpClient) InputChannel(channelId string, contentId string, mediaType string) (bool, error)
- func (ec *EcpClient) InstallChannel(channelId string) (bool, error)
- func (ec *EcpClient) KeyDown(button string) (bool, error)
- func (ec *EcpClient) KeyPress(button string) (bool, error)
- func (ec *EcpClient) KeyUp(button string) (bool, error)
- func (ec *EcpClient) LaunchChannel(channelId string, contentId string, mediaType string) (bool, error)
- func (ec *EcpClient) SetTimeout(timeout time.Duration)
- type Node
- type Option
- type Player
- type PluginClient
- type RequestData
- type RoundTripFunc
Constants ¶
View Source
const RequestTimeoutMilliseconds = 30000
Variables ¶
View Source
var AppResponseMock = `` /* 138-byte string literal not displayed */
View Source
var AppsResponseMock = `` /* 203-byte string literal not displayed */
View Source
var SuccessResponseMock = `{}`
View Source
var UiResponseMock = `` /* 219-byte string literal not displayed */
Functions ¶
func NewTestClient ¶
func NewTestClient(fn RoundTripFunc) *http.Client
NewTestClient returns *http.Client with Transport replaced to avoid making real calls
func TestingHTTPClient ¶
Types ¶
type ActiveAppResponse ¶
type ActiveAppResponse struct {
ActiveApp App `xml:"app"`
}
type AppsResponse ¶
type AppsResponse struct {
Apps []App `xml:"app"`
}
type BaseClient ¶
type DeviceInfo ¶
type DeviceInfo struct { Udn string `xml:"udn"` SerialNumber string `xml:"serial-number"` DeviceID string `xml:"device-id"` AdvertisingID string `xml:"advertising-id"` VendorName string `xml:"vendor-name"` ModelName string `xml:"model-name"` ModelNumber string `xml:"model-number"` ModelRegion string `xml:"model-region"` IsTv string `xml:"is-tv"` IsStick string `xml:"is-stick"` SupportsEthernet string `xml:"supports-ethernet"` WifiMac string `xml:"wifi-mac"` WifiDriver string `xml:"wifi-driver"` EthernetMac string `xml:"ethernet-mac"` NetworkType string `xml:"network-type"` NetworkName string `xml:"network-name"` FriendlyDeviceName string `xml:"friendly-device-name"` FriendlyModelName string `xml:"friendly-model-name"` DefaultDeviceName string `xml:"default-device-name"` UserDeviceName string `xml:"user-device-name"` UserDeviceLocation string `xml:"user-device-location"` BuildNumber string `xml:"build-number"` SoftwareVersion string `xml:"software-version"` SoftwareBuild string `xml:"software-build"` SecureDevice string `xml:"secure-device"` Language string `xml:"language"` Country string `xml:"country"` Locale string `xml:"locale"` TimeZoneAuto string `xml:"time-zone-auto"` TimeZone string `xml:"time-zone"` TimeZoneName string `xml:"time-zone-name"` TimeZoneTz string `xml:"time-zone-tz"` TimeZoneOffset string `xml:"time-zone-offset"` ClockFormat string `xml:"clock-format"` Uptime string `xml:"uptime"` PowerMode string `xml:"power-mode"` SupportsSuspend string `xml:"supports-suspend"` SupportsFindRemote string `xml:"supports-find-remote"` FindRemoteIsPossible string `xml:"find-remote-is-possible"` SupportsAudioGuide string `xml:"supports-audio-guide"` SupportsRva string `xml:"supports-rva"` DeveloperEnabled string `xml:"developer-enabled"` KeyedDeveloperID string `xml:"keyed-developer-id"` SearchEnabled string `xml:"search-enabled"` SearchChannelsEnabled string `xml:"search-channels-enabled"` NotificationsEnabled string `xml:"notifications-enabled"` NotificationsFirstUse string `xml:"notifications-first-use"` SupportsPrivateListening string `xml:"supports-private-listening"` HeadphonesConnected string `xml:"headphones-connected"` SupportsEcsTextedit string `xml:"supports-ecs-textedit"` SupportsEcsMicrophone string `xml:"supports-ecs-microphone"` SupportsWakeOnWlan string `xml:"supports-wake-on-wlan"` HasPlayOnRoku string `xml:"has-play-on-roku"` HasMobileScreensaver string `xml:"has-mobile-screensaver"` SupportURL string `xml:"support-url"` GrandcentralVersion string `xml:"grandcentral-version"` TrcVersion string `xml:"trc-version"` TrcChannelVersion string `xml:"trc-channel-version"` DavinciVersion string `xml:"davinci-version"` }
type EcpClient ¶
type EcpClient struct {
*BaseClient
}
func GetEcpClient ¶
func GetMockedClient ¶
func (*EcpClient) GetActiveApp ¶
func (*EcpClient) GetDeviceInfo ¶
func (ec *EcpClient) GetDeviceInfo() (*DeviceInfo, error)
func (*EcpClient) GetTimeout ¶
func (*EcpClient) InputChannel ¶
func (*EcpClient) InstallChannel ¶
func (*EcpClient) LaunchChannel ¶
func (*EcpClient) SetTimeout ¶
type Player ¶
type Player struct { Error string `xml:"error,attr"` State string `xml:"state,attr"` Format struct { Audio string `xml:"audio,attr"` Captions string `xml:"captions,attr"` Container string `xml:"container,attr"` Drm string `xml:"drm,attr"` Video string `xml:"video,attr"` VideoRes string `xml:"video_res,attr"` } `xml:"format"` Buffering struct { Current string `xml:"current,attr"` Max string `xml:"max,attr"` Target string `xml:"target,attr"` } `xml:"buffering"` NewStream struct { Speed string `xml:"speed,attr"` } `xml:"new_stream"` Position string `xml:"position"` Duration string `xml:"duration"` IsLive string `xml:"is_live"` Runtime string `xml:"runtime"` StreamSegment struct { Bitrate string `xml:"bitrate,attr"` MediaSequence string `xml:"media_sequence,attr"` SegmentType string `xml:"segment_type,attr"` Time string `xml:"time,attr"` } `xml:"stream_segment"` }
type PluginClient ¶
type PluginClient struct {
*BaseClient
}
func GetPluginClient ¶
func GetPluginClient(ip string) (*PluginClient, error)
type RequestData ¶
Click to show internal directories.
Click to hide internal directories.