[PR #651] [CLOSED] Make return structure for "Get Multiple..." type APIs consistent #979

Closed
opened 2026-02-28 00:03:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/651
Author: @badfarmerjohn
Created: 3/4/2021
Status: Closed

Base: masterHead: patch-1


📝 Commits (5)

📊 Changes

4 files changed (+43 additions, -31 deletions)

View changed files

📝 CHANGELOG.md (+15 -0)
📝 spotipy/client.py (+19 -15)
📝 tests/integration/test_non_user_endpoints.py (+8 -15)
📝 tests/integration/test_user_endpoints.py (+1 -1)

📄 Description

Get-Multiple APIs have a JSON response structure of with a single entry whose value is a list containing the actual requested items as dictionaries. The audio_features function in client.py was adapted to unwrap the single value in commit 9c0b872e86, but other functions for similar APIs (eg. tracks, artists, albums, ...) have not been adapted, leading to an inconsistent structure in the returned dictionary. This change modifies those functions to handle the response similar to audio_features.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/651 **Author:** [@badfarmerjohn](https://github.com/badfarmerjohn) **Created:** 3/4/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (5) - [`b2a834f`](https://github.com/spotipy-dev/spotipy/commit/b2a834f041f21051d50b5876740f8b98ccd05521) Make return structure for "Get Multiple..." type APIs consistent - [`aacdbcf`](https://github.com/spotipy-dev/spotipy/commit/aacdbcf2adcf156154e6743ee1cf6c9269ae0790) Modified tests - [`ca60303`](https://github.com/spotipy-dev/spotipy/commit/ca603035cda3f63f94a4cf8c4b40980dcca3e530) Merge branch 'patch-1' of https://github.com/badfarmerjohn/spotipy into patch-1 - [`8e86ea9`](https://github.com/spotipy-dev/spotipy/commit/8e86ea983131a212c7073e0bdf8c087a04078129) Explained changes in changelog - [`f9c9490`](https://github.com/spotipy-dev/spotipy/commit/f9c9490d384dffb4d2559ba2b52eb22fd72a0126) Fixed syntax ### 📊 Changes **4 files changed** (+43 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+15 -0) 📝 `spotipy/client.py` (+19 -15) 📝 `tests/integration/test_non_user_endpoints.py` (+8 -15) 📝 `tests/integration/test_user_endpoints.py` (+1 -1) </details> ### 📄 Description Get-Multiple APIs have a JSON response structure of with a single entry whose value is a list containing the actual requested items as dictionaries. The audio_features function in client.py was adapted to unwrap the single value in commit 9c0b872e86db479b1ba38a826a7f1f77fa3d68b8, but other functions for similar APIs (eg. tracks, artists, albums, ...) have not been adapted, leading to an inconsistent structure in the returned dictionary. This change modifies those functions to handle the response similar to audio_features. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#979
No description provided.