Skip to content

Latest commit

 

History

History
882 lines (533 loc) · 33.4 KB

README.md

File metadata and controls

882 lines (533 loc) · 33.4 KB

parse-play - v3.1.0

parse-play - v3.1.0

Table of contents

Enumerations

Type Aliases

Variables

Functions

Type Aliases

AppDetailsOptions

Ƭ AppDetailsOptions: Object

Parameters for all fetch app details requests in a fetchAppDetails call.

Type declaration

Name Type Description
country CountryCode The country version of the Play Store to fetch from.
language LanguageCode The language for descriptions, etc.

Defined in

endpoints/app-details.ts:13


AppDetailsRequest

Ƭ AppDetailsRequest: Object

Parameters for a fetch app details request.

Type declaration

Name Type Description
appId string The app ID.

Defined in

endpoints/app-details.ts:8


AppDetailsResult

Ƭ AppDetailsResult: AppMetadata<AppMetadataPropertyFetchAppDetails>

The result of a fetch app details request.

Defined in

endpoints/app-details.ts:59


AppMetadata

Ƭ AppMetadata<P>: Pick<AppMetadataFull, P>

The metadata for a single app. The available properties depend on which endpoint this was fetched from.

Type parameters

Name Type
P extends AppMetadataProperty

Defined in

common/data-format.ts:127


AppMetadataFull

Ƭ AppMetadataFull: Object

The full metadata that can theoretically be fetched for an app. The individual endpoints will only return a subset of this, see AppMetadata.

Type declaration

Name Type Description
app_id string The app's bundle ID.
buy_url string | undefined A URL to the Play Store website to buy the app.
category string The app's main category.
content_rating? { icon_url: string ; interactive_elements?: string ; label: string } The app's content rating.
content_rating.icon_url string The URL to an icon for the content rating.
content_rating.interactive_elements? string A description of interactive elements in the app.
content_rating.label string The label for the content rating.
cover_image_url string | undefined A URL to the app's cover image.
data_collected DataTypeDeclaration[] | undefined An overview of the data the app may collect.
data_shared DataTypeDeclaration[] | undefined An overview of the data that the app may share with other companies or organizations.
description string The app's description.
developer string The app's developer.
developer_address string | undefined The developer's address.
developer_email string The developer's email address.
developer_path string The relative path of the developer's page on the Play Store website.
developer_website_url string | undefined The URL to the developer's website.
downloads string The approximate download count of the app as a string, as displayed on the Play Store website.
downloads_exact number The exact download count of the app.
icon_url string A URL to the app's icon.
in_app_purchases? string The cost of in-app purchases for the app.
name string The app's name.
offered_by string The company distributing the app on the Play Store.
permissions PermissionGroup[] The app's permissions, grouped by category.
position number The app's position in a list (top chart, search results).
price string | undefined The app's price. Can be undefined for pre-release apps.
privacy_policy_url string | undefined The URL to the app's privacy policy.
rating number | undefined The app's review rating.
rating_counts { 1: number ; 2: number ; 3: number ; 4: number ; 5: number ; total: number } The number of each rating the app has received.
rating_counts.1 number The number of 1-star ratings.
rating_counts.2 number The number of 2-star ratings.
rating_counts.3 number The number of 3-star ratings.
rating_counts.4 number The number of 4-star ratings.
rating_counts.5 number The number of 5-star ratings.
rating_counts.total number The total number of ratings.
released_on? Date The date when the app was first published.
requires_android? {} The app's required version of Android.
screenshot_urls string[] URLs to screenshots of the app.
security_practices DataSafetyLabelSecurityPracticesDeclarations | undefined An overview of the app's security practices.
store_path string The relative path of the app on the Play Store website.
tags? { id?: string ; name: string ; path: string } A list of the app's categories and related search terms.
tags.id? string A machine-readable ID for the tag.
tags.name string The name/label of the tag.
tags.path string The relative path of the category/search page on the Play Store website.
top_chart_placement? { label: string ; placement: string } The app's placement on a top chart.
top_chart_placement.label string The label for the placement.
top_chart_placement.placement string The app's position in the top chart.
trailer_url string | undefined A URL to a video trailer for the app.
updated_on Date The date when the app was last updated.
version? string The app's version.

