diff options
| author | Michael <[email protected]> | 2017-05-03 09:44:29 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-03 09:44:34 -0400 |
| commit | 53631ad42df86be557746064a1e3161d32e3228d (patch) | |
| tree | b753b3eef4232310873b647b218f09c9ce726cbb /ShiftOS_TheReturn | |
| parent | 3488ac86fb85553e5eaad0d7dff64bc5f0e260a0 (diff) | |
| download | shiftos_thereturn-53631ad42df86be557746064a1e3161d32e3228d.tar.gz shiftos_thereturn-53631ad42df86be557746064a1e3161d32e3228d.tar.bz2 shiftos_thereturn-53631ad42df86be557746064a1e3161d32e3228d.zip | |
Fix highscore list
Diffstat (limited to 'ShiftOS_TheReturn')
| -rw-r--r-- | ShiftOS_TheReturn/UniteClient.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/UniteClient.cs b/ShiftOS_TheReturn/UniteClient.cs index cb08382..1136b5c 100644 --- a/ShiftOS_TheReturn/UniteClient.cs +++ b/ShiftOS_TheReturn/UniteClient.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; +using Newtonsoft.Json; namespace ShiftOS.Unite { @@ -12,6 +13,16 @@ namespace ShiftOS.Unite public string Token { get; private set; } public string BaseURL { get; private set; } + public string GetDisplayNameId(string id) + { + return MakeCall("/API/GetDisplayName/" + id); + } + + public PongHighscoreModel GetPongHighscores() + { + return JsonConvert.DeserializeObject<PongHighscoreModel>(MakeCall("/API/GetPongHighscores")); + } + public UniteClient(string baseurl, string usertoken) { BaseURL = baseurl; @@ -100,4 +111,17 @@ namespace ShiftOS.Unite MakeCall("/API/SetCodepoints/" + value.ToString()); } } + + public class PongHighscoreModel + { + public int Pages { get; set; } + public PongHighscore[] Highscores { get; set; } + } + + public class PongHighscore + { + public string UserId { get; set; } + public int Level { get; set; } + public long CodepointsCashout { get; set; } + } } |
