2023-11-04 20:10:08 +01:00
|
|
|
package types
|
|
|
|
|
|
|
|
type SpaceAPIResponseV14 struct {
|
|
|
|
APICompatibility []string `json:"api_compatibility"`
|
|
|
|
Space string `json:"space"`
|
|
|
|
Logo string `json:"logo"`
|
2023-11-09 22:13:22 +01:00
|
|
|
ExtCCC string `json:"ext_ccc"`
|
2023-11-04 20:10:08 +01:00
|
|
|
URL string `json:"url"`
|
|
|
|
Location struct {
|
|
|
|
Address string `json:"address"`
|
|
|
|
Lat float64 `json:"lat"`
|
|
|
|
Lon float64 `json:"lon"`
|
|
|
|
} `json:"location"`
|
2024-01-14 01:53:36 +01:00
|
|
|
State SpaceState `json:"state"`
|
2023-11-04 20:10:08 +01:00
|
|
|
Contact struct {
|
|
|
|
Phone string `json:"phone"`
|
2023-11-09 22:13:22 +01:00
|
|
|
IRC string `json:"irc"`
|
2023-11-04 20:10:08 +01:00
|
|
|
Mastodon string `json:"mastodon"`
|
|
|
|
Email string `json:"email"`
|
2023-11-09 22:13:22 +01:00
|
|
|
ML string `json:"ml"`
|
2023-11-04 20:10:08 +01:00
|
|
|
Matrix string `json:"matrix"`
|
|
|
|
} `json:"contact"`
|
2024-01-14 01:01:12 +01:00
|
|
|
Sensors map[string][]EnvironmentSensor `json:"sensors"`
|
|
|
|
Feeds struct {
|
2023-11-04 20:10:08 +01:00
|
|
|
Blog struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
} `json:"blog"`
|
|
|
|
Calendar struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
} `json:"calendar"`
|
|
|
|
} `json:"feeds"`
|
|
|
|
Links []struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
} `json:"links"`
|
|
|
|
}
|
2023-11-10 03:24:12 +01:00
|
|
|
|
2024-01-14 01:53:36 +01:00
|
|
|
type SpaceState struct {
|
|
|
|
Open bool `json:"open"`
|
|
|
|
LastChange int64 `json:"lastchange"`
|
|
|
|
}
|
|
|
|
|
2024-01-13 23:13:56 +01:00
|
|
|
type EnvironmentSensor struct {
|
2024-01-14 01:04:01 +01:00
|
|
|
Value float64 `json:"value"`
|
2024-01-13 23:13:56 +01:00
|
|
|
Unit string `json:"unit"`
|
|
|
|
Location string `json:"location"`
|
2024-01-14 21:54:01 +01:00
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
Description string `json:"description,omitempty"`
|
|
|
|
LastChange int64 `json:"lastchange,omitempty"`
|
2024-01-13 23:13:56 +01:00
|
|
|
}
|
|
|
|
|
2023-11-10 03:24:12 +01:00
|
|
|
type PersistentStateV14 struct {
|
|
|
|
State struct {
|
|
|
|
Open bool `json:"open"`
|
|
|
|
LastChange int64 `json:"lastchange"`
|
|
|
|
} `json:"state"`
|
2024-01-14 21:54:01 +01:00
|
|
|
Sensors map[string][]PersistentEnvironmentSensor `json:"sensors,omitempty"`
|
2024-01-14 01:29:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type PersistentEnvironmentSensor struct {
|
|
|
|
Value float64 `json:"value"`
|
|
|
|
Location string `json:"location"`
|
2024-01-14 21:54:01 +01:00
|
|
|
Name string `json:"name,omitempty"`
|
2024-01-14 01:29:41 +01:00
|
|
|
LastChange int64 `json:"lastchange"`
|
2023-11-10 03:24:12 +01:00
|
|
|
}
|