Defined in

common/data-format.ts:20


AppMetadataProperty

Ƭ AppMetadataProperty: keyof AppMetadataFull

A property that can be present in the metadata of an app.

Defined in

common/data-format.ts:125


AppMetadataPropertyFetchAppDetails

Ƭ AppMetadataPropertyFetchAppDetails: typeof fetchAppDetailsMetadataProperties[number]

A property present when fetching app details.

Defined in

endpoints/app-details.ts:57


AppMetadataPropertySearch

Ƭ AppMetadataPropertySearch: typeof searchAppMetadataProperties[number]

A property present in the metadata of each app in the search results.

Defined in

endpoints/search.ts:42


AppMetadataPropertyTopCharts

Ƭ AppMetadataPropertyTopCharts: typeof topChartsAppMetadataProperties[number]

A property present in the metadata of each app in the top chart.

Defined in

endpoints/top-charts.ts:49


CategoryId

Ƭ CategoryId: keyof typeof categories

The ID of a category on the Play Store.

Defined in

common/consts.ts:74


CountryCode

Ƭ CountryCode: keyof typeof countries

The country code of a country supported on the Play Store.

Defined in

common/consts.ts:140


DataSafetyLabel

Ƭ DataSafetyLabel: Object

An app's data safety label.

deprecated The separate function for fetching data safety labels is deprecated and will be removed in a future release. Instead, you can use the fetchAppDetails function to fetch an app's metadata, which includes the data safety label.

Type declaration

Name Type Description
app_id string The app's bundle ID.
data_collected DataTypeDeclaration[] | undefined An overview of the data the app may collect.
data_shared DataTypeDeclaration[] | undefined An overview of the data that the app may share with other companies or organizations.
developer { address: string | undefined ; email: string ; name: string ; path: string ; website_url: string | undefined } Data about the app's developer.
developer.address string | undefined The developer's address.
developer.email string The developer's email address.
developer.name string The developer's name
developer.path string The relative path of the developer's page on the Play Store website.
developer.website_url string | undefined The URL to the developer's website.
icon_url string The URL to the app's icon.
name string The app's name.
privacy_policy_url string | undefined The URL to the app's privacy policy.
security_practices DataSafetyLabelSecurityPracticesDeclarations | undefined An overview of the app's security practices.

Defined in

endpoints/data-safety.ts:69


DataSafetyLabelDataCategory

Ƭ DataSafetyLabelDataCategory: typeof dataSafetyLabelDataCategories[number]

A category that groups multiple related data types in a data safety label.

Defined in

common/consts.ts:270


DataSafetyLabelDataType

Ƭ DataSafetyLabelDataType: typeof dataSafetyLabelDataTypes[number]

A type of data that can be declared in a data safety label.

Defined in

common/consts.ts:319


DataSafetyLabelPurpose

Ƭ DataSafetyLabelPurpose: typeof dataSafetyLabelPurposes[number]

A purpose for which data collection or sharing can be declared in a data safety label.

Defined in

common/consts.ts:337


DataSafetyLabelRequest

Ƭ DataSafetyLabelRequest: Object

Parameters for a single data safety label request.

deprecated The separate function for fetching data safety labels is deprecated and will be removed in a future release. Instead, you can use the fetchAppDetails function to fetch an app's metadata, which includes the data safety label.

Type declaration

Name Type Description
app_id string The app's bundle ID.

Defined in

endpoints/data-safety.ts:18


DataSafetyLabelSecurityPracticesDeclarations

Ƭ DataSafetyLabelSecurityPracticesDeclarations: Object

An app's declared security practices in a data safety label.

Type declaration

