Add updatetime to rank entries
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
@@ -9,12 +10,20 @@ namespace TOOHUCardAPI.DTO.RankData
|
||||
{
|
||||
[JsonProperty("rank_type")]
|
||||
public string RankType { get; set; }
|
||||
[JsonProperty("steamid")]
|
||||
public long SteamId { get; set; }
|
||||
[JsonProperty("userid")]
|
||||
public long UserId { get; set; }
|
||||
[JsonProperty("username")]
|
||||
public string Username { get; set; }
|
||||
[JsonProperty("version")]
|
||||
public string Version { get; set; }
|
||||
[JsonProperty("wave")]
|
||||
public int Wave { get; set; }
|
||||
[JsonProperty("damage")]
|
||||
public long Damage { get; set; }
|
||||
[JsonProperty("updatetime")]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
[JsonIgnore]
|
||||
public Dictionary<string, string> Cards { get; set; }
|
||||
}
|
||||
@@ -32,6 +41,7 @@ namespace TOOHUCardAPI.DTO.RankData
|
||||
Version = rankEntry.Version,
|
||||
Wave = rankEntry.Wave,
|
||||
Damage = rankEntry.Damage,
|
||||
UpdateTime = rankEntry.UpdateTime,
|
||||
Cards = rankEntry.TowersUsed.Select(tower => KeyValuePair.Create(tower.TowerKey, tower.EncodedData))
|
||||
.ToDictionary(kv => kv.Key, kv => kv.Value)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user