From 53631ad42df86be557746064a1e3161d32e3228d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 3 May 2017 09:44:29 -0400 Subject: Fix highscore list --- ShiftOS_TheReturn/UniteClient.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'ShiftOS_TheReturn/UniteClient.cs') 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(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; } + } } -- cgit v1.2.3