<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using MailChimp.Api.Net.Domain.Campaigns;
using MailChimp.Api.Net.Enum;
using MailChimp.Api.Net.Helper;
using Newtonsoft.Json;

namespace MailChimp.Api.Net.Services.Campaigns
{
    // =============================================================================================
    // AUTHOR      : <NAME>
    // PURPOSE     : Manage the HTML, plain-text, and template content for your MailChimp campaigns
    // =============================================================================================

    internal class MCCampaignContent
    {
         ///<summary>
         ///Get campaign content
         ///</summary>
        
        internal async Task<RootContent> GetCampaignContentAsync(string campaign_id)
        {
            string endpoint = Authenticate.EndPoint(TargetTypes.campaigns, SubTargetType.content, SubTargetType.not_applicable, campaign_id);

            return await BaseOperation.GetAsync<RootContent>(endpoint);
        }

    }
}
<commit_msg>Set campaign Content<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using MailChimp.Api.Net.Domain.Campaigns;
using MailChimp.Api.Net.Enum;
using MailChimp.Api.Net.Helper;
using Newtonsoft.Json;

namespace MailChimp.Api.Net.Services.Campaigns
{
    // =============================================================================================
    // AUTHOR      : <NAME>
    // PURPOSE     : Manage the HTML, plain-text, and template content for your MailChimp campaigns
    // =============================================================================================

    internal class MCCampaignContent
    {
        ///<summary>
        ///Get campaign content
        ///</summary>
        internal async Task<RootContent> GetCampaignContentAsync(string campaign_id)
        {
            string endpoint = Authenticate.EndPoint(TargetTypes.campaigns, SubTargetType.content, SubTargetType.not_applicable, campaign_id);

            return await BaseOperation.GetAsync<RootContent>(endpoint);
        }

        ///<summary>
        ///Set campaign content
        ///</summary>
        internal async Task<dynamic> SetCampaignContentAsync(string campaign_id, ContentSetting setting, ContentTemplate contentTemplate)
        {
            string endpoint = Authenticate.EndPoint(TargetTypes.campaigns, SubTargetType.content, SubTargetType.not_applicable, campaign_id);

            RootContent content = new RootContent()
            {
                template = contentTemplate,
                plain_text = setting.plain_text,
                html =  setting.html,
                url = setting.url
            };

            return await BaseOperation.PutAsync<RootContent>(endpoint, content);
        }

    }
}

{'fraction_non_alphanumeric': 0.2068733153638814, 'fraction_numerical': 0.0, 'mean_word_length': 3.117891816920943, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '5524063', 'n_tokens_mistral': 743, 'n_tokens_neox': 706, 'n_words': 154}