-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRankings.cs
34 lines (29 loc) · 991 Bytes
/
Rankings.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
using System;
using System.Collections.Generic;
using System.Text;
using FaceitAPI.Models;
using FaceitAPI.Types;
namespace FaceitAPI.Samples.Samples
{
public class Rankings
{
public void Get()
{
string playerid = "<< PLAYER ID HERE >>";
// arrange
Faceit faceit = new Faceit(new Authorization("<< YOUR API KEY >>"));
Types.Rankings rankings = faceit.GetObject<Types.Rankings>();
// execute request to REST api
RankingPaging<SimpleGamePlayer> players = rankings.GetGlobalPositionForPlayer("csgo", "EU", playerid, "pl");
// iterate results
foreach (SimpleGamePlayer player in players.Items)
{
string nickname = player.Nickname;
string id = player.PlayerId;
int? faceitelo = player.FaceitElo;
string country = player.Country;
// and more :D
}
}
}
}