コード例 #1
0
ファイル: Program.cs プロジェクト: EngineerMark/OsuHelper
        private static void Main(string[] args)
        {
            //string t = OsuApiHelper.APIHelper<string>.GetDataFromWeb("google.com");
            OsuApiHelper.OsuApiKey.Key = "Secret";
            bool keyTest = OsuApiHelper.OsuApi.IsKeyValid();

            if (keyTest)
            {
                Console.WriteLine("Valid key");
                bool userTest = OsuApiHelper.OsuApi.IsUserValid("Amayakase");
                if (userTest)
                {
                    Console.WriteLine("Valid user");
                    //List<OsuApiHelper.OsuPlay> test = OsuApiHelper.OsuApi.GetUserRecent("Amayakase", OsuApiHelper.OsuMode.Standard, 5);
                    OsuApiHelper.OsuUser test = OsuApiHelper.OsuApi.GetUser("Amayakase");
                    string t = "";
                }
                else
                {
                    Console.WriteLine("Invalid user");
                }
            }
            else
            {
                Console.WriteLine("Invalid key");
            }
            Console.ReadLine();
        }
コード例 #2
0
 public static SessionData FromUser(OsuApiHelper.OsuUser user)
 {
     return(new SessionData()
     {
         TotalScore = Convert.ToInt64(user.TotalScore),
         RankedScore = Convert.ToInt64(user.RankedScore),
         Playcount = user.Playcount,
         RankSilverSS = user.CountRankSSH,
         RankGoldSS = user.CountRankSS,
         RankSilverS = user.CountRankSH,
         RankGoldS = user.CountRankS,
         RankA = user.CountRankA,
         Playtime = user.Playtime,
         Performance = user.Performance,
         Level = user.Level,
         WorldRank = user.Globalrank,
         CountryRank = user.Countryrank,
         Accuracy = user.Accuracy,
         Hits300 = user.Hits300,
         Hits100 = user.Hits100,
         Hits50 = user.Hits50,
         HitsPerPlay = (user.Hits300 + user.Hits100 + user.Hits50) / user.Playcount,
     });
 }
コード例 #3
0
 public static List <WebUser> GetUserAchievements(OsuApiHelper.OsuUser user)
 {
     return(GetUserAchievements(user.ID));
 }
コード例 #4
0
 public static void FromUser(OsuApiHelper.OsuUser user, ref SessionData output)
 {
     output = FromUser(user);
 }