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


C# MailChimpManager.GetCampaigns方法代码示例

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


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

示例1: GetCampaigns_Successful

        public void GetCampaigns_Successful()
        {
            //  Arrange
            MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);

            //  Act
            CampaignListResult details = mc.GetCampaigns();

            //  Assert
            Assert.IsNotNull(details.Data);
        }
开发者ID:penfold,项目名称:MailChimp.NET,代码行数:11,代码来源:CampaignTests.cs

示例2: ReplicateCampaign_Successful

        public void ReplicateCampaign_Successful()
        {
            //  Arrange
            MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);
            CampaignListResult cl = mc.GetCampaigns();
            string campaignId = cl.Data[0].Id;

            //  Act
            Campaign details = mc.ReplicateCampaign(campaignId);

            //  Assert
            Assert.IsNotNull(details);
        }
开发者ID:penfold,项目名称:MailChimp.NET,代码行数:13,代码来源:CampaignTests.cs

示例3: CampaignDelete_Successful

 public void CampaignDelete_Successful()
 {
     // Arrange
     MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);
     CampaignListResult campaigns = mc.GetCampaigns();
     //Act
     CampaignActionResult result = mc.DeleteCampaign(campaigns.Data[0].Id);
     // Assert
     Assert.IsTrue(result.Complete);
 }
开发者ID:RomeoQNgo,项目名称:MailChimp.NET,代码行数:10,代码来源:CampaignTests.cs

示例4: GetCampaigns

        static void GetCampaigns(MailChimpManager mailChimp)
        {
            var result = mailChimp.GetCampaigns();
            Console.WriteLine("Got {0} campaigns", result.Campaigns != null ? result.Campaigns.Count : 0);

            var first = result.Campaigns != null ? result.Campaigns.FirstOrDefault() : null;
            if (first != null)
            {
                // just to demonstrate usage, data would already be present in collection result
                first = mailChimp.GetCampaign(first.Id);
                Console.WriteLine("First campaign title: {0}", first.Settings.Title);
            }
        }
开发者ID:ebol2000,项目名称:MailChimp.NET,代码行数:13,代码来源:Program.cs

示例5: 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

示例6: SendCampaign

        private static void SendCampaign()
        {
            MailChimpManager mc = new MailChimpManager("e20533551f21cbc6b07c76e570dc33c4-us11");
            CampaignFilter filter = new CampaignFilter();
            filter.Title = "Email template testing...";

            var cam = mc.GetCampaigns(filter);

            var result = mc.SendCampaign(cam.Data[0].Id);
        }
开发者ID:twinkle023020,项目名称:MailChimpSampleCode,代码行数:10,代码来源:Program.cs

示例7: GetCampaignId

        private static void GetCampaignId()
        {
            MailChimpManager mc = new MailChimpManager("e20533551f21cbc6b07c76e570dc33c4-us11");
            CampaignFilter filter = new CampaignFilter();
            filter.Title = "Testing uing anchor tag";

            var cam = mc.GetCampaigns(filter);
        }
开发者ID:twinkle023020,项目名称:MailChimpSampleCode,代码行数:8,代码来源:Program.cs

示例8: 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

示例9: GetCampaignTemplateContent_Successful

 public void GetCampaignTemplateContent_Successful()
 {
     // Arrange
     var mc = new MailChimpManager(TestGlobal.Test_APIKey);
     CampaignListResult campaigns = mc.GetCampaigns();
     //Act
     var result = mc.GetCampaignTemplateContent(campaigns.Data[0].Id);
     // Assert
     Assert.IsTrue(result.Count > 0);
 }
开发者ID:erpframework,项目名称:MailChimp.NET,代码行数:10,代码来源:CampaignTests.cs


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