perplexity

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package perplexity implements the Perplexity usage provider.

Auth: Usage Buttons Helper extension with the user's perplexity.ai browser session. Endpoints (the /rest/billing/credits endpoint, briefly removed in early 2026, is alive again and is the source for the credit-balance tiles; the rest mirror what perplexity.ai/account/usage fetches):

GET /rest/pplx-api/v2/groups                                — discover org/group ID
GET /rest/pplx-api/v2/groups/{groupId}                      — balance + plan tier
GET /rest/pplx-api/v2/groups/{groupId}/usage-analytics      — meter cost summaries
GET /rest/rate-limit/all                                    — per-tier query quotas
GET /rest/billing/credits?version=2.18&source=default       — plan/purchased/bonus credits + meter usage breakdown

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider fetches Perplexity usage data.

func (Provider) BrandBg

func (Provider) BrandBg() string

BrandBg returns the background color used on button faces.

func (Provider) BrandColor

func (Provider) BrandColor() string

BrandColor returns the accent color used on button faces.

func (Provider) Fetch

Fetch returns the latest Perplexity quota snapshot.

func (Provider) ID

func (Provider) ID() string

ID returns the provider identifier used by the registry.

func (Provider) MetricIDs

func (Provider) MetricIDs() []string

MetricIDs enumerates the metrics this provider can emit.

func (Provider) Name

func (Provider) Name() string

Name returns the human-readable provider name.

Jump to

Keyboard shortcuts

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