Documentation
¶
Overview ¶
Package api provides the unified API client for Google Play APIs.
Index ¶
- Constants
- Variables
- func IsValidReleaseStatus(status string) bool
- func IsValidTrack(track string) bool
- func IsVerbose(ctx context.Context) bool
- func WithVerbose(ctx context.Context, verbose bool) context.Context
- type Client
- func (c *Client) Acquire(ctx context.Context) error
- func (c *Client) AcquireForUpload(ctx context.Context) error
- func (c *Client) AndroidPublisher() (*androidpublisher.Service, error)
- func (c *Client) DoWithRetry(ctx context.Context, fn func() error) error
- func (c *Client) Games() (*games.Service, error)
- func (c *Client) GamesManagement() (*gamesmanagement.Service, error)
- func (c *Client) PlayCustomApp() (*playcustomapp.Service, error)
- func (c *Client) PlayIntegrity() (*playintegrity.Service, error)
- func (c *Client) PlayReporting() (*playdeveloperreporting.Service, error)
- func (c *Client) Release()
- func (c *Client) ReleaseForUpload()
- func (c *Client) RetryConfig() RetryConfig
- type Option
- type ReleaseConfig
- type ReleaseStatus
- type RetryConfig
- type UploadOptions
Constants ¶
const DefaultConcurrentCalls = 3
DefaultConcurrentCalls is the default number of concurrent API calls.
Variables ¶
var ValidTracks = []string{"internal", "alpha", "beta", "production"}
Functions ¶
func IsValidReleaseStatus ¶
IsValidReleaseStatus checks if a release status is valid.
func IsValidTrack ¶
IsValidTrack checks if a track name is valid.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AcquireForUpload ¶
AcquireForUpload acquires exclusive access for upload operations. Uploads are single-threaded for reliability.
func (*Client) AndroidPublisher ¶
func (c *Client) AndroidPublisher() (*androidpublisher.Service, error)
AndroidPublisher returns the Android Publisher API service.
func (*Client) DoWithRetry ¶
func (*Client) GamesManagement ¶
func (c *Client) GamesManagement() (*gamesmanagement.Service, error)
GamesManagement returns the Games Management API service.
func (*Client) PlayCustomApp ¶
func (c *Client) PlayCustomApp() (*playcustomapp.Service, error)
PlayCustomApp returns the Play Custom App Publishing API service.
func (*Client) PlayIntegrity ¶
func (c *Client) PlayIntegrity() (*playintegrity.Service, error)
PlayIntegrity returns the Play Integrity API service.
func (*Client) PlayReporting ¶
func (c *Client) PlayReporting() (*playdeveloperreporting.Service, error)
PlayReporting returns the Play Developer Reporting API service.
func (*Client) ReleaseForUpload ¶
func (c *Client) ReleaseForUpload()
func (*Client) RetryConfig ¶
func (c *Client) RetryConfig() RetryConfig
type Option ¶
type Option func(*Client)
Option configures the API client.
func WithConcurrentCalls ¶
func WithMaxRetryAttempts ¶
func WithRetryConfig ¶
func WithRetryConfig(cfg RetryConfig) Option
func WithTimeout ¶
WithTimeout sets the HTTP client timeout.
func WithVerboseLogging ¶
WithVerboseLogging enables verbose logging for API requests.
type ReleaseConfig ¶
type ReleaseConfig struct {
Track string
Name string
Status ReleaseStatus
VersionCodes []int64
UserFraction float64
ReleaseNotes map[string]string // locale -> text
}
ReleaseConfig holds configuration for creating a release.
type ReleaseStatus ¶
type ReleaseStatus string
ReleaseStatus represents the status of a release.
const ( StatusDraft ReleaseStatus = "draft" StatusCompleted ReleaseStatus = "completed" StatusHalted ReleaseStatus = "halted" StatusInProgress ReleaseStatus = "inProgress" )
type RetryConfig ¶
RetryConfig holds configuration for request retries.
func DefaultRetryConfig ¶
func DefaultRetryConfig() RetryConfig
type UploadOptions ¶
type UploadOptions struct {
ChunkSize int64 // Chunk size for resumable uploads
ProgressFunc func(current, total int64) // Progress callback
}
UploadOptions holds options for artifact uploads.
func DefaultUploadOptions ¶
func DefaultUploadOptions() *UploadOptions
DefaultUploadOptions returns the default upload options.