[PR #139] [MERGED] PlayHistory returns FullTrack despite Spotify documentation #264

Closed
opened 2026-02-27 20:24:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/139
Author: @aramperes
Created: 10/15/2020
Status: Merged
Merged: 10/17/2020
Merged by: @ramsayleung

Base: masterHead: full-track-playhistory


📝 Commits (2)

  • 9456955 PlayHistory returns FullTrack despite Spotify documentation
  • bfb4440 Update CHANGELOG.md

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 src/model/playing.rs (+1 -2)

📄 Description

Despite what the Spotify documentation specifies, the play history object has a FullTrack track field. This can be seen by using the endpoint and noticing that all fields are returned in the track object (notice the album, popularity, and other fields):

{
  "items": [
    {
      "track": {
        "album": {
          "album_type": "album",
          "artists": [
            {
              "external_urls": {
                "spotify": "https://open.spotify.com/artist/0DtXHIvJ8NWBg5pGvsgWnR"
              },
              "href": "https://api.spotify.com/v1/artists/0DtXHIvJ8NWBg5pGvsgWnR",
              "id": "0DtXHIvJ8NWBg5pGvsgWnR",
              "name": "Leikeli47",
              "type": "artist",
              "uri": "spotify:artist:0DtXHIvJ8NWBg5pGvsgWnR"
            }
          ],
          "available_markets": [
            "..."
          ],
          "external_urls": {
            "spotify": "https://open.spotify.com/album/1VAZdFNZ1t5BYugJ3NfaZh"
          },
          "href": "https://api.spotify.com/v1/albums/1VAZdFNZ1t5BYugJ3NfaZh",
          "id": "1VAZdFNZ1t5BYugJ3NfaZh",
          "images": [
            {
              "height": 640,
              "url": "https://i.scdn.co/image/ab67616d0000b273ba578345104c3175c5b97625",
              "width": 640
            },
            {
              "height": 300,
              "url": "https://i.scdn.co/image/ab67616d00001e02ba578345104c3175c5b97625",
              "width": 300
            },
            {
              "height": 64,
              "url": "https://i.scdn.co/image/ab67616d00004851ba578345104c3175c5b97625",
              "width": 64
            }
          ],
          "name": "Wash & Set",
          "release_date": "2017-09-08",
          "release_date_precision": "day",
          "total_tracks": 14,
          "type": "album",
          "uri": "spotify:album:1VAZdFNZ1t5BYugJ3NfaZh"
        },
        "artists": [
          {
            "external_urls": {
              "spotify": "https://open.spotify.com/artist/0DtXHIvJ8NWBg5pGvsgWnR"
            },
            "href": "https://api.spotify.com/v1/artists/0DtXHIvJ8NWBg5pGvsgWnR",
            "id": "0DtXHIvJ8NWBg5pGvsgWnR",
            "name": "Leikeli47",
            "type": "artist",
            "uri": "spotify:artist:0DtXHIvJ8NWBg5pGvsgWnR"
          }
        ],
        "available_markets": [
          "..."
        ],
        "disc_number": 1,
        "duration_ms": 218040,
        "explicit": true,
        "external_ids": {
          "isrc": "USRC11701108"
        },
        "external_urls": {
          "spotify": "https://open.spotify.com/track/6r60QMPjupH9mfPRBw1jva"
        },
        "href": "https://api.spotify.com/v1/tracks/6r60QMPjupH9mfPRBw1jva",
        "id": "6r60QMPjupH9mfPRBw1jva",
        "is_local": false,
        "name": "O.M.C.",
        "popularity": 30,
        "preview_url": "https://p.scdn.co/mp3-preview/434b7014f009a3a53fdb16daf9ca047d2d853df5?cid=774b29d4f13844c495f206cafdad9c86",
        "track_number": 5,
        "type": "track",
        "uri": "spotify:track:6r60QMPjupH9mfPRBw1jva"
      },
      "played_at": "2020-10-15T21:15:04.622Z",
      "context": null
    }
  ],
  "next": "https://api.spotify.com/v1/me/player/recently-played?before=1602796504622&limit=1",
  "cursors": {
    "after": "1602796504622",
    "before": "1602796504622"
  },
  "limit": 1,
  "href": "https://api.spotify.com/v1/me/player/recently-played?limit=1"
}

🔄 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/ramsayleung/rspotify/pull/139 **Author:** [@aramperes](https://github.com/aramperes) **Created:** 10/15/2020 **Status:** ✅ Merged **Merged:** 10/17/2020 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `full-track-playhistory` --- ### 📝 Commits (2) - [`9456955`](https://github.com/ramsayleung/rspotify/commit/945695555f084faf6aeb76c94e50db7e65b39391) PlayHistory returns FullTrack despite Spotify documentation - [`bfb4440`](https://github.com/ramsayleung/rspotify/commit/bfb4440c632c13541ffb657fecdbc6eda05d2bd5) Update CHANGELOG.md ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `src/model/playing.rs` (+1 -2) </details> ### 📄 Description Despite what the Spotify documentation [specifies](https://developer.spotify.com/documentation/web-api/reference/player/get-recently-played/), the `play history object` has a `FullTrack` track field. This can be seen by [using the endpoint](https://developer.spotify.com/console/get-recently-played/) and noticing that all fields are returned in the track object (notice the album, popularity, and other fields): ```json { "items": [ { "track": { "album": { "album_type": "album", "artists": [ { "external_urls": { "spotify": "https://open.spotify.com/artist/0DtXHIvJ8NWBg5pGvsgWnR" }, "href": "https://api.spotify.com/v1/artists/0DtXHIvJ8NWBg5pGvsgWnR", "id": "0DtXHIvJ8NWBg5pGvsgWnR", "name": "Leikeli47", "type": "artist", "uri": "spotify:artist:0DtXHIvJ8NWBg5pGvsgWnR" } ], "available_markets": [ "..." ], "external_urls": { "spotify": "https://open.spotify.com/album/1VAZdFNZ1t5BYugJ3NfaZh" }, "href": "https://api.spotify.com/v1/albums/1VAZdFNZ1t5BYugJ3NfaZh", "id": "1VAZdFNZ1t5BYugJ3NfaZh", "images": [ { "height": 640, "url": "https://i.scdn.co/image/ab67616d0000b273ba578345104c3175c5b97625", "width": 640 }, { "height": 300, "url": "https://i.scdn.co/image/ab67616d00001e02ba578345104c3175c5b97625", "width": 300 }, { "height": 64, "url": "https://i.scdn.co/image/ab67616d00004851ba578345104c3175c5b97625", "width": 64 } ], "name": "Wash & Set", "release_date": "2017-09-08", "release_date_precision": "day", "total_tracks": 14, "type": "album", "uri": "spotify:album:1VAZdFNZ1t5BYugJ3NfaZh" }, "artists": [ { "external_urls": { "spotify": "https://open.spotify.com/artist/0DtXHIvJ8NWBg5pGvsgWnR" }, "href": "https://api.spotify.com/v1/artists/0DtXHIvJ8NWBg5pGvsgWnR", "id": "0DtXHIvJ8NWBg5pGvsgWnR", "name": "Leikeli47", "type": "artist", "uri": "spotify:artist:0DtXHIvJ8NWBg5pGvsgWnR" } ], "available_markets": [ "..." ], "disc_number": 1, "duration_ms": 218040, "explicit": true, "external_ids": { "isrc": "USRC11701108" }, "external_urls": { "spotify": "https://open.spotify.com/track/6r60QMPjupH9mfPRBw1jva" }, "href": "https://api.spotify.com/v1/tracks/6r60QMPjupH9mfPRBw1jva", "id": "6r60QMPjupH9mfPRBw1jva", "is_local": false, "name": "O.M.C.", "popularity": 30, "preview_url": "https://p.scdn.co/mp3-preview/434b7014f009a3a53fdb16daf9ca047d2d853df5?cid=774b29d4f13844c495f206cafdad9c86", "track_number": 5, "type": "track", "uri": "spotify:track:6r60QMPjupH9mfPRBw1jva" }, "played_at": "2020-10-15T21:15:04.622Z", "context": null } ], "next": "https://api.spotify.com/v1/me/player/recently-played?before=1602796504622&limit=1", "cursors": { "after": "1602796504622", "before": "1602796504622" }, "limit": 1, "href": "https://api.spotify.com/v1/me/player/recently-played?limit=1" } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:00 +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/rspotify#264
No description provided.