appstore

package
v0.0.0-...-aac51ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRateLimited = errors.New("Rate-limited")

Functions

func ScrapeDetails

func ScrapeDetails(ctx context.Context, client *http.Client, appIds []AppId) (map[AppId]Details, error)

func ScrapePrivacy

func ScrapePrivacy(ctx context.Context, client *http.Client, token Token, appIds []AppId) (map[AppId]PrivacyNutritionLabels, error)

If the app ID is not found, then it is not returned in the map.

func Spider

func Spider(ctx context.Context, client *http.Client, progressChan chan<- SpiderProgress, start []GenreLetter) error

Types

type AppId

type AppId int64

type Details

type Details struct {
	AppId                 AppId      `json:"app_id"`
	BundleId              string     `json:"bundle_id"`
	Title                 string     `json:"title"`
	Url                   string     `json:"url"`
	Description           string     `json:"description"`
	Icon                  string     `json:"icon"`
	Genres                []string   `json:"genres"`
	GenreIds              []int64    `json:"genre_ids"`
	PrimaryGenre          string     `json:"primary_genre"`
	PrimaryGenreId        int64      `json:"primary_genre_id"`
	ContentRating         string     `json:"content_rating"`
	ContentAdvisories     []string   `json:"content_advisories"`
	Languages             []string   `json:"languages"`
	Size                  int64      `json:"size"`
	RequiredOsVersion     string     `json:"required_os_version"`
	Released              null.Time  `json:"released"`
	Updated               null.Time  `json:"updated"`
	ReleaseNotes          string     `json:"release_notes"`
	Version               string     `json:"version"`
	Price                 float64    `json:"price"`
	Currency              string     `json:"currency"`
	DeveloperId           int64      `json:"developer_id"`
	Developer             string     `json:"developer"`
	DeveloperUrl          string     `json:"developer_url"`
	DeveloperWebsite      string     `json:"developer_website"`
	Score                 float64    `json:"score"`
	Reviews               int64      `json:"reviews"`
	CurrentVersionScore   null.Float `json:"current_version_score"`
	CurrentVersionReviews int64      `json:"current_version_reviews"`
	Screenshots           []string   `json:"screenshots"`
	IpadScreenshots       []string   `json:"ipad_screenshots"`
	AppletvScreenshots    []string   `json:"appletv_screenshots"`
	SupportedDevices      []string   `json:"supported_devices"`
}

type GenreLetter

type GenreLetter struct {
	Genre    int
	Letter   string
	NextPage int
}

type PrivacyDataCategories

type PrivacyDataCategories struct {
	Identifier string   `json:"identifier"`
	DataTypes  []string `json:"data_types"`
}

type PrivacyNutritionLabels

type PrivacyNutritionLabels []PrivacyType

type PrivacyPurpose

type PrivacyPurpose struct {
	Identifier     string                  `json:"identifier"`
	DataCategories []PrivacyDataCategories `json:"data_categories"`
}

type PrivacyType

type PrivacyType struct {
	// DATA_LINKED_TO_YOU or DATA_USED_TO_TRACK_YOU or DATA_NOT_COLLECTED
	Identifier string `json:"identifier"`

	// Used by DATA_USED_TO_TRACK_YOU
	DataCategories []PrivacyDataCategories `json:"data_categories"`

	// Used by DATA_LINKED_TO_YOU
	Purposes []PrivacyPurpose `json:"purposes"`
}

type SpiderProgress

type SpiderProgress struct {
	Genre          int
	Letter         string
	NextPage       null.Int
	DiscoveredApps []AppId
}

type Token

type Token string

func GetToken

func GetToken(ctx context.Context, client *http.Client) (Token, error)

/ Get the JWT that is used to access Apple's amp-api.apps.apple.com API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL