Documentation ¶
Index ¶
- Constants
- Variables
- type Account
- type AccountInfoOutput
- type App
- type AppStore
- type Apps
- type Args
- type DownloadInput
- type DownloadOutput
- type Error
- type LoginInput
- type LoginOutput
- type LookupInput
- type LookupOutput
- type PurchaseInput
- type ReplicateSinfInput
- type SearchInput
- type SearchOutput
- type Sinf
Constants ¶
View Source
const ( FailureTypeInvalidCredentials = "-5000" FailureTypePasswordTokenExpired = "2034" FailureTypeLicenseNotFound = "9610" CustomerMessageBadLogin = "MZFinance.BadLogin.Configurator_message" CustomerMessageSubscriptionRequired = "Subscription Required" PrivateAppStoreAPIDomainPrefixWithoutAuthCode = "p25" PrivateAppStoreAPIDomainPrefixWithAuthCode = "p71" PrivateAppStoreAPIDomain = "buy." + iTunesAPIDomain PrivateAppStoreAPIPathAuthenticate = "/WebObjects/MZFinance.woa/wa/authenticate" PrivateAppStoreAPIPathPurchase = "/WebObjects/MZBuy.woa/wa/buyProduct" PrivateAppStoreAPIPathDownload = "/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct" HTTPHeaderStoreFront = "X-Set-Apple-Store-Front" 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"` }
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 }
func NewAppStore ¶
type Args ¶
type Args struct { Keychain keychain.Keychain CookieJar http.CookieJar OperatingSystem operatingsystem.OperatingSystem Machine machine.Machine }
type DownloadInput ¶
type DownloadOutput ¶
type Error ¶
type Error struct { Metadata interface{} // contains filtered or unexported fields }
func NewErrorWithMetadata ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.