Documentation
¶
Index ¶
Constants ¶
View Source
const ( XPATH_SENT_DATA_YESTERDAY_DE string = "//tr[td[text() = 'Gestern']]/td[@datalabel='Datenvolumen gesendet(MB)']/text()" XPATH_RECEIVED_DATA_YESTERDAY_DE string = "//tr[td[text() = 'Gestern']]/td[@datalabel='Datenvolumen empfangen(MB)']/text()" )
FritzOS <= 7.21 Needed for parsing values from HTML table
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterData ¶
type CounterData struct {
Yesterday struct {
Bytessenthigh string `json:"BytesSentHigh"`
Bytessentlow string `json:"BytesSentLow"`
Bytesreceivedhigh string `json:"BytesReceivedHigh"`
Bytesreceivedlow string `json:"BytesReceivedLow"`
} `json:"Yesterday"`
Today struct {
Bytessenthigh string `json:"BytesSentHigh"`
Bytessentlow string `json:"BytesSentLow"`
Bytesreceivedhigh string `json:"BytesReceivedHigh"`
Bytesreceivedlow string `json:"BytesReceivedLow"`
} `json:"Today"`
}
FritzOS >= 7.25 Needed for parsing the JSON part taken from HTML source code
type FritzBox ¶
type FritzBox struct {
Host string
User string
Passw string
Insecure bool // If host is https allow insecure/invalid TLS certificates
// contains filtered or unexported fields
}
Stores general information about the FritzBox
func (*FritzBox) PerformLogin ¶
PerformLogin performs a login and returns SessionInfo including the session id (SID) on success
func (*FritzBox) ReadOnlineCounter ¶
func (fb *FritzBox) ReadOnlineCounter() (OnlineCounter, error)
type OnlineCounter ¶
type SessionInfo ¶
type SessionInfo struct {
SID string `xml:"SID"`
Challenge string `xml:"Challenge"`
Users []User `xml:"Users"`
}
Stores the current FritzBox session
Click to show internal directories.
Click to hide internal directories.