<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeClimber.GoogleReaderConnector.JsonHelpers;

namespace CodeClimber.GoogleReaderConnector
{
    public class ReaderParameters
    {
        public DateTime From { get; set; }
        public int MaxItems { get; set; }
        public ItemDirection Direction { get; set; }
        public string Client { get; set; }

        public string MakeQueryString()
        {
            return MakeQueryString(DateTime.Now);
        }

        public string MakeQueryString(DateTime currentTime)
        {
            List<String> paramParts = new List<string>();
            if (From != DateTime.MinValue)
                paramParts.Add(string.Format("ot={0}", From.ConvertToUnixTimestamp()));

            if (!String.IsNullOrEmpty(Client))
                paramParts.Add(string.Format("client={0}", Client));

            if(MaxItems!=0)
                paramParts.Add(string.Format("n={0}", MaxItems));

            if(Direction!=ItemDirection.Default)
                switch (Direction)
                {
                    case ItemDirection.Descending:
                        paramParts.Add("r=d");
                        break;
                    case ItemDirection.Ascending:
                        paramParts.Add("r=o");
                        break;
                }

            paramParts.Add(string.Format("ck={0}", currentTime.ConvertToUnixTimestamp()));
            return String.Join("&",paramParts.ToArray());
        }
    }

    public enum ItemDirection
    { 
        Default,
        Descending,
        Ascending
    }
}<commit_msg>Added Exclude parameter<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeClimber.GoogleReaderConnector.JsonHelpers;

namespace CodeClimber.GoogleReaderConnector
{
    public class ReaderParameters
    {
        public DateTime FromDate { get; set; }
        public int MaxItems { get; set; }
        public ItemDirection Direction { get; set; }
        public string Client { get; set; }
        public IList<string> Exclude { get; set; }

        public ReaderParameters()
        {
            Exclude = new List<string>();
        }

        public string MakeQueryString()
        {
            return MakeQueryString(DateTime.Now);
        }

        public string MakeQueryString(DateTime currentTime)
        {
            List<String> paramParts = new List<string>();
            if (FromDate != DateTime.MinValue)
                paramParts.Add(string.Format("ot={0}", FromDate.ConvertToUnixTimestamp()));

            if (!String.IsNullOrEmpty(Client))
                paramParts.Add(string.Format("client={0}", Client));

            if(MaxItems!=0)
                paramParts.Add(string.Format("n={0}", MaxItems));

            if(Direction!=ItemDirection.Default)
                switch (Direction)
                {
                    case ItemDirection.Descending:
                        paramParts.Add("r=d");
                        break;
                    case ItemDirection.Ascending:
                        paramParts.Add("r=o");
                        break;
                }

            if(Exclude.Count>0)
                foreach (var feedId in Exclude)
                {
                    paramParts.Add(string.Format("xt={0}", feedId));
                }

            paramParts.Add(string.Format("ck={0}", currentTime.ConvertToUnixTimestamp()));
            return String.Join("&",paramParts.ToArray());
        }
    }

    public enum ItemDirection
    { 
        Default,
        Descending,
        Ascending
    }
}
{'fraction_non_alphanumeric': 0.10407608695652174, 'fraction_numerical': 0.003260869565217391, 'mean_word_length': 1.7368029739776951, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, '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': '3401624', 'n_tokens_mistral': 946, 'n_tokens_neox': 903, 'n_words': 182}