Rename playlist /tracks endpoints to /items - #77
Conversation
Spotify's Feb 2026 API update renames all playlist track management
endpoints from /playlists/{id}/tracks to /playlists/{id}/items, and
the request body key from "tracks" to "items".
Closes #72
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughFive playlist-management scripts and a test were updated to use Spotify's renamed playlist endpoints: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Spotishell/Public/Playlists/Remove-PlaylistItems.ps1 (1)
30-32: Consider renaming the$Trackparameter to$Itemfor consistency.The parameter is still named
$Track(line 32) and referenced as-Trackin examples (lines 5, 8, 11), while the API now usesitemsterminology. For consistency with the new API and the body key change, consider renaming this parameter in a future update.This is a breaking change for existing scripts, so if backward compatibility is a concern, you could add a parameter alias:
♻️ Suggested approach with backward compatibility
[Parameter(Mandatory, ValueFromPipeline)] +[Alias('Track')] [array] -$Track, +$Item,🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Spotishell/Public/Playlists/Remove-PlaylistItems.ps1` around lines 30 - 32, The parameter $Track in Remove-PlaylistItems.ps1 should be renamed to $Item to match the API's "items" terminology and the body key change; update the parameter declaration (currently "[array] $Track") and all internal references to use $Item, and if you need backward compatibility add an Alias for the old name (e.g., apply an Alias attribute referencing "Track") so callers using -Track keep working while new code uses -Item.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@Spotishell/Public/Playlists/Remove-PlaylistItems.ps1`:
- Around line 30-32: The parameter $Track in Remove-PlaylistItems.ps1 should be
renamed to $Item to match the API's "items" terminology and the body key change;
update the parameter declaration (currently "[array] $Track") and all internal
references to use $Item, and if you need backward compatibility add an Alias for
the old name (e.g., apply an Alias attribute referencing "Track") so callers
using -Track keep working while new code uses -Item.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 05012734-2e27-4dda-8b38-5d34025d9e1b
📒 Files selected for processing (5)
Spotishell/Public/Playlists/Add-PlaylistItem.ps1Spotishell/Public/Playlists/Edit-PlaylistOrder.ps1Spotishell/Public/Playlists/Get-PlaylistItems.ps1Spotishell/Public/Playlists/Remove-PlaylistItems.ps1Spotishell/Public/Playlists/Set-PlaylistItems.ps1
Summary
/playlists/{id}/tracksto/playlists/{id}/itemsper Spotify's Feb 2026 API changesRemove-PlaylistItemsrequest body key fromtrackstoitems$Trackparameter to$Itemwith[Alias('Track')]for backward compatibilityGet-PlaylistItems,Add-PlaylistItem,Remove-PlaylistItems,Edit-PlaylistOrder,Set-PlaylistItemsCloses #72
Related to #70
Checklist
Invoke-Pester— 58/58 passingTest plan
Import-Module ./Spotishell/Spotishell.psd1 -Force/itemsendpoint/tracksin playlist endpoint URLsRemove-PlaylistItemsbody usesitemskey instead oftracks-Trackalias still works for backward compatibility🤖 Generated with Claude Code