Documentation
¶
Index ¶
- Variables
- func CheckAndEnableAPI(operation func() error) error
- func HandleAPIEnablement(apiErr *APIEnablementError) error
- type APIEnablementError
- type Client
- func (c *Client) AppRecovery() *androidpublisher.ApprecoveryService
- func (c *Client) Apps() *androidpublisher.ApplicationsService
- func (c *Client) Context() (context.Context, context.CancelFunc)
- func (c *Client) CreateEdit() (*Edit, error)
- func (c *Client) Edits() *androidpublisher.EditsService
- func (c *Client) ExternalTransactions() *androidpublisher.ExternaltransactionsService
- func (c *Client) GeneratedAPKs() *androidpublisher.GeneratedapksService
- func (c *Client) GetEdit(editID string) (*Edit, error)
- func (c *Client) GetPackageName() string
- func (c *Client) GetService() *androidpublisher.Service
- func (c *Client) Grants() *androidpublisher.GrantsService
- func (c *Client) InAppProducts() *androidpublisher.InappproductsService
- func (c *Client) Monetization() *androidpublisher.MonetizationService
- func (c *Client) Orders() *androidpublisher.OrdersService
- func (c *Client) Purchases() *androidpublisher.PurchasesService
- func (c *Client) Reviews() *androidpublisher.ReviewsService
- func (c *Client) SystemAPKs() *androidpublisher.SystemapksService
- func (c *Client) Users() *androidpublisher.UsersService
- type Edit
- func (e *Edit) APKs() *androidpublisher.EditsApksService
- func (e *Edit) Bundles() *androidpublisher.EditsBundlesService
- func (e *Edit) Close()
- func (e *Edit) Commit() error
- func (e *Edit) Context() context.Context
- func (e *Edit) Delete() error
- func (e *Edit) DeobfuscationFiles() *androidpublisher.EditsDeobfuscationfilesService
- func (e *Edit) Details() *androidpublisher.EditsDetailsService
- func (e *Edit) ExpansionFiles() *androidpublisher.EditsExpansionfilesService
- func (e *Edit) ID() string
- func (e *Edit) Images() *androidpublisher.EditsImagesService
- func (e *Edit) Keep()
- func (e *Edit) Listings() *androidpublisher.EditsListingsService
- func (e *Edit) Testers() *androidpublisher.EditsTestersService
- func (e *Edit) Tracks() *androidpublisher.EditsTracksService
- func (e *Edit) Validate() error
- type GitHubAsset
- type GitHubClient
- type GitHubRelease
- type PlatformDownloads
- type ReleaseDownloads
- type ReportingClient
- func (c *ReportingClient) Anomalies() *playdeveloperreporting.AnomaliesService
- func (c *ReportingClient) AppName() string
- func (c *ReportingClient) Apps() *playdeveloperreporting.AppsService
- func (c *ReportingClient) Context() (context.Context, context.CancelFunc)
- func (c *ReportingClient) GetPackageName() string
- func (c *ReportingClient) Vitals() *playdeveloperreporting.VitalsService
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 (*Client) AppRecovery ¶ added in v0.4.0
func (c *Client) AppRecovery() *androidpublisher.ApprecoveryService
AppRecovery returns the app recovery service
func (*Client) Apps ¶
func (c *Client) Apps() *androidpublisher.ApplicationsService
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 ¶
CreateEdit creates a new edit session
func (*Client) Edits ¶
func (c *Client) Edits() *androidpublisher.EditsService
Edits returns the edits service
func (*Client) ExternalTransactions ¶ added in v0.4.0
func (c *Client) ExternalTransactions() *androidpublisher.ExternaltransactionsService
ExternalTransactions returns the external transactions service
func (*Client) GeneratedAPKs ¶ added in v0.4.0
func (c *Client) GeneratedAPKs() *androidpublisher.GeneratedapksService
GeneratedAPKs returns the generated APKs service
func (*Client) GetPackageName ¶
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) Orders ¶ added in v0.4.0
func (c *Client) Orders() *androidpublisher.OrdersService
Orders returns the orders 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) SystemAPKs ¶ added in v0.4.0
func (c *Client) SystemAPKs() *androidpublisher.SystemapksService
SystemAPKs returns the system APKs 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.
Lifecycle: an edit created with CreateEdit is discarded on Close unless it was committed or Keep was called. An edit obtained with GetEdit belongs to the caller and is never discarded implicitly.
func (*Edit) APKs ¶
func (e *Edit) APKs() *androidpublisher.EditsApksService
APKs returns the APKs service for this edit
func (*Edit) Bundles ¶
func (e *Edit) Bundles() *androidpublisher.EditsBundlesService
Bundles returns the bundles service for this edit
func (*Edit) Close ¶
func (e *Edit) Close()
Close releases resources. An uncommitted edit that was not explicitly kept is deleted so that failed or read-only commands do not leave stale edits behind. Deletion uses a fresh short context because the edit context may already be expired or cancelled.
func (*Edit) DeobfuscationFiles ¶
func (e *Edit) DeobfuscationFiles() *androidpublisher.EditsDeobfuscationfilesService
DeobfuscationFiles returns the deobfuscation files service for this edit
func (*Edit) Details ¶
func (e *Edit) Details() *androidpublisher.EditsDetailsService
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) Images ¶
func (e *Edit) Images() *androidpublisher.EditsImagesService
Images returns the images service for this edit
func (*Edit) Keep ¶ added in v0.5.16
func (e *Edit) Keep()
Keep marks the edit as intentionally left open on the server, so Close will not discard it (used by --commit=false flows).
func (*Edit) Listings ¶
func (e *Edit) Listings() *androidpublisher.EditsListingsService
Listings returns the listings service for this edit
func (*Edit) Testers ¶
func (e *Edit) Testers() *androidpublisher.EditsTestersService
Testers returns the testers service for this edit
func (*Edit) Tracks ¶
func (e *Edit) Tracks() *androidpublisher.EditsTracksService
Tracks returns the tracks service for this edit
type GitHubAsset ¶ added in v0.4.0
type GitHubAsset struct {
Name string `json:"name"`
DownloadCount int64 `json:"download_count"`
DownloadURL string `json:"browser_download_url"`
}
GitHubAsset represents a release asset
type GitHubClient ¶ added in v0.4.0
type GitHubClient struct {
// contains filtered or unexported fields
}
GitHubClient handles GitHub API requests
func NewGitHubClient ¶ added in v0.4.0
func NewGitHubClient() *GitHubClient
NewGitHubClient creates a new GitHub API client
func (*GitHubClient) GetDownloadsByPlatform ¶ added in v0.4.0
func (c *GitHubClient) GetDownloadsByPlatform() ([]PlatformDownloads, int64, error)
GetDownloadsByPlatform returns download counts grouped by platform
func (*GitHubClient) GetDownloadsByRelease ¶ added in v0.4.0
func (c *GitHubClient) GetDownloadsByRelease() ([]ReleaseDownloads, error)
GetDownloadsByRelease returns download counts grouped by release
func (*GitHubClient) GetReleases ¶ added in v0.4.0
func (c *GitHubClient) GetReleases() ([]GitHubRelease, error)
GetReleases fetches all releases from GitHub, following pagination
func (*GitHubClient) GetTotalDownloads ¶ added in v0.4.0
func (c *GitHubClient) GetTotalDownloads() (int64, error)
GetTotalDownloads returns the total download count across all releases
type GitHubRelease ¶ added in v0.4.0
type GitHubRelease struct {
TagName string `json:"tag_name"`
PublishedAt string `json:"published_at"`
Assets []GitHubAsset `json:"assets"`
}
GitHubRelease represents a GitHub release
type PlatformDownloads ¶ added in v0.4.0
type PlatformDownloads struct {
Platform string `json:"platform"`
Downloads int64 `json:"downloads"`
Percent string `json:"percent"`
}
PlatformDownloads represents download stats for a platform
type ReleaseDownloads ¶ added in v0.4.0
type ReleaseDownloads struct {
Tag string `json:"tag"`
Date string `json:"date"`
Downloads int64 `json:"downloads"`
}
ReleaseDownloads represents download stats for a release
type ReportingClient ¶ added in v0.3.0
type ReportingClient struct {
// contains filtered or unexported fields
}
ReportingClient wraps the Play Developer Reporting API client
func NewReportingClient ¶ added in v0.3.0
func NewReportingClient(packageName string, timeout time.Duration) (*ReportingClient, error)
NewReportingClient creates a new Reporting API client
func (*ReportingClient) Anomalies ¶ added in v0.3.0
func (c *ReportingClient) Anomalies() *playdeveloperreporting.AnomaliesService
Anomalies returns the anomalies service
func (*ReportingClient) AppName ¶ added in v0.3.0
func (c *ReportingClient) AppName() string
AppName returns the formatted app name for API calls
func (*ReportingClient) Apps ¶ added in v0.5.16
func (c *ReportingClient) Apps() *playdeveloperreporting.AppsService
Apps returns the apps service (accessible-app search)
func (*ReportingClient) Context ¶ added in v0.3.0
func (c *ReportingClient) Context() (context.Context, context.CancelFunc)
Context returns a context with timeout
func (*ReportingClient) GetPackageName ¶ added in v0.3.0
func (c *ReportingClient) GetPackageName() string
GetPackageName returns the package name
func (*ReportingClient) Vitals ¶ added in v0.3.0
func (c *ReportingClient) Vitals() *playdeveloperreporting.VitalsService
Vitals returns the vitals service