playstore

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAppNotFound error = errors.New("app not found")
View Source
var ErrRateLimited error = errors.New("google detected unusual traffic")

Functions

func NewDataSafetyRequester

func NewDataSafetyRequester(appId string) *dataSafetyRequester

func NewDetailsBatchRequester

func NewDetailsBatchRequester(appId string) *detailsBatchRequester

func NewExtractor

func NewExtractor(payload string) *extractor

func NewSimilarBatchRequester

func NewSimilarBatchRequester(appId string) *similarBatchRequester

func SendBatchedRequests

func SendBatchedRequests(ctx context.Context, client *http.Client, country string, language string, requesters []BatchRequester) ([]interface{}, error)

Types

type BatchRequester

type BatchRequester interface {
	BatchRequest() batchRequest
	ParseEnvelope(string) (interface{}, error)
}

type DataCategory

type DataCategory struct {
	Name      string     `json:"category"`
	DataTypes []DataType `json:"data_types"`
}

func (*DataCategory) UnmarshalJSON

func (dc *DataCategory) UnmarshalJSON(p []byte) error

type DataSafety

type DataSafety struct {
	// "Collect" means transmitting data from apps off a user’s device.
	Collection []DataCategory `json:"collection"`

	// "Sharing" refers to transferring user data collected from apps to a third party.
	Sharing []DataCategory `json:"sharing"`

	// Security practices
	SecurityPractices []string `json:"security_practices"`
}

Based on documentation from https://support.google.com/googleplay/android-developer/answer/10787469

func ScrapeDataSafety

func ScrapeDataSafety(ctx context.Context, client *http.Client, appId string) (*DataSafety, error)

type DataType

type DataType struct {
	Name     string `json:"data_type"`
	Optional bool   `json:"optional"`
	Purposes string `json:"purposes"`
}

func (*DataType) UnmarshalJSON

func (dt *DataType) UnmarshalJSON(p []byte) error

type Details

type Details struct {
	Title                    string       `json:"title"`
	Description              string       `json:"description"`
	DescriptionHTML          string       `json:"description_html"`
	Summary                  null.String  `json:"summary"`
	Installs                 null.String  `json:"installs"`
	MinInstalls              null.Int     `json:"min_installs"`
	MaxInstalls              null.Int     `json:"max_installs"`
	Score                    null.Float   `json:"score"`
	ScoreText                null.String  `json:"score_text"`
	Ratings                  int64        `json:"ratings"`
	Reviews                  int64        `json:"reviews"`
	Histogram                Histogram    `json:"histogram"`
	Price                    float64      `json:"price"`
	Currency                 null.String  `json:"currency"`
	PriceText                string       `json:"price_text"`
	SaleEndTime              null.Time    `json:"sale_end_time"`
	OriginalPrice            null.Float   `json:"original_price"`
	OriginalPriceText        null.String  `json:"original_price_text"`
	SaleText                 null.String  `json:"sale_text"`
	Available                bool         `json:"available"`
	OffersIAP                bool         `json:"in_app_purchases"`
	IAPRange                 null.String  `json:"in_app_purchases_range"`
	Size                     string       `json:"size"`
	MinAPILevel              null.Int     `json:"min_api"`
	TargetAPILevel           null.Int     `json:"target_api"`
	MinAndroidVersion        null.String  `json:"min_android_version"`
	Developer                string       `json:"developer"`
	DeveloperId              string       `json:"developer_id"`
	DeveloperEmail           null.String  `json:"developer_email"`
	DeveloperWebsite         null.String  `json:"developer_website"`
	DeveloperAddress         null.String  `json:"developer_address"`
	PrivacyPolicy            null.String  `json:"privacy_policy"`
	Genre                    string       `json:"genre_id"`
	AdditionalGenres         []string     `json:"additional_genre_ids"`
	TeacherApprovedAge       null.String  `json:"teacher_approved_age"`
	Icon                     null.String  `json:"icon"`
	HeaderImage              null.String  `json:"header_image"`
	Screenshots              []string     `json:"screenshots"`
	Video                    null.String  `json:"video"`
	VideoImage               null.String  `json:"video_image"`
	ContentRating            null.String  `json:"content_rating"`
	ContentRatingDescription null.String  `json:"content_rating_description"`
	AdSupported              bool         `json:"ad_supported"`
	Released                 null.Time    `json:"released"`
	Updated                  time.Time    `json:"updated"`
	Version                  null.String  `json:"version"`
	RecentChanges            null.String  `json:"recent_changes"`
	RecentChangesTime        null.Time    `json:"recent_changes_time"`
	Permissions              []Permission `json:"permissions"`
}

func ScrapeDetails

func ScrapeDetails(ctx context.Context, client *http.Client, appId string, country string, language string) (*Details, error)

type DetailsBatchRequester

type DetailsBatchRequester string

type DetailsExtractError

type DetailsExtractError struct {
	Errors  []error
	Payload string
}

func (*DetailsExtractError) Error

func (e *DetailsExtractError) Error() string

type Histogram

type Histogram struct {
	Stars1 int64 `json:"1"`
	Stars2 int64 `json:"2"`
	Stars3 int64 `json:"3"`
	Stars4 int64 `json:"4"`
	Stars5 int64 `json:"5"`
}

type Permission

type Permission struct {
	Group      string `json:"group"`
	Permission string `json:"permission"`
}

type SimilarApp

type SimilarApp struct {
	AppId     string      `json:"app_id"`
	Title     string      `json:"title"`
	Developer string      `json:"developer"`
	Score     null.Float  `json:"score"`
	ScoreText null.String `json:"score_text"`
	Price     null.Float  `json:"price"`
	Currency  null.String `json:"currency"`
}

func ScrapeSimilar

func ScrapeSimilar(ctx context.Context, client *http.Client, appId string, country string, language string) ([]SimilarApp, error)

type SimilarAppsExtractError

type SimilarAppsExtractError struct {
	Errors  []error
	Payload string
}

func (*SimilarAppsExtractError) Error

func (e *SimilarAppsExtractError) Error() string

Jump to

Keyboard shortcuts

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