[issue #139] client lookup and stats api

This commit is contained in:
RaidMax
2020-05-24 21:22:26 -05:00
parent 4457ee5461
commit 30f2f7bf09
32 changed files with 907 additions and 36 deletions

View File

@ -0,0 +1,10 @@
namespace Stats.Dtos
{
public class StatsInfoRequest
{
/// <summary>
/// client identifier
/// </summary>
public int? ClientId { get; set; }
}
}

View File

@ -0,0 +1,56 @@
using System;
using System.Text.Json.Serialization;
namespace Stats.Dtos
{
public class StatsInfoResult
{
/// <summary>
/// ranking on the server
/// </summary>
public int Ranking { get; set; }
/// <summary>
/// number of kills
/// </summary>
public int Kills { get; set; }
/// <summary>
/// number of deaths
/// </summary>
public int Deaths { get; set; }
/// <summary>
/// performance level (elo rating + skill) / 2
/// </summary>
public double Performance { get; set; }
/// <summary>
/// SPM
/// </summary>
public double ScorePerMinute { get; set; }
/// <summary>
/// last connection
/// </summary>
public DateTime LastPlayed { get; set; }
/// <summary>
/// how many seconds played on the server
/// </summary>
public double TotalSecondsPlayed { get; set; }
/// <summary>
/// name of the server
/// </summary>
public string ServerName { get; set; }
/// <summary>
/// server game
/// </summary>
public string ServerGame { get; set; }
[JsonIgnore]
public long ServerId { get; set; }
}
}