api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

type ApiClient struct {
	Ip          net.IP
	Email       string
	Password    string
	HandshakeTS time.Time
	// contains filtered or unexported fields
}

ApiClient is the main struct to interact with the raw Tapo API.

func NewClient

func NewClient(ip, email, password string) (*ApiClient, error)

NewClient creates a new ApiClient.

func (*ApiClient) Login

func (d *ApiClient) Login() error

Login logs in to the Tapo API.

func (*ApiClient) RefreshSession

func (d *ApiClient) RefreshSession() error

RefreshSession refreshes the authentication session of the client.

func (*ApiClient) Request

func (d *ApiClient) Request(method string, params interface{}) ([]byte, error)

Request sends a request to the Tapo API.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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