コード例 #1
0
        private Task<MailChimpServiceResponse<Email>> SubscribeAsync(string email, string listId, MergeVariables mergeVars, string emailType, bool doubleOptIn, bool updateExisting, bool replaceInterests, bool sendWelcome)
        {
            var url = Urls.List + "/subscribe.json";

            var subscriber = new Subscriber
            {
                ListId = listId,
                Email = new Email { EmailValue = email },
                MergeVars = mergeVars,
                EmailType = emailType,
                DoubleOptIn = doubleOptIn,
                UpdateExisting = updateExisting,
                ReplaceInterests = replaceInterests,
                SendWelcome = sendWelcome
            };

            return Execute<Email>(url, subscriber);
        }
コード例 #2
0
 public MailChimpServiceResponse<Email> Subscribe(string email, string listId, MergeVariables mergeVars, string emailType, bool doubleOptIn, bool updateExisting, bool replaceInterests, bool sendWelcome)
 {
     return WaitForServiceResponse(SubscribeAsync(email, listId, mergeVars, emailType, doubleOptIn, updateExisting, replaceInterests, sendWelcome));
 }