|
|
|
@ -15,6 +15,7 @@ import (
|
|
|
|
|
type SL struct {
|
|
|
|
|
Config *Config
|
|
|
|
|
lastResponse SLResponse
|
|
|
|
|
lastRefresh int64
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SLResponse is a struct to get the interesting data from API Responses
|
|
|
|
@ -58,6 +59,7 @@ func (sl *SL) GetOutput() string {
|
|
|
|
|
// If no error occured, save the latest data to the struct
|
|
|
|
|
if err == nil {
|
|
|
|
|
sl.lastResponse = sldata
|
|
|
|
|
sl.lastRefresh = time.Now().Unix()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|