public async Task <Gettables.CharacterFull> GetSingleCharacterAsync(long theId) { string json; using (var client = new WebClient()) { string url = $"https://census.daybreakgames.com/s:trashpanda/get/ps2:v2/character/?character_id={theId}&c:resolve=outfit_member_extended&c:resolve=stat_history&c:resolve=online_status&c:resolve=world&c:join=world"; json = await client.DownloadStringTaskAsync(url); } Gettables.CharacterDetailList resultList = Newtonsoft.Json.JsonConvert.DeserializeObject <Gettables.CharacterDetailList>(json); return(resultList.FirstCharacter); }
public Gettables.CharacterFull GetSingleCharacter(long theId) { string json; using (var client = new WebClient()) { string url = $"https://census.daybreakgames.com/s:trashpanda/get/ps2:v2/character/?character_id={theId}&c:resolve=stat_history(stat_name,all_time,one_life_max)&c:resolve=online_status&c:resolve=world&c:join=world"; var a = Task.Run(() => client.DownloadString(url)); json = a.Result; } Gettables.CharacterDetailList resultList = Newtonsoft.Json.JsonConvert.DeserializeObject <Gettables.CharacterDetailList>(json); //Gettables.CharacterFull result = resultList.CharacterResult[0]; return(resultList.FirstCharacter); }