private void UpdateFromApiResult(API.Services.ApiPlayer player, string token = null) { Id = player.Id; AppId = player.AppId; Name = player.Name; DisplayName = player.DisplayName; Email = player.Email; BirthDate = player.BirthDate; AvatarUrl = player.AvatarUrl; IsVerified = player.IsVerified; CreatedAt = player.CreatedAt; UpdatedAt = player.UpdatedAt; Token = token ?? Token; IsLoggedIn = !string.IsNullOrEmpty(token); Profiles = IsLoggedIn ? new Profiles(_api, this) : null; }
public Player(IndiebackendAPI api, API.Services.ApiPlayer player, string token = null) { _api = api; UpdateFromApiResult(player, token); }