move client structs

This commit is contained in:
2020-02-29 15:57:32 -06:00
parent 1c99d42224
commit 37d3179662
3 changed files with 50 additions and 30 deletions

View File

@ -10,6 +10,23 @@ import (
"net/http"
)
type (
Client struct {
accessToken string
Client *http.Client
}
Results struct {
Results []Result `json:results`
}
Result struct {
ID string `json:"id"`
Label string `json:"label"`
Status Status `json:"status"`
}
)
var errorMap = map[int]error{
http.StatusNotFound: errors.New("Selector did not match any lights"),
http.StatusUnauthorized: errors.New("Bad access token"),