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

Feat: Add locale parameter to search api #336

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

ItWasEnder
Copy link
Contributor

@ItWasEnder ItWasEnder commented Mar 25, 2024

This adds support to return items in their native translation (for supported fields only)

Example:

Without locale param
URL: https://api.spotify.com/v1/search?q="ブレス・ユア・ブレス WADATAKEAKI"&type=track&limit=1

{
  "external_urls": {
    "spotify": "https://open.spotify.com/artist/6qayQS8CjcEBPMLdWAZEMK"
  },
  "href": "https://api.spotify.com/v1/artists/6qayQS8CjcEBPMLdWAZEMK",
  "id": "6qayQS8CjcEBPMLdWAZEMK",
  "name": "和田たけあき",
  "type": "artist",
  "uri": "spotify:artist:6qayQS8CjcEBPMLdWAZEMK"
}

With &locale=EN
URL: https://api.spotify.com/v1/search?q="ブレス・ユア・ブレス WADATAKEAKI"&type=track&limit=1&locale=EN

{
  "external_urls": {
    "spotify": "https://open.spotify.com/artist/6qayQS8CjcEBPMLdWAZEMK"
  },
  "href": "https://api.spotify.com/v1/artists/6qayQS8CjcEBPMLdWAZEMK",
  "id": "6qayQS8CjcEBPMLdWAZEMK",
  "name": "WADATAKEAKI",
  "type": "artist",
  "uri": "spotify:artist:6qayQS8CjcEBPMLdWAZEMK"
}

This adds support to return items in their native translation (for supported fields only)
@adamint adamint disabled auto-merge March 27, 2024 03:13
@adamint adamint merged commit 3c7b55d into adamint:main Mar 27, 2024
1 of 2 checks passed
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