/// <summary>
        ///     获取该成绩对应的谱面
        /// </summary>
        /// <returns></returns>
        public OnlineBeatmap GetOnlineBeatmap()
        {
            var q = new OnlineBeatmapQuery {
                OsuApiKey = QuerierApiKey, BeatmapId = _beatmapId
            };
            var beatmap = q.Beatmaps[0];

            return(beatmap);
        }
Beispiel #2
0
        /// <summary>
        ///     获取该成绩对应的谱面
        /// </summary>
        /// <returns></returns>
        public OnlineBeatmap GetOnlineBeatmap()
        {
            var q         = new OnlineBeatmapQuery();
            var osuApiKey = "fa2748650422c84d59e0e1d5021340b6c418f62f";

            q.OsuApiKey = osuApiKey;
            q.BeatmapId = _beatmapId;
            var beatmap = q.Beatmaps[0];

            return(beatmap);
        }
Beispiel #3
0
        /// <summary>
        ///     使用osu!api获得相应谱面的信息并转换成Beatmap
        /// </summary>
        /// <returns>返回一个<seealso cref="Beatmap" />对象</returns>
        public Beatmap GetBeatmap()
        {
            var query     = new OnlineBeatmapQuery();
            var osuApiKey = "fa2748650422c84d59e0e1d5021340b6c418f62f";

            query.BeatmapId = _beatmapId;
            query.OsuApiKey = osuApiKey;
            var bms = query.Beatmaps;
            var b   = new Beatmap(bms[0]);

            if (b.BeatmapId == -2048)
            {
                b = null;
            }
            return(b);
        }