spaceapid/types/v14.go

57 lines
1.5 KiB
Go
Raw Normal View History

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"`
State struct {
Open bool `json:"open"`
LastChange int64 `json:"lastchange"`
} `json:"state"`
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"`
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"`
}
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 {
State struct {
Open bool `json:"open"`
LastChange int64 `json:"lastchange"`
} `json:"state"`
}