public static List <God> GetGods() { string requestUri = SpyToolUtils.GetRequestURI("getgods", authParams: true, LanguageCode.English.GetId()); string serverResponse = SpyToolUtils.GetServerResponse(requestUri); List <God> gods = JsonConvert.DeserializeObject <List <God> >(serverResponse); gods.OrderBy(g => g.Name).ToList(); return(gods); }
public static DetailPlayer GetPlayer(string portalId, string gamertag) { //string requestURI = GetRequestURI("getplayeridsbygamertag", authParams: true, portalId, gamertag); //string serverResponse = GetServerResponse(requestURI); //List<Player> player = JsonConvert.DeserializeObject<List<Player>>(serverResponse); string requestURI = SpyToolUtils.GetRequestURI("getplayer", authParams: true, gamertag, portalId); string responseFromServer = SpyToolUtils.GetServerResponse(requestURI); List <DetailPlayer> player = JsonConvert.DeserializeObject <List <DetailPlayer> >(responseFromServer); return(player.FirstOrDefault()); }