api

package
v0.0.0-...-15bb288 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cookies []*http.Cookie) (*Client, error)

func (*Client) GetMeters

func (c *Client) GetMeters(ctx context.Context) (*GetMetersResponse, error)

type GetMetersResponse

type GetMetersResponse struct {
	Yearly                               []Reading   `json:"Yearly"`
	HalfYearly                           []Reading   `json:"HalfYearly"`
	Monthly                              []Reading   `json:"Monthly"`
	Daily                                []Reading   `json:"Daily"`
	Meters                               []string    `json:"Meters"`
	IsRecentCustomer                     bool        `json:"IsRecentCustomer"`
	IsPremiseAddressSameAsMailingAddress bool        `json:"IsPremiseAddressSameAsMailingAddress"`
	IsError                              bool        `json:"IsError"`
	IsDataAvailable                      bool        `json:"IsDataAvailable"`
	Lines                                interface{} `json:"Lines"`
	IsConsumptionAvailable               bool        `json:"IsConsumptionAvailable"`
	AlertsValues                         interface{} `json:"AlertsValues"`
	TargetUsage                          float64     `json:"TargetUsage"`
	AverageUsage                         float64     `json:"AverageUsage"`
	ActualUsage                          float64     `json:"ActualUsage"`
	MyUsage                              interface{} `json:"MyUsage"`
	AverageUsagePerPerson                float64     `json:"AverageUsagePerPerson"`
}

type GetSmartWaterMeterConsumptionsRequest

type GetSmartWaterMeterConsumptionsRequest struct {
	Meter     string
	StartDate time.Time
	EndDate   time.Time
}

type GetSmartWaterMeterConsumptionsResponse

type GetSmartWaterMeterConsumptionsResponse struct {
	IsError                bool                     `json:"IsError"`
	IsDataAvailable        bool                     `json:"IsDataAvailable"`
	Lines                  []SmartWaterMeterReading `json:"Lines"`
	IsConsumptionAvailable bool                     `json:"IsConsumptionAvailable"`
	AlertsValues           interface{}              `json:"AlertsValues"`
	TargetUsage            float64                  `json:"TargetUsage"`
	AverageUsage           float64                  `json:"AverageUsage"`
	ActualUsage            float64                  `json:"ActualUsage"`
	MyUsage                string                   `json:"MyUsage"`
	AverageUsagePerPerson  float64                  `json:"AverageUsagePerPerson"`
}

type Reading

type Reading struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

type SmartWaterMeterReading

type SmartWaterMeterReading struct {
	Label                string  `json:"Label"`
	Usage                float64 `json:"Usage"`
	Read                 float64 `json:"Read"`
	IsEstimated          bool    `json:"IsEstimated"`
	MeterSerialNumberHis string  `json:"MeterSerialNumberHis"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL