Upon changing back PlaybackOffSet.Position the error is resolved
type PlaybackOffset struct {
// Position is zero based and can’t be negative.
Position int `json:"position,omitempty"`
// URI is a string representing the uri of the item to start at.
URI URI `json:"uri,omitempty"`
}
type PlaybackOffset struct {
// Position is zero based and can’t be negative.
Position *int `json:"position,omitempty"`
// URI is a string representing the uri of the item to start at.
URI URI `json:"uri,omitempty"`
}
Hi, I have a wrapper over the
client.PlayOpt
function that takes a context and a uriThis function upon providing a context and uri gives the following error
The same request on spotify api dashboard runs perfectly fine
I think https://github.com/zmb3/spotify/commit/9d29507c9a13689c913905f76e69974e8b234072 introduced a bug where the position isn't omitted when empty.
Upon changing back
PlaybackOffSet.Position
the error is resolvedhttps://github.com/zmb3/spotify/commit/9d29507c9a13689c913905f76e69974e8b234072 removes the
omitempty
tag because thePosition
was ignored when it became zero. Using an integer pointer would fix this problem. As in