Documentation
¶
Index ¶
- func ContextWithServiceFactory(ctx context.Context, factory ServiceFactory) context.Context
- func NewAuthenticatedClient(ctx context.Context) (*http.Client, *config.Config, error)
- func NewAuthenticatedClientWithScopes(ctx context.Context, scopeList ...string) (*http.Client, *config.Config, error)
- type Service
- type ServiceFactory
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
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 ¶
NewService creates an authenticated Android Publisher service.