-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMatchDetail.cs
36 lines (31 loc) · 1.17 KB
/
MatchDetail.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Text;
using FaceitAPI.Models;
using FaceitAPI.Types;
namespace FaceitAPI.Samples.Samples
{
public class MatchDetail
{
public void Get()
{
// arrange
Authorization authorization = new Authorization("<< YOUR API KEY >>");
Faceit faceit = new Faceit(authorization);
Matches matches = faceit.GetObject<Matches>();
Match match = matches.GetMatch("<< YOUR MATCH ID >>");
string matchid = match.MatchId;
string chatroomid = match.ChatRoomId;
string demourl = match.DemoUrl[0];
string game = match.Game;
string selectedmap = match.Voting.Maps.Pick[0];
string teamleader = match.Teams[0].Leader;
bool? affectingtoelo = match.CalculateElo;
// in FaceitAPI variables type ulong and nullable - ulong? means unix timestamp
// you can convert it to System.DateTime my type - UnixConverter (WILL BE LATER)
ulong? startedat = match.StartedAt;
ulong? finishedat = match.FinishedAt;
// and a lot more! :D
}
}
}