﻿namespace TraktApiSharp.Objects.Get.People
{
    using Extensions;
    using Newtonsoft.Json;
    using System;

    public class TraktPerson
    {
        [JsonProperty(PropertyName = "name")]
        public string Name { get; set; }

        [JsonProperty(PropertyName = "ids")]
        public TraktPersonIds Ids { get; set; }

        [JsonProperty(PropertyName = "images")]
        public TraktPersonImages Images { get; set; }

        [JsonProperty(PropertyName = "biography")]
        public string Biography { get; set; }

        [JsonProperty(PropertyName = "birthday")]
        public DateTime? Birthday { get; set; }

        [JsonProperty(PropertyName = "death")]
        public DateTime? Death { get; set; }

        public int Age => Birthday.HasValue ? (Death.HasValue ? Birthday.YearsBetween(Death) : Birthday.YearsBetween(DateTime.Now)) : 0;

        [JsonProperty(PropertyName = "birthplace")]
        public string Birthplace { get; set; }

        [JsonProperty(PropertyName = "homepage")]
        public string Homepage { get; set; }
    }
}

﻿namespace TraktApiSharp.Objects.Get.People
{
    using Extensions;
    using Newtonsoft.Json;
    using System;

    /// <summary>A Trakt person.</summary>
    public class TraktPerson
    {
        /// <summary>Gets or sets the person name.</summary>
        [JsonProperty(PropertyName = "name")]
        public string Name { get; set; }

        /// <summary>Gets or sets the collection of ids for the person for various web services.</summary>
        [JsonProperty(PropertyName = "ids")]
        public TraktPersonIds Ids { get; set; }

        /// <summary>Gets or sets the collection of images and image sets for the person.</summary>
        [JsonProperty(PropertyName = "images")]
        public TraktPersonImages Images { get; set; }

        /// <summary>Gets or sets the biography of the person.</summary>
        [JsonProperty(PropertyName = "biography")]
        public string Biography { get; set; }

        /// <summary>Gets or sets the UTC datetime when the person was born.</summary>
        [JsonProperty(PropertyName = "birthday")]
        public DateTime? Birthday { get; set; }

        /// <summary>Gets or sets the UTC datetime when the person died.</summary>
        [JsonProperty(PropertyName = "death")]
        public DateTime? Death { get; set; }

        /// <summary>Returns the age of the person, if <see cref="Birthday" /> is set, otherwise zero.</summary>
        public int Age => Birthday.HasValue ? (Death.HasValue ? Birthday.YearsBetween(Death) : Birthday.YearsBetween(DateTime.Now)) : 0;

        /// <summary>Gets or sets the birthplace of the person.</summary>
        [JsonProperty(PropertyName = "birthplace")]
        public string Birthplace { get; set; }

        /// <summary>Gets or sets the web address of the homepage of the person.</summary>
        [JsonProperty(PropertyName = "homepage")]
        public string Homepage { get; set; }
    }
}

Add get best id method for person.
Add get best id method for person.
