I am using Soundcloud AS3 library to build an application. I am able to create/get-all playlists for a user. But while updating an existing playlist, I don't understand the syntax by which I can specify the IDs of the tracks to put in that playlist. Basically, I am trying something like this:
var params:Object = {};
params["playlist[id]"] = "1822522";
params["playlist[title]"] = "Set 3";
params["playlist[tracks][][id]"] = '41938358';
params["playlist[tracks][][id]"] = '41938359';
params["playlist[tracks][][id]"] = '41937715';
playlistID = '1822522';
var delegate:SoundcloudDelegate = soundcloudClient.sendRequest("playlists/" + playlistID, URLRequestMethod.POST, params);
In the documentation, it says that the request (for curl) has to be something like this:
curl -X PUT "https://api.soundcloud.com/playlists/98866.json" \
-F 'oauth_token=A_VALID_TOKEN' \
-F 'playlist[tracks][][id]=222'\
-F 'playlist[tracks][][id]=333'\
-F 'playlist[tracks][][id]=444'\
-F 'playlist[tracks][][id]=555'
How do I create my playlists params to make the correct request.
P.S.- 41938358, etc. are my track IDs.
EDIT - while creating playlists, if I simply pass the name+description of a playlist, it works fine. But if I have to pass the list of track IDs, I cannot do it because of my faulty syntax.