/// <summary> /// /// </summary> /// <param name="osuId"></param> /// <exception cref="OsuApiFailedException"></exception> /// <returns></returns> public virtual async Task <MotherShipResponse <UserHistory> > GetYesterdayInfo(int osuId) { var(success, result) = await Execute.Do(async() => { return(await HttpMethods.GetJsonDeserializeAsync <MotherShipResponse <UserHistory> >(UserYesterdayInfoUrl(osuId))); }, "Network error."); if (!success) { throw new OsuApiFailedException("Network error."); } return(result); }
/// <summary> /// /// </summary> /// <exception cref="OsuApiFailedException">访问网络失败。</exception> /// <param name="qqId"></param> /// <returns></returns> public virtual async Task <MotherShipResponse <MotherShipUserInfo> > GetUserInfoAsync(long qqId) { var(success, result) = await Execute.Do(async() => { return(await HttpMethods.GetJsonDeserializeAsync <MotherShipResponse <MotherShipUserInfo> >(UserInfoUrl(qqId))); }, "Network error."); if (!success) { throw new OsuApiFailedException("Network error."); } return(result); }