Documentation
¶
Index ¶
- Constants
- Variables
- type Account
- type AccountInfoOutput
- type App
- type AppStore
- type Apps
- type Args
- type BagInput
- type BagOutput
- type DownloadInput
- type DownloadOutput
- type Error
- type GetVersionMetadataInput
- type GetVersionMetadataOutput
- type ListVersionsInput
- type ListVersionsOutput
- type LoginInput
- type LoginOutput
- type LookupInput
- type LookupOutput
- type PurchaseInput
- type ReplicateSinfInput
- type SearchInput
- type SearchOutput
- type Sinf
- type VersionDetails
- type VersionHistoryInfo
Constants ¶
View Source
const ( FailureTypeInvalidCredentials = "-5000" FailureTypePasswordTokenExpired = "2034" FailureTypeLicenseNotFound = "9610" CustomerMessageBadLogin = "MZFinance.BadLogin.Configurator_message" CustomerMessageAccountDisabled = "Your account is disabled." CustomerMessageSubscriptionRequired = "Subscription Required" PrivateInitDomain = "init." + iTunesAPIDomain PrivateInitPath = "/bag.xml" PrivateAppStoreAPIDomain = "buy." + iTunesAPIDomain PrivateAppStoreAPIPathPurchase = "/WebObjects/MZFinance.woa/wa/buyProduct" PrivateAppStoreAPIPathDownload = "/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct" HTTPHeaderStoreFront = "X-Set-Apple-Store-Front" HTTPHeaderPod = "pod" PricingParameterAppStore = "STDQ" PricingParameterAppleArcade = "GAME" )
Variables ¶
View Source
var ( ErrPasswordTokenExpired = errors.New("password token is expired") ErrSubscriptionRequired = errors.New("subscription required") )
View Source
var (
ErrAuthCodeRequired = errors.New("auth code is required")
)
View Source
var (
ErrLicenseRequired = errors.New("license is required")
)
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Email string `json:"email,omitempty"`
PasswordToken string `json:"passwordToken,omitempty"`
DirectoryServicesID string `json:"directoryServicesIdentifier,omitempty"`
Name string `json:"name,omitempty"`
StoreFront string `json:"storeFront,omitempty"`
Password string `json:"password,omitempty"`
Pod string `json:"pod,omitempty"`
}
type AccountInfoOutput ¶
type AccountInfoOutput struct {
Account Account
}
type App ¶
type App struct {
ID int64 `json:"trackId,omitempty"`
BundleID string `json:"bundleId,omitempty"`
Name string `json:"trackName,omitempty"`
Version string `json:"version,omitempty"`
Price float64 `json:"price,omitempty"`
}
func (App) MarshalZerologObject ¶
type AppStore ¶
type AppStore interface {
// Login authenticates with the App Store.
Login(input LoginInput) (LoginOutput, error)
// AccountInfo returns the information of the authenticated account.
AccountInfo() (AccountInfoOutput, error)
// Revoke revokes the active credentials.
Revoke() error
// Lookup looks apps up based on the specified bundle identifier.
Lookup(input LookupInput) (LookupOutput, error)
// Search searches the App Store for apps matching the specified term.
Search(input SearchInput) (SearchOutput, error)
// Purchase acquires a license for the desired app.
// Note: only free apps are supported.
Purchase(input PurchaseInput) error
// Download downloads the IPA package from the App Store to the desired location.
Download(input DownloadInput) (DownloadOutput, error)
// ReplicateSinf replicates the sinf for the IPA package.
ReplicateSinf(input ReplicateSinfInput) error
// VersionHistory lists the available versions of the specified app.
ListVersions(input ListVersionsInput) (ListVersionsOutput, error)
// GetVersionMetadata returns the metadata for the specified version.
GetVersionMetadata(input GetVersionMetadataInput) (GetVersionMetadataOutput, error)
// Bag fetches the bag which contains endpoint definitions.
Bag(input BagInput) (BagOutput, error)
}
func NewAppStore ¶
type Args ¶
type Args struct {
Keychain keychain.Keychain
CookieJar http.CookieJar
OperatingSystem operatingsystem.OperatingSystem
Machine machine.Machine
}
type DownloadInput ¶
type DownloadInput struct {
Account Account
App App
OutputPath string
Progress *progressbar.ProgressBar
ExternalVersionID string
}
type DownloadOutput ¶
type Error ¶
type Error struct {
Metadata interface{}
// contains filtered or unexported fields
}
func NewErrorWithMetadata ¶
type GetVersionMetadataInput ¶ added in v2.2.0
type GetVersionMetadataOutput ¶ added in v2.2.0
type ListVersionsInput ¶ added in v2.2.0
type ListVersionsOutput ¶ added in v2.2.0
type LoginInput ¶
type LoginOutput ¶
type LoginOutput struct {
Account Account
}
type LookupInput ¶
type LookupOutput ¶
type LookupOutput struct {
App App
}
type PurchaseInput ¶
type ReplicateSinfInput ¶
type SearchInput ¶
type SearchOutput ¶
type VersionDetails ¶ added in v2.2.0
type VersionHistoryInfo ¶ added in v2.2.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.