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

First try at configurable country for the endpoints #51

Merged
merged 8 commits into from
May 5, 2023

Conversation

rajb245
Copy link
Contributor

@rajb245 rajb245 commented Feb 18, 2023

As we've been discussing in #50, it could be useful to not always hit the shazam "GB" endpoint, but use another country. That discussion shows that the data returned is different depending on which one you use. This patch makes that configurable when you create a shazam instance. Like this:

shazam = Shazam(endpoint_country="US")

And then you use it like normal. The default for the new parameter is "GB", leaving the old behavior intact.

@rajb245
Copy link
Contributor Author

rajb245 commented Feb 18, 2023

Also worth saying I haven't extensively tested this, just enough to make sure it works for my case of calling shazam.track_about and getting back ID numbers that I can lookup in the iTunes store API.

@dotX12 dotX12 changed the base branch from master to dev May 5, 2023 05:25
@dotX12 dotX12 merged commit 1703b6b into shazamio:dev May 5, 2023
1 of 3 checks passed
@dotX12 dotX12 mentioned this pull request May 5, 2023
dotX12 added a commit that referenced this pull request May 5, 2023
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.

None yet

3 participants