Ejemplo n.º 1
0
    public void campaign_create()
    {
        MCCampaignOpts opts = new MCCampaignOpts();
            opts.list_id = "YOUR_LIST_ID";
            opts.subject = "Subject A!";
            opts.from_email = "*****@*****.**";
            opts.from_name = "MailChimp!";

            opts.template_id = 3;

            MCCampaignContent content = new MCCampaignContent();
            content.text = "text content rules! *|UNSUB|*";
        /**
            content.html_header = "header stuffs";
            content.html_footer = "footer sutffs *|UNSUB|*";
            content.html_main = "main main main main main main";
            content.text = "text content rules! *|UNSUB|*";
        **/

            opts.tracking = new MCCampaignTracking();
            opts.tracking.opens = true;
            opts.tracking.html_clicks = false;
            opts.tracking.text_clicks = false;

            opts.authenticate = false;

            opts.analytics = new XmlRpcStruct();
            opts.analytics.Add("google", "XXXXX");

            opts.title = "Title B!";

            MCCampaignTypeOpts type_opts = new MCCampaignTypeOpts();
            type_opts.url = "http://mailchimp.com/blog/rss/";

            string new_id = this.api.campaignCreate("rss",opts,content, new MCSegmentOpts(), type_opts);
            Console.WriteLine("New Campaign ID: " + new_id);
    }
 public string campaignCreate(string type, MCCampaignOpts options, MCCampaignContent content, MCSegmentOpts segment_opts, MCCampaignTypeOpts type_opts)
 {
     return this.api.campaignCreate(this.apikey, type, options, content, segment_opts, type_opts);
 }
 public string campaignCreate(string type, MCCampaignOpts options, MCCampaignContent content, MCSegmentOpts segment_opts)
 {
     MCCampaignTypeOpts type_opts = new MCCampaignTypeOpts();
     return this.campaignCreate(type, options, content, segment_opts, type_opts);
 }
 public bool campaignUpdate(string cid, string name, MCCampaignTypeOpts val)
 {
     return this.api.campaignUpdateMCTO(this.apikey, cid, name, val);
 }
 public bool campaignUpdate(string cid, string name, MCCampaignTypeOpts val)
 {
     return(this.api.campaignUpdateMCTO(this.apikey, cid, name, val));
 }
 public string campaignCreate(string type, MCCampaignOpts options, MCCampaignContent content, MCSegmentOpts segment_opts, MCCampaignTypeOpts type_opts)
 {
     return(this.api.campaignCreate(this.apikey, type, options, content, segment_opts, type_opts));
 }