Move api constants

This commit is contained in:
andig 2021-05-02 10:55:43 +02:00
parent ca2ccfa90f
commit f2da9b4594
2 changed files with 11 additions and 11 deletions

View file

@ -18,17 +18,6 @@ type Token struct {
Valid time.Time // helper to store validity timestamp
}
// charge mode definition
const (
ModeOffline int = 0
ModeDisconnected int = 1
ModeAwaitingStart int = 2
ModeCharging int = 3
ModeCompleted int = 4
ModeError int = 5
ModeReadyToCharge int = 6
)
// Identity manages the /api/accounts/token and /api/accounts/refresh_token response
type Identity struct {
*request.Helper

View file

@ -3,6 +3,17 @@ package easee
// API is the Easee API endpoint
const API = "https://api.easee.cloud/api"
// charge mode definition
const (
ModeOffline int = 0
ModeDisconnected int = 1
ModeAwaitingStart int = 2
ModeCharging int = 3
ModeCompleted int = 4
ModeError int = 5
ModeReadyToCharge int = 6
)
// Charger is the charger type
type Charger struct {
ID string `json:"id"`