public async Task GetMatchAsyncTest() { IRiotClient client = new RiotClient(); const long matchId = 2032332497L; Match match = await client.GetMatchAsync(matchId); Assert.That(match, Is.Not.Null); Assert.That(match.GameId, Is.EqualTo(matchId)); Assert.That(match.PlatformId, Is.EqualTo(client.PlatformId)); }
public async Task GetMatchAsyncTest() { IRiotClient client = new RiotClient(); const long matchId = 2032332497L; var match = await client.GetMatchAsync(matchId); Assert.That(match, Is.Not.Null); Assert.That(match.MatchId, Is.EqualTo(matchId)); Assert.That(match.Region, Is.EqualTo(client.Region)); Assert.That(match.Timeline, Is.Null); }
static async Task TestAsync(long MatchID) { IRiotClient client = new RiotClient(new RiotClientSettings { ApiKey = "############" // Replace this with your API key, of course. }); cli = client; Match match = await client.GetMatchAsync(MatchID, PlatformId.NA1).ConfigureAwait(false); T1 = match; }