api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUnauthorized

func IsUnauthorized(err error) bool

Types

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       string
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

type QuotaWindow

type QuotaWindow struct {
	Label       string
	UsedPercent float64
	LeftPercent float64
	ResetAt     time.Time
	WindowSec   int64
}

type UsageData

type UsageData struct {
	PlanType     string
	Allowed      bool
	LimitReached bool
	Windows      []QuotaWindow
}

func CallAPI

func CallAPI(accessToken, accountID string) (UsageData, error)

Jump to

Keyboard shortcuts

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