<commit_before>﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net;

namespace MultiMiner.Coinchoose.Api
{
    public static class ApiContext
    {
        public static List<CoinInformation> GetCoinInformation()
        {
            WebClient client = new WebClient();
            string jsonString = client.DownloadString("http://www.coinchoose.com/api.php");
            JArray jsonArray = JArray.Parse(jsonString);

            List<CoinInformation> result = new List<CoinInformation>();

            foreach (JToken jToken in jsonArray)
            {
                CoinInformation coinInformation = new CoinInformation();

                coinInformation.PopulateFromJson(jToken);

                result.Add(coinInformation);
            }

            return result;
        }
    }
}<commit_msg>Add a specific user-agent to CoinChoose.com requests<commit_after>﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net;

namespace MultiMiner.Coinchoose.Api
{
    public static class ApiContext
    {
        public static List<CoinInformation> GetCoinInformation()
        {
            WebClient client = new WebClient();
            const string userAgent = "MultiMiner/V1";
            client.Headers.Add("user-agent", userAgent);

            string jsonString = client.DownloadString("http://www.coinchoose.com/api.php");
            JArray jsonArray = JArray.Parse(jsonString);

            List<CoinInformation> result = new List<CoinInformation>();

            foreach (JToken jToken in jsonArray)
            {
                CoinInformation coinInformation = new CoinInformation();
                coinInformation.PopulateFromJson(jToken);
                result.Add(coinInformation);
            }

            return result;
        }
    }
}
{'fraction_non_alphanumeric': 0.08780487804878048, 'fraction_numerical': 0.0005420054200542005, 'mean_word_length': 2.2788632326820606, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6068751', 'n_tokens_mistral': 481, 'n_tokens_neox': 460, 'n_words': 102}