<commit_before>﻿using Newtonsoft.Json.Linq;
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace ClientApi
{
    class Program
    {
        private static string _serviceUrl = "http://server/Produce/api/v1/client/";                    // Infiniti Produce url
        private static string _projectGroupGuid = "f88d902f-3023-4586-b589-28356ec5925e";              // Publish id of the form. Retrieve from Manage
        private static string _projectGroupGuid_AnswerLabels = "74f3d62e-b2ad-4934-9b08-2feaf499c575"; // Sample form available on github 'Generate-AnswerLabels (NamedValuePairs)' 
        private static string _projectGroupGuid_ProvidedData = "597ec154-d49c-421b-9232-a385782daae6"; // Sample form available on github 'Generate-ProvidedData (XML, JSON, CSV)' 

        private static string _demoUsername = "admin";                                                 // User that the generation will run as
        private static string _demoPassword = "<PASSWORD>";
        private static string _demoUserGuid = "cfaacf2c-a6c1-41e6-b6e0-3646da572904";                  // Hardwired here but can be sourced from login response

        static void Main(string[] args)
        {
            Task.Run(async () => await MainAsync(args)).GetAwaiter().GetResult();
        }

        static async Task MainAsync(string[] args)
        {
            HttpClient client = null;

            //Login
            client = await GetFormsAuthenticatedClient();
            //client = await GetWindowsAuthenticatedClient();

            //Generate
            //await GenerateWithNoValues(client, _projectGroupGuid);
            //await GenerateWithAnswerLabels(client, _projectGroupGuid_AnswerLabels);
            //await GenerateWithProvidedData(client, _projectGroupGuid_ProvidedData);
            //await GenerateWithAnswerFile(client, _projectGroupGuid_ProvidedData);
            //await GenerateWithDelayedSchedule(client, _projectGroupGuid);
            //await GenerateWithWorkflow(client, _projectGroupGuid);
            //await GenerateWithPollingAndDownload(client, _projectGroupGuid);
        }

        static async Task<HttpClient> GetFormsAuthenticatedClient()
        {
            HttpClient client = new HttpClient();<commit_msg>Users/simo.passfield/docco expansion (#15)<commit_after>﻿using Newtonsoft.Json.Linq;
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace ClientApi
{
    class Program
    {
        private static string _serviceUrl = "http://server/Produce/api/v1/client/";                    // Infiniti Produce url
        private static string _projectGroupGuid = "f88d902f-3023-4586-b589-28356ec5925e";              // Publish id of the form. Retrieve from Manage
        private static string _projectGroupGuid_AnswerLabels = "74f3d62e-b2ad-4934-9b08-2feaf499c575"; // Sample form available on github 'Generate-AnswerLabels (NamedValuePairs)' 
        private static string _projectGroupGuid_ProvidedData = "597ec154-d49c-421b-9232-a385782daae6"; // Sample form available on github 'Generate-ProvidedData (XML, JSON, CSV)' 

        private static string _demoUsername = "DemoUser";                                              // User that the clientApi will run as
        private static string _demoPassword = "<<PASSWORD>>";

        static void Main(string[] args)
        {
            Task.Run(async () => await MainAsync(args)).GetAwaiter().GetResult();
        }

        static async Task MainAsync(string[] args)
        {
            HttpClient client = null;

            //Login
            client = await GetFormsAuthenticatedClient();
            //client = await GetWindowsAuthenticatedClient();

            //Generate
            //await GenerateWithNoValues(client, _projectGroupGuid);
            //await GenerateWithAnswerLabels(client, _projectGroupGuid_AnswerLabels);
            //await GenerateWithProvidedData(client, _projectGroupGuid_ProvidedData);
            //await GenerateWithAnswerFile(client, _projectGroupGuid_ProvidedData);
            //await GenerateWithDelayedSchedule(client, _projectGroupGuid);
            //await GenerateWithWorkflow(client, _projectGroupGuid);
            //await GenerateWithPollingAndDownload(client, _projectGroupGuid);
        }

        static async Task<HttpClient> GetFormsAuthenticatedClient()
        {
            HttpClient client = new HttpClient();
{'fraction_non_alphanumeric': 0.08595859585958596, 'fraction_numerical': 0.0351035103510351, 'mean_word_length': 2.6021069692058347, 'pattern_counts': {'":': 0, '<': 8, '<?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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1193230', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1160, 'n_words': 275}