Documentation
¶
Index ¶
- type App
- type AppAttributes
- type AppInfo
- type AppInfoAttributes
- type AppPrice
- type AppPriceAttributes
- type AppPricePoint
- type AppPricePointAttributes
- type AppStoreVersion
- type AppStoreVersionAttributes
- type AuthResponse
- type BetaGroup
- type BetaGroupAttributes
- type Build
- type BuildAttributes
- type Client
- func (c *Client) GetApp(appID string) (*App, error)
- func (c *Client) GetAppAvailability(appID string) ([]Territory, error)
- func (c *Client) GetAppInfos(appID string) ([]AppInfo, error)
- func (c *Client) GetAppPriceSchedule(appID string) ([]AppPrice, error)
- func (c *Client) GetAppStoreVersions(appID string) ([]AppStoreVersion, error)
- func (c *Client) GetBetaGroups(appID string) ([]BetaGroup, error)
- func (c *Client) GetBuilds(appID string) ([]Build, error)
- func (c *Client) GetScreenshotSets(localizationID string) ([]ScreenshotSet, error)
- func (c *Client) GetScreenshots(screenshotSetID string) ([]Screenshot, error)
- func (c *Client) GetVersionLocalizations(versionID string) ([]VersionLocalization, error)
- type DataResponse
- type ImageAsset
- type ListResponse
- type Screenshot
- type ScreenshotAttributes
- type ScreenshotSet
- type ScreenshotSetAttributes
- type SerializedCookie
- type Session
- type SessionInfo
- type SignInRequest
- type Territory
- type TerritoryAttributes
- type TwoFactorInfo
- type TwoFactorRequired
- type VersionLocalization
- type VersionLocalizationAttributes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
ID string `json:"id"`
Attributes AppAttributes `json:"attributes"`
}
App represents an App Store Connect app.
type AppAttributes ¶
type AppInfo ¶
type AppInfo struct {
ID string `json:"id"`
Attributes AppInfoAttributes `json:"attributes"`
}
AppInfo contains app information details.
type AppInfoAttributes ¶
type AppPrice ¶
type AppPrice struct {
ID string `json:"id"`
Attributes AppPriceAttributes `json:"attributes"`
}
AppPrice represents an app's price schedule.
type AppPriceAttributes ¶
type AppPricePoint ¶
type AppPricePoint struct {
ID string `json:"id"`
Attributes AppPricePointAttributes `json:"attributes"`
}
AppPricePoint represents a price tier.
type AppPricePointAttributes ¶
type AppStoreVersion ¶
type AppStoreVersion struct {
ID string `json:"id"`
Attributes AppStoreVersionAttributes `json:"attributes"`
}
AppStoreVersion represents a version of an app.
type AuthResponse ¶
type AuthResponse struct {
AuthType string `json:"authType"` // "hsa2" for 2FA
}
AuthResponse from Apple's sign-in endpoint.
type BetaGroup ¶
type BetaGroup struct {
ID string `json:"id"`
Attributes BetaGroupAttributes `json:"attributes"`
}
BetaGroup represents a TestFlight group.
type BetaGroupAttributes ¶
type Build ¶
type Build struct {
ID string `json:"id"`
Attributes BuildAttributes `json:"attributes"`
}
Build represents a build uploaded to App Store Connect.
type BuildAttributes ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetAppAvailability ¶
GetAppAvailability checks territory availability for an app.
func (*Client) GetAppInfos ¶
GetAppInfos fetches app info (age rating, state, etc).
func (*Client) GetAppPriceSchedule ¶
GetAppPriceSchedule fetches the app's price schedule.
func (*Client) GetAppStoreVersions ¶
func (c *Client) GetAppStoreVersions(appID string) ([]AppStoreVersion, error)
GetAppStoreVersions fetches all versions for an app.
func (*Client) GetBetaGroups ¶
GetBetaGroups fetches TestFlight beta groups for an app.
func (*Client) GetScreenshotSets ¶
func (c *Client) GetScreenshotSets(localizationID string) ([]ScreenshotSet, error)
GetScreenshotSets fetches screenshot sets for a version localization.
func (*Client) GetScreenshots ¶
func (c *Client) GetScreenshots(screenshotSetID string) ([]Screenshot, error)
GetScreenshots fetches individual screenshots for a screenshot set.
func (*Client) GetVersionLocalizations ¶
func (c *Client) GetVersionLocalizations(versionID string) ([]VersionLocalization, error)
GetVersionLocalizations fetches localized metadata for a version.
type DataResponse ¶
type DataResponse[T any] struct { Data T `json:"data"` }
Generic API response wrappers.
type ImageAsset ¶
type ListResponse ¶
type ListResponse[T any] struct { Data []T `json:"data"` }
type Screenshot ¶
type Screenshot struct {
ID string `json:"id"`
Attributes ScreenshotAttributes `json:"attributes"`
}
Screenshot represents an individual screenshot file.
type ScreenshotAttributes ¶
type ScreenshotAttributes struct {
FileSize int `json:"fileSize"`
FileName string `json:"fileName"`
ImageAsset *ImageAsset `json:"imageAsset"`
AssetToken string `json:"assetToken"`
UploadOperations interface{} `json:"uploadOperations"`
}
type ScreenshotSet ¶
type ScreenshotSet struct {
ID string `json:"id"`
Attributes ScreenshotSetAttributes `json:"attributes"`
}
ScreenshotSet represents a set of screenshots for a device type.
type ScreenshotSetAttributes ¶
type ScreenshotSetAttributes struct {
ScreenshotDisplayType string `json:"screenshotDisplayType"`
}
type SerializedCookie ¶
type SerializedCookie struct {
Name string `json:"name"`
Value string `json:"value"`
Domain string `json:"domain"`
Path string `json:"path"`
}
SerializedCookie is a JSON-safe cookie representation.
type Session ¶
type Session struct {
AppleID string `json:"apple_id"`
SessionID string `json:"session_id"`
Scnt string `json:"scnt"`
Cookies []*SerializedCookie `json:"cookies"`
TeamID string `json:"team_id,omitempty"`
ProviderID string `json:"provider_id,omitempty"`
ExpiresAt time.Time `json:"expires_at"`
// contains filtered or unexported fields
}
Session holds Apple ID session state for authenticated requests.
func SignIn ¶
SignIn authenticates with Apple ID and password. Returns a session if successful, or an error indicating 2FA is needed.
func (*Session) GetSessionInfo ¶
func (s *Session) GetSessionInfo() (*SessionInfo, error)
GetSessionInfo fetches the authenticated user's App Store Connect session.
func (*Session) SerializeCookies ¶
func (s *Session) SerializeCookies() []*SerializedCookie
SerializeCookies extracts cookies for persistent storage.
func (*Session) SubmitTwoFactorCode ¶
SubmitTwoFactorCode sends the 6-digit 2FA code to Apple.
type SessionInfo ¶
type SessionInfo struct {
User struct {
FullName string `json:"fullName"`
Email string `json:"emailAddress"`
} `json:"user"`
Provider struct {
ProviderID int `json:"providerId"`
Name string `json:"name"`
PublicKeyID string `json:"publicKeyId"`
} `json:"provider"`
AvailableProviders []struct {
ProviderID int `json:"providerId"`
Name string `json:"name"`
} `json:"availableProviders"`
}
SessionInfo from the App Store Connect session endpoint.
type SignInRequest ¶
type SignInRequest struct {
AccountName string `json:"accountName"`
Password string `json:"password"`
RememberMe bool `json:"rememberMe"`
}
SignInRequest is the Apple ID login payload.
type Territory ¶
type Territory struct {
ID string `json:"id"`
Attributes TerritoryAttributes `json:"attributes"`
}
Territory represents an App Store territory.
type TerritoryAttributes ¶
type TerritoryAttributes struct {
Currency string `json:"currency"`
}
type TwoFactorInfo ¶
type TwoFactorInfo struct {
TrustedDevices []struct {
ID int `json:"id"`
PhoneNumber string `json:"phoneNumber"`
} `json:"trustedDevices"`
}
TwoFactorInfo returned when 2FA is required.
type TwoFactorRequired ¶
type TwoFactorRequired struct {
Session *Session
}
TwoFactorRequired is returned when 2FA is needed.
func (*TwoFactorRequired) Error ¶
func (e *TwoFactorRequired) Error() string
type VersionLocalization ¶
type VersionLocalization struct {
ID string `json:"id"`
Attributes VersionLocalizationAttributes `json:"attributes"`
}
VersionLocalization contains localized version info.
type VersionLocalizationAttributes ¶
type VersionLocalizationAttributes struct {
Locale string `json:"locale"`
Description string `json:"description"`
Keywords string `json:"keywords"`
WhatsNew string `json:"whatsNew"`
SupportURL string `json:"supportUrl"`
MarketingURL string `json:"marketingUrl"`
PromotionalText string `json:"promotionalText"`
}