public async void getDevices() { json.Value postData = new json.ObjectValue(); postData["_sid"] = sid; postData["limit"] = "1000"; postData["api"] = "SYNO.AudioStation.Folder"; postData["method"] = "list"; postData["library"] = "shared"; postData["additional"] = "song_tag,song_audio,song_rating"; postData["sort_by"] = "track"; postData["sort_direction"] = "ASC"; postData["version"] = "2"; json.Value v = await callApi("POST", "AudioStation/remote_player.cgi", "?_sid=" + sid, postData); Console.WriteLine(v.ToString()); }
public async Task <dynamic> getDirectory(string id = "") { json.Value postData = new json.ObjectValue(); postData["_sid"] = sid; postData["limit"] = "1000"; postData["api"] = "SYNO.AudioStation.Folder"; postData["method"] = "list"; postData["library"] = "shared"; postData["additional"] = "song_tag,song_audio,song_rating"; postData["sort_by"] = "track"; postData["sort_direction"] = "ASC"; postData["version"] = "2"; if (id != "") { postData["id"] = id; } var v = await callApi("POST", "AudioStation/folder.cgi", "?_sid=" + sid, postData); return(v); }
public async void control(string action, Dictionary <string, string> extra = null) { json.Value postData = new json.ObjectValue(); postData["_sid"] = sid; postData["api"] = "SYNO.AudioStation.RemotePlayer"; postData["method"] = "control"; postData["id"] = "uuid:ccb075c1-6775-c1b9-da7c-c10967b96ed7"; postData["version"] = "2"; postData["action"] = action; if (extra != null) { foreach (var a in extra) { postData[a.Key] = a.Value; } } await callApi("POST", "AudioStation/remote_player.cgi", "?_sid=" + sid, postData); }
public async Task<dynamic> getDirectory(string id = "") { json.Value postData = new json.ObjectValue(); postData["_sid"] = sid; postData["limit"] = "1000"; postData["api"] = "SYNO.AudioStation.Folder"; postData["method"] = "list"; postData["library"] = "shared"; postData["additional"] = "song_tag,song_audio,song_rating"; postData["sort_by"] = "track"; postData["sort_direction"] = "ASC"; postData["version"] = "2"; if (id != "") postData["id"] = id; var v = await callApi("POST", "AudioStation/folder.cgi", "?_sid=" + sid, postData); return v; }
public async void control(string action, Dictionary<string,string> extra = null) { json.Value postData = new json.ObjectValue(); postData["_sid"] = sid; postData["api"] = "SYNO.AudioStation.RemotePlayer"; postData["method"] = "control"; postData["id"] = "uuid:ccb075c1-6775-c1b9-da7c-c10967b96ed7"; postData["version"] = "2"; postData["action"] = action; if(extra != null) foreach (var a in extra) postData[a.Key] = a.Value; await callApi("POST", "AudioStation/remote_player.cgi", "?_sid=" + sid, postData); }