コード例 #1
0
        private static async Task Main(string[] args)
        {
            using (var client = new CallOfDutyClient())
            {
                var result = await client.GetProfileAsync(Title.BlackOps4, Platform.BattleNet, "AeonLucid#2662", ProfileType.Zombies);

                var result2 = await client.GetRecentMatches(Title.BlackOps4, Platform.BattleNet, "AeonLucid#2662");
            }
        }
コード例 #2
0
        private static async Task DoStuff()
        {
            using (var client = new CallOfDutyClient(Environment.GetEnvironmentVariable("TRN_KEY")))
            {
                Console.WriteLine("Looking up player ids..");
                var players = new[]
                {
                    "AeonLucid#2662"
                };

                foreach (var player in players)
                {
                    Console.WriteLine($"Looking up {player}");

                    var response = await client.FindPlayerAsync(Game.Bo4, Platform.BattleNet, player);

                    var ratio = response.Stats.First(x => x.Metadata.Key == "KDRatio");

                    Console.WriteLine($"> The user {player} has a KD Ratio of {ratio.DisplayValue}.");
                }
            }
        }