Name Type Description
can_request_data_deletion boolean | undefined Whether the app provides a way for users to request deletion of their data.
committed_to_play_families_policy boolean | undefined Whether the developer has reviewed the app's compliance with Google Play's Families policy requirements (only for applicable apps).
data_encrypted_in_transit boolean | undefined Whether data collected or shared by the app uses encryption in transit.
independent_security_review boolean | undefined Whether the app has been independently validated against a global security standard.

Defined in

endpoints/data-safety.ts:48


DataSafetyLabelsOptions

Ƭ DataSafetyLabelsOptions: Object

Parameters for all data safety label requests in a fetchDataSafetyLabels call.

Type declaration

Name Type Description
language LanguageCode The language for descriptions, etc.

Defined in

endpoints/data-safety.ts:27


DataTypeDeclaration

Ƭ DataTypeDeclaration: Object

An app's declaration for a single data type in a data safety label.

Type declaration

Name Type Description
category DataSafetyLabelDataCategory The category the data type fits into.
optional boolean Whether the data type is marked as optional.
purposes DataSafetyLabelPurpose[] The purposes for which the data type is collected or shared.
type DataSafetyLabelDataType The data type.

Defined in

endpoints/data-safety.ts:35


LanguageCode

Ƭ LanguageCode: keyof typeof languages

The language code of a language supported on the Play Store.

Defined in

common/consts.ts:240


PermissionGroup

Ƭ PermissionGroup: Object

A group of related permissions the app has access to.

Type declaration

Name Type Description
icon_url? string The URL to the group's icon.
id? string A machine-readable ID for the group.
name? string The name/label of the group.
permissions string[] The detailed permissions in this group the app has access to.

Defined in

common/data-format.ts:5


SearchAppsOptions

Ƭ SearchAppsOptions: Object

Parameters for all search apps requests in a searchApps call.

Type declaration

Name Type Description
country CountryCode The country version of the Play Store to search in.
language LanguageCode The language for descriptions, etc.

Defined in

endpoints/search.ts:16


SearchAppsRequest

Ƭ SearchAppsRequest: Object

Parameters for a search apps request.

Type declaration

Name Type Description
searchTerm string The term to search for.

Defined in

endpoints/search.ts:9


SearchAppsResults

Ƭ SearchAppsResults: AppMetadata<AppMetadataPropertySearch>[]

A list of the search results.

Defined in

endpoints/search.ts:46


TopChartsEntry

Ƭ TopChartsEntry: AppMetadata<AppMetadataPropertyTopCharts>

A single app and its associated metadata on a top chart.

Defined in

endpoints/top-charts.ts:54


TopChartsOptions

Ƭ TopChartsOptions: Object

Parameters for all top charts requests in a fetchTopCharts call.

Type declaration

Name Type Description
country CountryCode The country for which to fetch the top chart(s).
language LanguageCode The language for descriptions, etc.

Defined in

endpoints/top-charts.ts:23


TopChartsRequest

Ƭ TopChartsRequest: Object

Parameters for a single top charts request.

Type declaration

Name Type Description
category CategoryId The category to use. Use APPLICATION for all apps, or GAME for all games, or one of the subcategory.
chart "topselling_free" | "topgrossing" | "topselling_paid" The chart to use, where topselling_free: Top free (or Top for €0, Top for $0, depending on the country); topgrossing: Top grossing; topselling_paid: Top selling.
count number The number of apps to include in the top list. This seems to be limited to 660 apps.

Defined in

endpoints/top-charts.ts:9


TopChartsResult

Ƭ TopChartsResult: TopChartsEntry[]

A list of the entries on the respective top chart.

Defined in

endpoints/top-charts.ts:58

Variables

dataSafetyLabelDataCategories

Const dataSafetyLabelDataCategories: readonly ["App activity", "App info and performance", "Audio files", "Calendar", "Contacts", "Device or other IDs", "Files and docs", "Financial info", "Health and fitness", "Location", "Messages", "Personal info", "Photos and videos", "Web browsing"]

The categories that group multiple related data types in a data safety label.

