public static async Task <Beatmapset> GetBeatmapsetsByBidAsync(string bId) { OsuApiV2Client client = new OsuApiV2Client(OsuApiKey.UserName, OsuApiKey.Password); try { Beatmapset set = await client.GetBeatmapsetByBIdAsync(bId); return(set); } catch (NetworkFailException e) { if (e.InnerException.Message.Contains("404")) { return(null); } throw; } }
public static Beatmapset GetBeatmapsetsByBid(string bId) { OsuApiV2Client client = new OsuApiV2Client(OsuApiKey.UserName, OsuApiKey.Password); return(client.GetBeatmapsetByBIdAsync(bId).Result); }