Add fields for Temperature and Humidity sensors to SpaceAPIResponseV14
This commit is contained in:
parent
951b4edc17
commit
ab0a91d5f2
1 changed files with 12 additions and 0 deletions
12
types/v14.go
12
types/v14.go
|
@ -23,6 +23,10 @@ type SpaceAPIResponseV14 struct {
|
||||||
ML string `json:"ml"`
|
ML string `json:"ml"`
|
||||||
Matrix string `json:"matrix"`
|
Matrix string `json:"matrix"`
|
||||||
} `json:"contact"`
|
} `json:"contact"`
|
||||||
|
Sensors struct {
|
||||||
|
Temperature []EnvironmentSensor `json:"temperature"`
|
||||||
|
Humidity []EnvironmentSensor `json:"humidity"`
|
||||||
|
} `json:"sensors"`
|
||||||
Feeds struct {
|
Feeds struct {
|
||||||
Blog struct {
|
Blog struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
|
@ -39,6 +43,14 @@ type SpaceAPIResponseV14 struct {
|
||||||
} `json:"links"`
|
} `json:"links"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type EnvironmentSensor struct {
|
||||||
|
Value float32 `json:"value"`
|
||||||
|
Unit string `json:"unit"`
|
||||||
|
Location string `json:"location"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
}
|
||||||
|
|
||||||
type PersistentStateV14 struct {
|
type PersistentStateV14 struct {
|
||||||
State struct {
|
State struct {
|
||||||
Open bool `json:"open"`
|
Open bool `json:"open"`
|
||||||
|
|
Loading…
Reference in a new issue