Taken from the official documentation: https://web.archive.org/web/20220701122426/https://support.google.com/googleplay/android-developer/answer/10787469#zippy=%2Cdata-types

Defined in

common/consts.ts:251


dataSafetyLabelDataTypes

Const dataSafetyLabelDataTypes: readonly ["Approximate location", "Precise location", "Name", "Email address", "User IDs", "Address", "Phone number", "Race and ethnicity", "Political or religious beliefs", "Sexual orientation", "Other info", "User payment info", "Purchase history", "Credit score", "Other financial info", "Health info", "Fitness info", "Emails", "SMS or MMS", "Other in-app messages", "Photos", "Videos", "Voice or sound recordings", "Music files", "Other audio files", "Files and docs", "Calendar events", "Contacts", "App interactions", "In-app search history", "Installed apps", "Other user-generated content", "Other actions", "Web browsing history", "Crash logs", "Diagnostics", "Other app performance data", "Device or other IDs"]

The types of data that can be declared in a data safety label.

Taken from the official documentation: https://web.archive.org/web/20220701122426/https://support.google.com/googleplay/android-developer/answer/10787469#zippy=%2Cdata-types

Defined in

common/consts.ts:276


dataSafetyLabelPurposes

Const dataSafetyLabelPurposes: readonly ["App functionality", "Analytics", "Developer communications", "Advertising or marketing", "Fraud prevention, security, and compliance", "Personalization", "Account management"]

The purposes for which data collection or sharing can be declared in a data safety label.

Taken from the official documentation: https://web.archive.org/web/20220701122426/https://support.google.com/googleplay/android-developer/answer/10787469#zippy=%2Cpurposes

Defined in

common/consts.ts:325


fetchAppDetailsMetadataProperties

Const fetchAppDetailsMetadataProperties: readonly ["app_id", "name", "content_rating", "released_on", "downloads", "downloads_exact", "in_app_purchases", "offered_by", "rating", "rating_counts", "price", "buy_url", "top_chart_placement", "developer", "developer_path", "developer_website_url", "developer_email", "developer_address", "description", "permissions", "screenshot_urls", "category", "icon_url", "cover_image_url", "privacy_policy_url", "trailer_url", "tags", "data_shared", "data_collected", "security_practices", "version", "requires_android", "updated_on"]

The properties present when fetching app details.

Defined in

endpoints/app-details.ts:21


searchAppMetadataProperties

Const searchAppMetadataProperties: readonly ["position", "app_id", "icon_url", "screenshot_urls", "name", "rating", "category", "price", "buy_url", "store_path", "trailer_url", "description", "developer", "downloads", "cover_image_url"]

The properties present in the metadata of each app in the search results.

Defined in

endpoints/search.ts:24


topChartsAppMetadataProperties

Const topChartsAppMetadataProperties: readonly ["position", "app_id", "icon_url", "screenshot_urls", "name", "rating", "category", "price", "buy_url", "store_path", "trailer_url", "description", "developer", "downloads", "cover_image_url"]

The properties present in the metadata of each app in the top chart.

Defined in

endpoints/top-charts.ts:31

Functions

fetchAppDetails

fetchAppDetails(request, options): Promise<AppDetailsResult>

Fetch the details/metadata of an app on the Google Play Store.

This uses the Play Store's internal batchexecute endpoint with an RPC ID of Ws7gDc.

Parameters

Name Type Description
request AppDetailsRequest | [AppDetailsRequest] The parameters of which app to fetch the details of.
options AppDetailsOptions Language and country options.

Returns

Promise<AppDetailsResult>

The app details.

Defined in

endpoints/app-details.ts:252

fetchAppDetails(requests, options): Promise<AppDetailsResult[]>

Same as fetchAppDetails but for fetching the details of multiple apps at once. The details are all fetched in a single API request.

see fetchAppDetails

Parameters

Name Type Description
requests AppDetailsRequest[] An array of fetch app details requests.
options AppDetailsOptions The options for all requests.

Returns

