Thanks to visit codestin.com
Credit goes to github.com

Skip to content

First try at configurable country for the endpoints#51

Merged
dotX12 merged 8 commits intoshazamio:devfrom
rajb245:master
May 5, 2023
Merged

First try at configurable country for the endpoints#51
dotX12 merged 8 commits intoshazamio:devfrom
rajb245:master

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

3 participants

Comments