本文整理汇总了C#中MailChimpManager.GetAllMembersForList方法的典型用法代码示例。如果您正苦于以下问题:C# MailChimpManager.GetAllMembersForList方法的具体用法?C# MailChimpManager.GetAllMembersForList怎么用?C# MailChimpManager.GetAllMembersForList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MailChimpManager
的用法示例。
在下文中一共展示了MailChimpManager.GetAllMembersForList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMemberActivity_Successful
public void GetMemberActivity_Successful()
{
// Arrange
MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);
ListResult lists = mc.GetLists();
Assert.IsNotNull(lists.Data);
Assert.IsTrue(lists.Data.Any());
MembersResult members = mc.GetAllMembersForList(lists.Data[0].Id);
Assert.IsNotNull(members.Data);
Assert.IsTrue(members.Data.Any());
List<EmailParameter> memberEmails = new List<EmailParameter>();
foreach (MemberInfo member in members.Data)
{
memberEmails.Add(new EmailParameter() { Email = member.Email });
}
// Act
MemberActivityResult results = mc.GetMemberActivity(lists.Data[0].Id, memberEmails);
// Assert
Assert.IsNotNull(results);
Assert.IsTrue(results.Data.Any());
}
示例2: GetAllMembersForList_Successful
public void GetAllMembersForList_Successful()
{
// Arrange
MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey);
ListResult lists = mc.GetLists();
// For each list
foreach(var list in lists.Data)
{
// Write out the list name:
Debug.WriteLine("Users for the list " + list.Name);
// Get the first 100 members of each list:
MembersResult results = mc.GetAllMembersForList(list.Id, "subscribed", 0, 100);
// Write out each member's email address:
foreach(var member in results.Data)
{
Debug.WriteLine(member.Email);
}
}
}