Documentation
¶
Index ¶
- Variables
- type AppItem
- type AppleClient
- func (c *AppleClient) Download(trackId, dest string) error
- func (c *AppleClient) LoadCredentials(credentialPath string) error
- func (c *AppleClient) Login(opt LoginOptions) error
- func (c *AppleClient) SaveCredentials(credentialPath string) error
- func (c *AppleClient) Search(opt SearchOptions) ([]AppItem, error)
- type AppleCredentials
- type LoginOptions
- type SearchOptions
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AppItem ¶
type AppItem struct {
TrackID int `json:"trackId"`
TrackName string `json:"trackName"`
BundleID string `json:"bundleId"`
MinOS string `json:"minimumOsVersion"`
ArtistID int `json:"artistId"`
ArtistName string `json:"artistName"`
Price float64 `json:"price"`
Genres []string `json:"genres"`
PrimaryGenreID int `json:"primaryGenreId"`
PrimaryGenre string `json:"primaryGenreName"`
SellerName string `json:"sellerName"`
Version string `json:"version"`
ReleaseNote string `json:"releaseNotes"`
FileSizeBytes string `json:"fileSizeBytes"`
ReleaseDate *time.Time `json:"releaseDate"`
CurrentVersionReleaseDate *time.Time `json:"currentVersionReleaseDate"`
}
AppItem represents an app in the Apple App Store
type AppleClient ¶
type AppleClient struct {
Cred *AppleCredentials
}
func NewAppleClient ¶
func NewAppleClient() *AppleClient
func NewAppleClientWithCred ¶
func NewAppleClientWithCred(cred *AppleCredentials) *AppleClient
func (*AppleClient) Download ¶
func (c *AppleClient) Download(trackId, dest string) error
func (*AppleClient) LoadCredentials ¶
func (c *AppleClient) LoadCredentials(credentialPath string) error
LoadCredentials loads the Apple credentials from a file
func (*AppleClient) Login ¶
func (c *AppleClient) Login(opt LoginOptions) error
Login logs in to Apple services with the Apple ID and password
func (*AppleClient) SaveCredentials ¶
func (c *AppleClient) SaveCredentials(credentialPath string) error
SaveCredentials saves the Apple credentials to a file
func (*AppleClient) Search ¶
func (c *AppleClient) Search(opt SearchOptions) ([]AppItem, error)
Search searches for an app in the Apple App Store (login not required)
type AppleCredentials ¶
type AppleCredentials struct {
// AppleID is the Apple ID to login, usually an email address
AppleID string `json:"apple_id"`
// Password is the password for the Apple ID
Password string `json:"password"`
// PasswordToken is the access token for Apple services, this is returned after a successful login
PasswordToken string `json:"password_token"`
// DSID represents the user's Apple ID, this is returned after a successful login
DSID string `json:"dsid"`
// Region is the region of the Apple ID, ISO 3166-1 alpha-2 country code
Region string `json:"region"`
// GUID is the MAC address of the device, without colons
GUID string `json:"guid"`
// Cookies is the cookies for the Apple services
Cookies []*http.Cookie `json:"cookies"`
}
func (*AppleCredentials) StoreFront ¶
func (c *AppleCredentials) StoreFront() string
StoreFront returns the Apple StoreFront code for the region
type LoginOptions ¶
type SearchOptions ¶
Click to show internal directories.
Click to hide internal directories.