Promise<AppDetailsResult[]>

An array of the app details, in the same order as the requests.

Defined in

endpoints/app-details.ts:266


fetchDataSafetyLabels

fetchDataSafetyLabels(request, options): Promise<DataSafetyLabel | undefined>

Fetch and parse the given app's data safety label from the Google Play Store.

This uses the Play Store's internal batchexecute endpoint with an RPC ID of Ws7gDc.

deprecated The separate function for fetching data safety labels is deprecated and will be removed in a future release. Instead, you can use the fetchAppDetails function to fetch an app's metadata, which includes the data safety label.

Parameters

Name Type Description
request DataSafetyLabelRequest | [DataSafetyLabelRequest] The parameters for which app to fetch.
options DataSafetyLabelsOptions Language options.

Returns

Promise<DataSafetyLabel | undefined>

The data safety label.

Defined in

endpoints/data-safety.ts:198

fetchDataSafetyLabels(requests, options): Promise<(DataSafetyLabel | undefined)[]>

Same as fetchDataSafetyLabels but for fetching multiple data safety labels at once. The data safety labels are fetched in a single API request.

deprecated The separate function for fetching data safety labels is deprecated and will be removed in a future release. Instead, you can use the fetchAppDetails function to fetch an app's metadata, which includes the data safety label.

see fetchDataSafetyLabels

Parameters

Name Type Description
requests DataSafetyLabelRequest[] An array of data safety label requests.
options DataSafetyLabelsOptions The options for all requests.

Returns

Promise<(DataSafetyLabel | undefined)[]>

An array of the data safety labels, in the same order as the requests.

Defined in

endpoints/data-safety.ts:216


fetchTopCharts

fetchTopCharts(request, options): Promise<TopChartsResult | undefined>

Fetch and parse the current top chart rankings from the Play Store for the given criteria.

This uses the Play Store's internal batchexecute endpoint with an RPC ID of vyAe2.

Parameters

Name Type Description
request TopChartsRequest | [TopChartsRequest] The parameters for which top chart to fetch.
options TopChartsOptions Language and country options.

Returns

Promise<TopChartsResult | undefined>

The top chart.

Defined in

endpoints/top-charts.ts:117

fetchTopCharts(requests, options): Promise<(TopChartsResult | undefined)[]>

Same as fetchTopCharts but for fetching multiple top charts at once. The top charts are fetched in a single API request.

see fetchTopCharts

Parameters

Name Type Description
requests TopChartsRequest[] An array of top chart requests.
options TopChartsOptions The options for all requests.

Returns

Promise<(TopChartsResult | undefined)[]>

An array of the top charts, in the same order as the requests.

Defined in

endpoints/top-charts.ts:131


parseAppEntry

parseAppEntry<P>(entry, properties, options): AppMetadata<P>

Parse an app entry in a search or top chart response.

Type parameters

Name Type
P extends keyof AppMetadataFull

Parameters

Name Type
entry any
properties P[] | readonly P[]
options Object

Returns

AppMetadata<P>

Defined in

common/data-format.ts:154


searchApps

searchApps(request, options): Promise<SearchAppsResults | undefined>

Search for apps on the Google Play Stroe.

This uses the Play Store's internal batchexecute endpoint with an RPC ID of lGYRle.

Parameters

Name Type Description
request SearchAppsRequest | [SearchAppsRequest] The parameters for what to search for.
options SearchAppsOptions Language options.

Returns

Promise<SearchAppsResults | undefined>

The search results.

Defined in

endpoints/search.ts:151

searchApps(requests, options): Promise<(SearchAppsResults | undefined)[]>

Same as searchApps but for doing multiple searches at once. The search results are fetched in a single API request.

see searchApps

Parameters

Name Type Description
requests SearchAppsRequest[] An array of search apps requests.
options SearchAppsOptions The options for all requests.

Returns

Promise<(SearchAppsResults | undefined)[]>

An array of the search results, in the same order as the requests.

Defined in

endpoints/search.ts:165