Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App store country codes #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

guilhermearaujo
Copy link

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});

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
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