Repository navigation
v4.3.0
Minor release, no API changes for callers.
go get github.com/Hyper-Solutions/hyper-sdk-go/v4@v4.3.0
New
Session.GetUsage: returns the API key's pay-as-you-go balance (BalanceEuro) and oneUsagePlanper product withRequestsUsed,RequestsQuota,RequestsRemainingandExpiresAt. Request counts areint64. The request goes toGET https://api.hypersolutions.co/usage, carries the session's JWT and organization signatures, and is not counted as usage.
usage, err := session.GetUsage(ctx)
if err != nil {
// Handle error
}
for _, plan := range usage.Plans {
fmt.Printf("%s: %d of %d left\n", plan.Product, plan.RequestsRemaining, plan.RequestsQuota)
}Docs: https://docs.hypersolutions.co/api-reference/usage-statistics