示例#1
0
        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());
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
		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;

		}
示例#5
0
		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);
		}
示例#6
0
		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());

		}