Hi,
Seems i got myself into a corner with a syntax I haven’t been able to solve yet.
I am mainly struggling with the body part.
Here is the cURL I am trying to convert:
curl -X PUT "https://api.spotify.com/v1/me/player/play" -H "Accept: application/json" -H "Authorization: Bearer ACCESS\_TOKEN" -H "Content-Type: application/json" --data "{\"context\_uri\":\"spotify:album:5ht7ItJgpBH7W6vJ5BqpPr\",\"offset\":{\"position\":5}}"
What I got so far in lua is this:
network.request("https://api.spotify.com/v1/me/player/play","PUT",LISTENER,{body={"context\_uri":"spotify:album:5ht7ItJgpBH7W6vJ5BqpPr",headers={["Authorization"]="Bearer "..ACCESS\_TOKEN,["Content-Type"]="application/json"}}})
You can try your own if you like by going to the spotify web console at https://developer.spotify.com/web-api/console/put-play/#complete
anaqim