hass

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupervisorToken

func SupervisorToken() string

Types

type API

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

func NewAPI

func NewAPI(url, token string) (*API, error)

func (*API) Auth

func (a *API) Auth(token string) error

func (*API) Close

func (a *API) Close() error

func (*API) ExchangeSDP

func (a *API) ExchangeSDP(entityID, offer string) (string, error)

func (*API) GetWebRTCEntities

func (a *API) GetWebRTCEntities() (map[string]string, error)

type Client

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

func NewClient

func NewClient(rawURL string) (*Client, error)

func (*Client) AddTrack

func (c *Client) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error

func (*Client) GetMedias

func (c *Client) GetMedias() []*core.Media

func (*Client) GetTrack

func (c *Client) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)

func (*Client) MarshalJSON

func (c *Client) MarshalJSON() ([]byte, error)

func (*Client) Start

func (c *Client) Start() error

func (*Client) Stop

func (c *Client) Stop() error

type ResponseAuth

type ResponseAuth struct {
	Type string `json:"type"`
}

type ResponseOffer

type ResponseOffer struct {
	//Id      int    `json:"id"`
	Type    string `json:"type"`
	Success bool   `json:"success"`
	Result  struct {
		Answer string `json:"answer"`
	} `json:"result"`
}

type ResponseStates

type ResponseStates struct {
	//Id      int    `json:"id"`
	Type    string `json:"type"`
	Success bool   `json:"success"`
	Result  []struct {
		EntityId string `json:"entity_id"`
		//State      string `json:"state"`
		Attributes struct {
			//ModelName          string `json:"model_name"`
			//Brand              string `json:"brand"`
			FrontendStreamType string `json:"frontend_stream_type"`
			FriendlyName       string `json:"friendly_name"`
		} `json:"attributes"`
	} `json:"result"`
}

Jump to

Keyboard shortcuts

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