public void GetLocationsForList_Successful() { // Arrange MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey); ListResult lists = mc.GetLists(); // For each list foreach (var list in lists.Data) { Debug.WriteLine("Information for " + list.Name); // Get the location data for each list: List <SubscriberLocation> locations = mc.GetLocationsForList(list.Id); // Write out each of the locations: foreach (var location in locations) { Debug.WriteLine(string.Format("Country: {0} - {2} users, accounts for {1}% of list subscribers", location.Country, location.Percent, location.Total)); } } }
public void GetLocationsForList_Successful() { // Arrange MailChimpManager mc = new MailChimpManager(TestGlobal.Test_APIKey); ListResult lists = mc.GetLists(); // For each list foreach(var list in lists.Data) { Debug.WriteLine("Information for " + list.Name); // Get the location data for each list: List<SubscriberLocation> locations = mc.GetLocationsForList(list.Id); // Write out each of the locations: foreach(var location in locations) { Debug.WriteLine("Country: {0} - {2} users, accounts for {1}% of list subscribers", location.Country, location.Percent, location.Total); } } }