Skip to content

App store country codes#15

Open
guilhermearaujo wants to merge 4 commits intoX-SLAYER:mainfrom
guilhermearaujo:app-store-country-codes
Open

App store country codes#15
guilhermearaujo wants to merge 4 commits intoX-SLAYER:mainfrom
guilhermearaujo:app-store-country-codes

Conversation

@guilhermearaujo
Copy link
Copy Markdown

The current code uses the itunes.apple.com/lookup?bundleId=<app id> URL to fetch app data, without a country=<iso code> param, that API defaults to looking up in the US store only.

If the app is not published in the US store, then, we get 0 results whereas there would be a result if we use the appropriate country.

This adds support to receive a list of country codes to search with

var uri =
Uri.https("itunes.apple.com", "/lookup", {"bundleId": packageName});
var uri = Uri.https("itunes.apple.com", "/lookup",
{"bundleId": packageName, "country": countryCodes});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be countryCodes.join(',')?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the iTunes API expect many country=<code> parameters rather than country=<code,code,code...>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants