<commit_before>﻿using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace RedditSharp.Things
{
    /// <summary>
    /// A contributor to a subreddit.
    /// </summary>
    public class Contributor : Thing
    {
        #pragma warning disable 1591
        public Contributor(Reddit reddit, JToken json) : base(reddit, json) {
        }
        #pragma warning restore 1591

        /// <summary>
        /// Contributor name.
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; private set; }

        /// <summary>
        /// Date contributor was added.
        /// </summary>
        [JsonProperty("date")]
        [JsonConverter(typeof(UnixTimestampConverter))]
        public DateTime DateAdded { get; private set; }
    }
}<commit_msg>Contributor should also inherit from RedditUser.<commit_after>﻿using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using RedditSharp.Extensions;

namespace RedditSharp.Things
{
    /// <summary>
    /// A contributor to a subreddit.
    /// </summary>
    public class Contributor : RedditUser
    {
        #pragma warning disable 1591
        public Contributor(Reddit reddit, JToken json) : base(reddit, json) {
            var data = json["name"] == null ? json["data"] : json;
            base.Name = data["name"].ValueOrDefault<string>();
            var id = data["id"].ValueOrDefault<string>();
            if (id.Contains("_"))
            {
                base.Kind = "t2";
                base.Id = id.Split('_')[1];
                base.FullName = id;
            }
        }
        #pragma warning restore 1591

        /// <summary>
        /// Contributor name.
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; private set; }

        /// <summary>
        /// Date contributor was added.
        /// </summary>
        [JsonProperty("date")]
        [JsonConverter(typeof(UnixTimestampConverter))]
        public DateTime DateAdded { get; private set; }

        /// This will always return 0 for Contributors
        /// </summary>
        [JsonIgnore]
        public new int CommentKarma => 0;

        /// <summary>
        /// This will always return 0 for Contributors
        /// </summary>
        [JsonIgnore]
        public new int LinkKarma => 0;
    }
}
{'fraction_non_alphanumeric': 0.12698412698412698, 'fraction_numerical': 0.009438009438009438, 'mean_word_length': 1.8404384896467723, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5810277', 'n_tokens_mistral': 644, 'n_tokens_neox': 616, 'n_words': 173}