api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequiredAPIs = map[string]string{
	"androidpublisher.googleapis.com":       "Google Play Android Developer API",
	"playdeveloperreporting.googleapis.com": "Google Play Developer Reporting API",
}

RequiredAPIs lists all APIs that might be needed by the CLI

Functions

func CheckAndEnableAPI

func CheckAndEnableAPI(operation func() error) error

CheckAndEnableAPI wraps an API call and handles enablement if needed

func HandleAPIEnablement

func HandleAPIEnablement(apiErr *APIEnablementError) error

HandleAPIEnablement provides an interactive flow to enable a required API

Types

type APIEnablementError

type APIEnablementError struct {
	APIName       string
	APITitle      string
	ProjectID     string
	ActivationURL string
	OriginalError error
}

APIEnablementError represents an error when an API needs to be enabled

func ParseAPIEnablementError

func ParseAPIEnablementError(err error) *APIEnablementError

ParseAPIEnablementError checks if an error is due to a disabled API and extracts the relevant information

func (*APIEnablementError) Error

func (e *APIEnablementError) Error() string

type Client

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

Client wraps the Android Publisher API client

func NewClient

func NewClient(packageName string, timeout time.Duration) (*Client, error)

NewClient creates a new API client

func (*Client) Apps

Apps returns the applications service

func (*Client) Context

func (c *Client) Context() (context.Context, context.CancelFunc)

Context returns a context with timeout

func (*Client) CreateEdit

func (c *Client) CreateEdit() (*Edit, error)

CreateEdit creates a new edit session

func (*Client) Edits

func (c *Client) Edits() *androidpublisher.EditsService

Edits returns the edits service

func (*Client) GetEdit

func (c *Client) GetEdit(editID string) (*Edit, error)

GetEdit returns an existing edit by ID

func (*Client) GetPackageName

func (c *Client) GetPackageName() string

GetPackageName returns the package name

func (*Client) GetService

func (c *Client) GetService() *androidpublisher.Service

GetService returns the underlying Android Publisher service

func (*Client) Grants

func (c *Client) Grants() *androidpublisher.GrantsService

Grants returns the grants service

func (*Client) InAppProducts

func (c *Client) InAppProducts() *androidpublisher.InappproductsService

InAppProducts returns the in-app products service

func (*Client) Monetization

func (c *Client) Monetization() *androidpublisher.MonetizationService

Monetization returns the monetization service

func (*Client) Purchases

func (c *Client) Purchases() *androidpublisher.PurchasesService

Purchases returns the purchases service

func (*Client) Reviews

func (c *Client) Reviews() *androidpublisher.ReviewsService

Reviews returns the reviews service

func (*Client) Users

func (c *Client) Users() *androidpublisher.UsersService

Users returns the users service

type Edit

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

Edit represents an active edit session

func (*Edit) APKs

APKs returns the APKs service for this edit

func (*Edit) Bundles

Bundles returns the bundles service for this edit

func (*Edit) Close

func (e *Edit) Close()

Close releases resources

func (*Edit) Commit

func (e *Edit) Commit() error

Commit commits the edit

func (*Edit) Context

func (e *Edit) Context() context.Context

Context returns the edit context

func (*Edit) Delete

func (e *Edit) Delete() error

Delete deletes the edit without committing

func (*Edit) DeobfuscationFiles

func (e *Edit) DeobfuscationFiles() *androidpublisher.EditsDeobfuscationfilesService

DeobfuscationFiles returns the deobfuscation files service for this edit

func (*Edit) Details

Details returns the details service for this edit

func (*Edit) ExpansionFiles

func (e *Edit) ExpansionFiles() *androidpublisher.EditsExpansionfilesService

ExpansionFiles returns the expansion files service for this edit

func (*Edit) ID

func (e *Edit) ID() string

ID returns the edit ID

func (*Edit) Images

Images returns the images service for this edit

func (*Edit) Listings

Listings returns the listings service for this edit

func (*Edit) Testers

Testers returns the testers service for this edit

func (*Edit) Tracks

Tracks returns the tracks service for this edit

func (*Edit) Validate

func (e *Edit) Validate() error

Validate validates the edit

Jump to

Keyboard shortcuts

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