public async Task <ActionResult <EamuseXrpcData> > GetHitchart([FromBody] EamuseXrpcData data) { ClanMusicInfo mInfo = await ClanMusicInfo.Instance; List <int> hitChart = mInfo.GetRandomSongs(10); XElement orgElem = new XElement("hitchart_org", new XAttribute("count", hitChart.Count)); for (short i = 0; i < hitChart.Count; ++i) { orgElem.Add(new XElement("rankdata", new KS32("music_id", hitChart[i]), new KS16("rank", i), new KS16("prev", i) )); } data.Document = new XDocument(new XElement("response", new XElement("demodata", new XElement("data", new KStr("update", "1"), new XElement("hitchart_lic", new XAttribute("count", 0)), orgElem ) ))); return(data); }
private async Task <XElement> GenFcChallenge() { ClanMusicInfo mInfo = await ClanMusicInfo.Instance; List <int> songs = mInfo.GetRandomSongs(2); return(new XElement("fc_challenge", new XElement("today", new KS32("music_id", songs[0]), new KU8("state", 0) ), new XElement("whim", new KS32("music_id", songs[1]), new KU8("state", 80) ) )); }