playclient

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithServiceFactory added in v0.9.0

func ContextWithServiceFactory(ctx context.Context, factory ServiceFactory) context.Context

ContextWithServiceFactory installs a scoped service factory.

func NewAuthenticatedClient added in v0.6.0

func NewAuthenticatedClient(ctx context.Context) (*http.Client, *config.Config, error)

NewAuthenticatedClient returns an HTTP client authenticated with the androidpublisher OAuth scope, together with the loaded config. Sibling clients that share this scope (e.g. the Play Games publishing API) build their generated services on top of this client instead of duplicating the credential-resolution logic. The transport is wrapped for dry-run when dry-run mode is active, mirroring NewService.

func NewAuthenticatedClientWithScopes added in v0.6.0

func NewAuthenticatedClientWithScopes(ctx context.Context, scopeList ...string) (*http.Client, *config.Config, error)

NewAuthenticatedClientWithScopes is like NewAuthenticatedClient but requests an explicit set of OAuth scopes. Pass no scopes to default to the androidpublisher scope. Sibling APIs that need additional scopes (e.g. the Play Games management API additionally requires the games scope) pass the full list so a single token covers every service they build.

Types

type Service

type Service struct {
	API *androidpublisher.Service
	Cfg *config.Config
}

Service wraps the Android Publisher service and config.

func NewService

func NewService(ctx context.Context) (*Service, error)

NewService creates an authenticated Android Publisher service.

func NewServiceWithClient added in v0.5.3

func NewServiceWithClient(ctx context.Context, client *http.Client, basePath string) (*Service, error)

NewServiceWithClient creates an Android Publisher service using a provided HTTP client. Tests use this to point the generated client at a mock server.

type ServiceFactory added in v0.9.0

type ServiceFactory func(context.Context) (*Service, error)

ServiceFactory creates an Android Publisher service. Runtime wiring uses a context-scoped factory so every command package can be tested without global hooks or credential resolution.

Jump to

Keyboard shortcuts

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