Skip to content

Add to saved tracks seems to have changed #228

Open
@RuurdBijlsma

Description

@RuurdBijlsma

Describe the bug
I'm using spotify.api.addToMySavedTracks, but i get a network error (status 400) in the console:

responseText: "{\"error\": {\"status\": 400, \"message\": \"Missing required field: ids\" } }"

It seems that this package sends as payload just an array of ids, but spotify expects this format:

{
    "ids": [
        "string"
    ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Run code spotify.api.addToMySavedTracks([id])
  2. See network error 400 as described above

Expected behavior
I expect it to not error and use {ids:[]} as request payload

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows
  • Browser chrome (electron)
  • Version 1.5.2

I'll try to make a pr for it

Source: https://developer.spotify.com/documentation/web-api/reference/save-tracks-user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions