Beispiel #1
0
        public static ReturnInformation.Return Search(string query, char?character = null, QueryArgs.Status?status = null, QueryArgs.Mode?mode = null, int?page = null)
        {
            WebClient webclient = new WebClient();
            string    s         = webclient.DownloadString(Path(query, character, status, mode, page));

            ReturnInformation.Return r = JsonConvert.DeserializeObject <ReturnInformation.Return>(s);
            return(r);
        }
Beispiel #2
0
        internal override BeatmapsetInfo GetInformation()
        {
            ReturnInformation.Return     r = Search(_beatmapsetPackage.BeatmapsetId.ToString(), QueryArgs.Character.BeatmapSetId);
            ReturnInformation.Beatmapset beatmapset;
            if (r.Count() != 1)
            {
                throw new Exception("Result More than one or Doesn't Exist.");
            }
            else
            {
                beatmapset = r[0];
            }
            BeatmapsetInfo info = new BeatmapsetInfo();

            info.id      = beatmapset.id;
            info.artist  = beatmapset.artist;
            info.creator = beatmapset.creator;
            info.title   = beatmapset.title;
            _fileName    = string.Format("{0} {1}-{2}.osz", info.id, info.artist, info.title);

            return(info);
        }