move client structs
This commit is contained in:
17
client.go
17
client.go
@ -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"),
|
||||
|
Reference in New Issue
Block a user