package main
import(
"context"
"os"
polargo "github.com/polarsource/polar-go"
"github.com/polarsource/polar-go/types"
"github.com/polarsource/polar-go/models/components"
"github.com/polarsource/polar-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := polargo.New(
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
)
res, err := s.Meters.Quantities(ctx, operations.MetersQuantitiesRequest{
ID: "<value>",
StartTimestamp: types.MustTimeFromString("2025-11-25T04:37:16.823Z"),
EndTimestamp: types.MustTimeFromString("2025-11-26T17:06:00.727Z"),
Interval: components.TimeIntervalDay,
})
if err != nil {
log.Fatal(err)
}
if res.MeterQuantities != nil {
// handle response
}
}