fritzclient

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config *config.Config // The client configuration.

	HTTPClient  *http.Client // The HTTP client.
	SessionInfo *SessionInfo // The current session data of the client.
	// contains filtered or unexported fields
}

Client encapsulates the FRITZ!Box interaction API.

func New

func New(configfile string) (*Client, error)

New creates a new Client with values read from a config file, given by the parameter configfile.

func (*Client) Login

func (client *Client) Login() (*Client, error)

Login tries to login into the box and obtain the session id.

type SessionInfo

type SessionInfo struct {
	Challenge string // A challenge provided by the FRITZ!Box.
	SID       string // The session id issued by the FRITZ!Box, "0000000000000000" is considered invalid/"no session".
}

SessionInfo models the xml upon accessing the login endpoint.

Jump to

Keyboard shortcuts

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