Discover Packages
codeberg.org/marians/solarmania
pkg
client
package
Version:
v0.0.0-...-30acd1d
Opens a new window with list of versions in this module.
Published: Sep 13, 2022
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type AuthResponse struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
ExpiresIn int `json:"expires_in"`
Scope string `json:"scope"`
JTI string `json:"jti"`
}
New returns a configured Client.
GetDay returns data for a single plant for one
day, in 5 minute intervals.
GetPlants returns an array of plants (solar power plants)
owned by the user.
Login issues the login request.
Required to perform authenticated requests afterwards.
type DayRecord struct {
Id string `json:"id"`
PlantId int `json:"systemId"`
Year int `json:"year"`
Month int `json:"month"`
Day int `json:"day"`
GenerationValue float64 `json:"generationValue,omitempty"`
FullPowerHoursDay float64 `json:"fullPowerHoursDay,omitempty"`
}
type FiveMinuteRecord struct {
Id string `json:"id"`
PlantId int `json:"systemId"`
DateTime float64 `json:"dateTime"`
GenerationPower float64 `json:"generationPower,omitempty"`
GenerationCapacity float64 `json:"generationCapacity,omitempty"`
}
type MonthResponse struct {
Records []DayRecord `json:"records"`
}
type Plant struct {
Id int `json:"id"`
}
type PlantsResponse struct {
Total int `json:"total"`
Data []Plant `json:"data"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.