当前位置: 首页>>代码示例>>C#>>正文


C# MailChimpManager.UpdateCampaign方法代码示例

本文整理汇总了C#中MailChimpManager.UpdateCampaign方法的典型用法代码示例。如果您正苦于以下问题:C# MailChimpManager.UpdateCampaign方法的具体用法?C# MailChimpManager.UpdateCampaign怎么用?C# MailChimpManager.UpdateCampaign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MailChimpManager的用法示例。


在下文中一共展示了MailChimpManager.UpdateCampaign方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateCampaign

        private static void UpdateCampaign()
        {
            // Arrange
            MailChimpManager mc = new MailChimpManager("e20533551f21cbc6b07c76e570dc33c4-us11");
            CampaignFilter filter = new CampaignFilter();
            filter.Title = "test123";
            var cam = mc.GetCampaigns(filter);

            CampaignCreateContent content = new CampaignCreateContent();
            string HTML = @"
            <meta charset='utf-8'>
            <title></title>

            <table width='600' border='0' align='center' cellpadding='0' cellspacing='0' style='background-color: #f0eeee; padding: 20px;'>
            <tbody><tr>
            <td>
                <table width='600' border='0' align='center' cellpadding='0' cellspacing='0'>
                    <tbody><tr>
                        <td style='background-color: #ffa900; padding: 10px 30px;'>
                            <img src='http://localhost:9780/UploadFile/media/e4ed06c6-5445-412e-8f6a-a434e61bee1b-logo.png'></td>
                    </tr>
                    <tr>
                        <td>
                            <img src='http://localhost:9780/UploadFile/media/4b5335ba-bf57-41e9-8092-a1c1d774d837-email-banner-old.jpg'></td>
                    </tr>
                    <tr>
                        <td style='padding: 20px 30px; text-align: left; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 16px; background-color: #fff;'>

                           <!-- <p>
                                <strong>Event Details</strong><br />
                                <br />
                                Sun-Sat, November 2-8, 10:30 AM - 3:30 P.M. Brighton Gardens of Washington Township 6800 Paragon Road, Dayton, IL 45459
                            </p>
                            <p>Have questions about the event? Please contact us at <strong>888-5555-7777.</strong> We look forward to seeing you there!</p>
                            <br />
                            <p>The desme Team</p>-->
                            <div ng-bind-html='model.Description' class='ng-binding'><p><strong>Dear *|FNAME|*,</strong></p>

            <p>Thank you for registering for the Taste of Chicago event at the Brighton Gardens of Washington Township!</p>

            <p><strong>Event Details</strong><br>
            <br>
            Sun-Sat, November 2-8, 10:30 AM - 3:30 P.M. Brighton Gardens of Washington Township 6800 Paragon Road, Dayton, IL 45459</p>

            <p>Have questions about the event? Please contact us at <strong>888-5555-7777.</strong> We look forward to seeing you there!&nbsp;</p>

            <p><a href='*|OFFERPURL|*/*|ACCESSCODE|*' target='_blank'>Click here for subscribe to delwar</a></p>

            <p>The desme Team</p>

            <p>&nbsp;</p>
            </div>
                        </td>
                    </tr>

                </tbody></table>
            </td>
            </tr>
            </tbody></table>";

            var result = mc.UpdateCampaign(cam.Data[0].Id, "content", new { html = HTML });
        }
开发者ID:twinkle023020,项目名称:MailChimpSampleCode,代码行数:62,代码来源:Program.cs

示例2: CampaignUpdate_Successful

 public void CampaignUpdate_Successful()
 {
     // Arrange
     MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);
     CampaignListResult campaigns = mc.GetCampaigns();
     //Act
     var result = mc.UpdateCampaign(campaigns.Data[0].Id, "options", new { title = "Different Campaign Title" });
     // Assert
     Assert.IsTrue(result.Errors.Count == 0);
 }
开发者ID:rafaelbac,项目名称:MailChimp.NET,代码行数:10,代码来源:CampaignTests.cs


注:本文中的MailChimpManager.UpdateCampaign方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。