Created
October 10, 2017 18:03
-
-
Save jesslilly/f4253b1377c755a2ad59565055bae219 to your computer and use it in GitHub Desktop.
Get all list names and list IDs from Campaign Monitor (createsend_dotnet)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void PrintListIds() | |
{ | |
PrintListIds("key", "id"); | |
PrintListIds("key", "id"); | |
PrintListIds("key", "id"); | |
} | |
private static void PrintListIds(string apiKey, string clientId) | |
{ | |
var auth = new ApiKeyAuthenticationDetails(apiKey); | |
var client = new Client(auth, clientId); | |
var lists = client.Lists(); | |
foreach (var list in lists) | |
{ | |
Console.WriteLine($"{list.Name} ID: {list.ListID}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment