static void Test_AddSubscriberToList()
        {
            string NewListName         = "CSharpSDKAddSubscriberToList";
            string SubscriberTestEmail = "*****@*****.**";

            Console.WriteLine("--- Testing AddSubscriberToList ---");
            ET_Client myclient = new ET_Client();

            Console.WriteLine("\n Create List");
            ET_List postList = new ET_List();

            postList.AuthStub = myclient;
            postList.ListName = NewListName;
            PostReturn prList = postList.Post();

            if (prList.Status && prList.Results.Length > 0)
            {
                int newListID = prList.Results[0].Object.ID;

                Console.WriteLine("\n Create Subscriber on List");
                FuelReturn hrAddSub = myclient.AddSubscribersToList(SubscriberTestEmail, new List <int>()
                {
                    newListID
                });
                Console.WriteLine("Helper Status: " + hrAddSub.Status.ToString());
                Console.WriteLine("Message: " + hrAddSub.Message.ToString());
                Console.WriteLine("Code: " + hrAddSub.Code.ToString());

                Console.WriteLine("\n Retrieve all Subscribers on the List");
                ET_List_Subscriber getListSub = new ET_List_Subscriber();
                getListSub.AuthStub     = myclient;
                getListSub.Props        = new string[] { "ObjectID", "SubscriberKey", "CreatedDate", "Client.ID", "Client.PartnerClientKey", "ListID", "Status" };
                getListSub.SearchFilter = new SimpleFilterPart()
                {
                    Property = "ListID", SimpleOperator = SimpleOperators.equals, Value = new string[] { newListID.ToString() }
                };
                GetReturn getResponse = getListSub.Get();
                Console.WriteLine("Get Status: " + getResponse.Status.ToString());
                Console.WriteLine("Message: " + getResponse.Message.ToString());
                Console.WriteLine("Code: " + getResponse.Code.ToString());
                Console.WriteLine("Results Length: " + getResponse.Results.Length);
                foreach (ET_List_Subscriber ResultListSub in getResponse.Results)
                {
                    Console.WriteLine("--ListID: " + ResultListSub.ListID + ", SubscriberKey(EmailAddress): " + ResultListSub.SubscriberKey);
                }

                Console.WriteLine("\n Delete List");
                postList.ID = newListID;
                DeleteReturn drList = postList.Delete();
                Console.WriteLine("Delete Status: " + drList.Status.ToString());
            }
        }
        static void TestET_ListSubscriber()
        {
            var newListName         = "CSharpSDKListSubscriber";
            var subscriberTestEmail = "*****@*****.**";

            Console.WriteLine("--- Testing ListSubscriber ---");
            var myclient = new ET_Client();

            Console.WriteLine("\n Create List");
            var postList = new ET_List
            {
                AuthStub = myclient,
                ListName = newListName,
            };
            var prList = postList.Post();

            if (prList.Status && prList.Results.Length > 0)
            {
                var newListID = prList.Results[0].Object.ID;

                Console.WriteLine("\n Create Subscriber on List");
                var postSub = new ET_Subscriber
                {
                    Lists = new[] { new ET_SubscriberList {
                                        ID = newListID
                                    } },
                    AuthStub     = myclient,
                    EmailAddress = subscriberTestEmail,
                    Attributes   = new[] { new ET_ProfileAttribute {
                                               Name = "First Name", Value = "ExactTarget Example"
                                           } },
                };
                var postResponse = postSub.Post();
                Console.WriteLine("Post Status: " + postResponse.Status.ToString());
                Console.WriteLine("Message: " + postResponse.Message);
                Console.WriteLine("Code: " + postResponse.Code.ToString());
                Console.WriteLine("Results Length: " + postResponse.Results.Length);

                if (!postResponse.Status)
                {
                    if (postResponse.Results.Length > 0 && postResponse.Results[0].ErrorCode == 12014)
                    {
                        // If the subscriber already exists in the account then we need to do an update.
                        // Update Subscriber On List
                        Console.WriteLine("\n Update Subscriber to add to List");
                        PatchReturn patchResponse = postSub.Patch();
                        Console.WriteLine("Post Status: " + patchResponse.Status.ToString());
                        Console.WriteLine("Message: " + patchResponse.Message);
                        Console.WriteLine("Code: " + patchResponse.Code.ToString());
                        Console.WriteLine("Results Length: " + patchResponse.Results.Length);
                    }
                }

                Console.WriteLine("\n Retrieve all Subscribers on the List");
                var getListSub = new ET_List_Subscriber
                {
                    AuthStub     = myclient,
                    Props        = new[] { "ObjectID", "SubscriberKey", "CreatedDate", "Client.ID", "Client.PartnerClientKey", "ListID", "Status" },
                    SearchFilter = new SimpleFilterPart {
                        Property = "ListID", SimpleOperator = SimpleOperators.equals, Value = new[] { newListID.ToString() }
                    },
                };
                var getResponse = getListSub.Get();
                Console.WriteLine("Get Status: " + getResponse.Status.ToString());
                Console.WriteLine("Message: " + getResponse.Message);
                Console.WriteLine("Code: " + getResponse.Code.ToString());
                Console.WriteLine("Results Length: " + getResponse.Results.Length);
                foreach (ET_List_Subscriber resultListSub in getResponse.Results)
                {
                    Console.WriteLine("--ListID: " + resultListSub.ID + ", SubscriberKey(EmailAddress): " + resultListSub.SubscriberKey);
                }
            }

#if false
            var filterDate = new DateTime(2013, 1, 15, 13, 0, 0);

            Console.WriteLine("Retrieve Filtered ListSubscribers with GetMoreResults");
            var oe2 = new ET_List_Subscriber
            {
                AuthStub     = myclient,
                SearchFilter = new SimpleFilterPart {
                    Property = "EventDate", SimpleOperator = SimpleOperators.greaterThan, DateValue = new [] { filterDate }
                },
                Props = new [] { "ObjectID", "SubscriberKey", "CreatedDate", "Client.ID", "Client.PartnerClientKey", "ListID", "Status" },
            };
            var oeGet = oe2.Get();

            Console.WriteLine("Get Status: " + oeGet.Status.ToString());
            Console.WriteLine("Message: " + oeGet.Message);
            Console.WriteLine("Code: " + oeGet.Code.ToString());
            Console.WriteLine("Results Length: " + oeGet.Results.Length);
            Console.WriteLine("MoreResults: " + oeGet.MoreResults.ToString());
            // Since this could potentially return a large number of results, we do not want to print the results
            //foreach (ET_ListSubscriber ListSubscriber in oeGet.Results)
            //    Console.WriteLine("SubscriberKey: " + ListSubscriber.SubscriberKey + ", EventDate: " + ListSubscriber.EventDate.ToString());

            while (oeGet.MoreResults)
            {
                Console.WriteLine("Continue Retrieve Filtered ListSubscribers with GetMoreResults");
                oeGet = oe2.GetMoreResults();
                Console.WriteLine("Get Status: " + oeGet.Status.ToString());
                Console.WriteLine("Message: " + oeGet.Message);
                Console.WriteLine("Code: " + oeGet.Code.ToString());
                Console.WriteLine("Results Length: " + oeGet.Results.Length);
                Console.WriteLine("MoreResults: " + oeGet.MoreResults.ToString());
            }

            // The following request could potentially bring back large amounts of data if run against a production account
            Console.WriteLine("Retrieve All ListSubscribers with GetMoreResults");
            var oe3 = new ET_List_Subscriber
            {
                AuthStub = myclient,
                Props    = new string[] { "SendID", "SubscriberKey", "EventDate", "Client.ID", "EventType", "BatchID", "TriggeredSendDefinitionObjectID", "PartnerKey" },
            };
            var oeGetAll = oe3.Get();

            Console.WriteLine("Get Status: " + oeGetAll.Status.ToString());
            Console.WriteLine("Message: " + oeGetAll.Message);
            Console.WriteLine("Code: " + oeGetAll.Code.ToString());
            Console.WriteLine("Results Length: " + oeGetAll.Results.Length);
            Console.WriteLine("MoreResults: " + oeGetAll.MoreResults.ToString());
            // Since this could potentially return a large number of results, we do not want to print the results
            foreach (ET_List_Subscriber ListSubscriber in oeGetAll.Results)
            {
                Console.WriteLine("SubscriberKey: " + ListSubscriber.SubscriberKey + ", EventDate: " + ListSubscriber.EventDate.ToString());
            }

            while (oeGetAll.MoreResults)
            {
                oeGetAll = oe3.GetMoreResults();
                Console.WriteLine("Get Status: " + oeGetAll.Status.ToString());
                Console.WriteLine("Message: " + oeGetAll.Message);
                Console.WriteLine("Code: " + oeGetAll.Code.ToString());
                Console.WriteLine("Results Length: " + oeGetAll.Results.Length);
                Console.WriteLine("MoreResults: " + oeGetAll.MoreResults.ToString());
            }
#endif
        }
Beispiel #3
0
        private void RetrieveSubscribers()
        {
            List <int> lstListIDs = new List <int>();

            lstListIDs.Add(17942355);
            lstListIDs.Add(17942350);
            lstListIDs.Add(17942353);
            lstListIDs.Add(17942356);
            lstListIDs.Add(17942359);
            lstListIDs.Add(17942361);

            dtSubscribers = new DataTable();
            dtSubscribers.Columns.Add("SubscriberID");
            dtSubscribers.Columns.Add("EmailAddress");
            dtSubscribers.Columns.Add("ListID");
            dtSubscribers.Columns.Add("DateAdded");
            dtSubscribers.Columns.Add("DateModified");

            NameValueCollection parameters = new NameValueCollection();

            parameters.Add("clientId", "3uqagf2nrt2mm27q3rt45ett");
            parameters.Add("clientSecret", "D5wxtEx6UGNVxgkbyrruJhQV");

            ET_Client myclient = new ET_Client(parameters);
            ET_List   postList = new ET_List();


            postList.AuthStub = myclient;
            PostReturn prList = postList.Post();

            if (prList.Status && prList.Results.Length > 0)
            {
                ET_List_Subscriber getListSub = new ET_List_Subscriber();
                getListSub.AuthStub = myclient;
                //getListSub.Props = new string[] { "ObjectID", "SubscriberKey", "CreatedDate", "Client.ID", "Client.PartnerClientKey", "ListID", "Status" };
                //getListSub.SearchFilter = new SimpleFilterPart() { Property = "ListID", SimpleOperator = SimpleOperators.equals, Value = new string[] { newListID.ToString() } };
                GetReturn getResponse = getListSub.Get();
                foreach (int newListID in lstListIDs)
                {
                    try
                    {
                        getListSub.SearchFilter = new SimpleFilterPart()
                        {
                            Property = "ListID", SimpleOperator = SimpleOperators.equals, Value = new string[] { newListID.ToString() }
                        };
                        GetReturn response = getListSub.Get();
                        foreach (ET_List_Subscriber subscriber in response.Results)
                        {
                            try
                            {
                                DataRow dr = dtSubscribers.NewRow();
                                dr["SubscriberID"] = subscriber.ID.ToString();
                                dr["ListID"]       = subscriber.ListID.ToString();
                                dr["EmailAddress"] = subscriber.SubscriberKey.ToString();
                                dr["DateAdded"]    = subscriber.CreatedDate.ToString();
                                dr["DateModified"] = subscriber.ModifiedDate.ToString();
                                dtSubscribers.Rows.Add(dr);
                            }
                            catch (Exception)
                            {
                            }
                        }
                    }
                    catch (Exception)
                    {
                    }
                }
            }

            if (dtSubscribers.Rows.Count > 0)
            {
                //Save All Subscribers to the database
                foreach (DataRow scribe in dtSubscribers.Rows)
                {
                    try
                    {
                        string spName           = "dbo.AddETSubscriber";
                        String ConnectionString = Sitecore.Configuration.Settings.GetConnectionString("custom");
                        if (!String.IsNullOrWhiteSpace(ConnectionString))
                        {
                            using (SqlConnection connection = new SqlConnection(ConnectionString))
                            {
                                using (SqlCommand command = new SqlCommand(spName, connection))
                                {
                                    command.CommandType = CommandType.StoredProcedure;
                                    connection.Open();

                                    command.Parameters.Add(new SqlParameter("@SubscriberID", scribe["SubscriberID"].ToString()));
                                    command.Parameters.Add(new SqlParameter("@ListID", scribe["ListID"].ToString()));
                                    command.Parameters.Add(new SqlParameter("@EmailAddress", scribe["EmailAddress"].ToString()));
                                    command.Parameters.Add(new SqlParameter("@DateSubscriptionAdded", scribe["DateAdded"].ToString()));
                                    command.Parameters.Add(new SqlParameter("@DateSubscriptionUpdated", scribe["DateModified"].ToString()));
                                    command.ExecuteNonQuery();
                                }
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
        static void TestET_List()
        {
            var myclient = new ET_Client();

            Console.WriteLine("--- Testing List ---");
            var myNewListID = 0;

            Console.WriteLine("\n Create List");
            var list = new ET_List
            {
                AuthStub    = myclient,
                ListName    = "C# SDK Rules!!",
                Description = "This is my SDK Created List",
                //FolderID = 1083760,
            };
            var postFR = list.Post();

            Console.WriteLine("Post Status: " + postFR.Status.ToString());
            Console.WriteLine("Message: " + postFR.Message);
            Console.WriteLine("Code: " + postFR.Code.ToString());
            Console.WriteLine("Results Length: " + postFR.Results.Length);

            if (postFR.Results.Length > 0)
            {
                myNewListID = postFR.Results[0].NewID;
            }

            if (myNewListID > 0)
            {
                Console.WriteLine("\n Retrieve newly create list");
                list.Props        = new[] { "ID", "ListName", "Description" };
                list.SearchFilter = new SimpleFilterPart {
                    Property = "ID", SimpleOperator = SimpleOperators.equals, Value = new[] { myNewListID.ToString() }
                };
                var getFR = list.Get();
                Console.WriteLine("Get Status: " + getFR.Status.ToString());
                Console.WriteLine("Message: " + getFR.Message);
                Console.WriteLine("Code: " + getFR.Code.ToString());
                Console.WriteLine("Results Length: " + getFR.Results.Length);
                foreach (ET_List ResultList in getFR.Results)
                {
                    Console.WriteLine("--ID: " + ResultList.ID + ", Name: " + ResultList.ListName + ", Description: " + ResultList.Description);
                }

                Console.WriteLine("\n Update list");
                var patchList = new ET_List
                {
                    ID          = myNewListID,
                    Description = "This is the new description",
                    AuthStub    = myclient,
                };
                var patchFR = patchList.Patch();
                Console.WriteLine("Patch Status: " + patchFR.Status.ToString());
                Console.WriteLine("Message: " + patchFR.Message);
                Console.WriteLine("Code: " + patchFR.Code.ToString());
                Console.WriteLine("Results Length: " + patchFR.Results.Length);

                Console.WriteLine("\n Retrieve List that should have description updated");
                list.Props        = new[] { "ID", "ListName", "Description" };
                list.SearchFilter = new SimpleFilterPart {
                    Property = "ID", SimpleOperator = SimpleOperators.equals, Value = new[] { myNewListID.ToString() }
                };
                getFR = list.Get();
                Console.WriteLine("Get Status: " + getFR.Status.ToString());
                Console.WriteLine("Message: " + getFR.Message);
                Console.WriteLine("Code: " + getFR.Code.ToString());
                Console.WriteLine("Results Length: " + getFR.Results.Length);
                foreach (ET_List ResultList in getFR.Results)
                {
                    Console.WriteLine("--ID: " + ResultList.ID + ", Name: " + ResultList.ListName + ", Description: " + ResultList.Description);
                }

                Console.WriteLine("\n Delete List");
                var delList = new ET_List
                {
                    ID       = myNewListID,
                    AuthStub = myclient,
                };
                var fr = delList.Delete();
                Console.WriteLine("Delete Status: " + fr.Status.ToString());
                Console.WriteLine("Message: " + fr.Message);
                Console.WriteLine("Code: " + fr.Code.ToString());
                Console.WriteLine("Results Length: " + fr.Results.Length);

                Console.WriteLine("\n Retrieve List to confirm deletion");
                list.Props        = new[] { "ID", "ListName", "Description" };
                list.SearchFilter = new SimpleFilterPart {
                    Property = "ID", SimpleOperator = SimpleOperators.equals, Value = new[] { myNewListID.ToString() }
                };
                getFR = list.Get();
                Console.WriteLine("Get Status: " + getFR.Status.ToString());
                Console.WriteLine("Message: " + getFR.Message);
                Console.WriteLine("Code: " + getFR.Code.ToString());
                Console.WriteLine("Results Length: " + getFR.Results.Length);
                foreach (ET_List ResultList in getFR.Results)
                {
                    Console.WriteLine("--ID: " + ResultList.ID + ", Name: " + ResultList.ListName + ", Description: " + ResultList.Description);
                }

                Console.WriteLine("\n Info List");
                var listInfo = new ET_List
                {
                    AuthStub = myclient
                };
                var info = listInfo.Info();
                Console.WriteLine("Info Status: " + info.Status.ToString());
                Console.WriteLine("Message: " + info.Message);
                Console.WriteLine("Code: " + info.Code.ToString());
                Console.WriteLine("Results Length: " + info.Results.Length);
                foreach (ET_PropertyDefinition def in info.Results)
                {
                    Console.WriteLine("--Name: " + def.Name + ", IsRetrievable: " + def.IsRetrievable.ToString());
                }
            }
        }
Beispiel #5
0
        static void TestET_List()
        {
            ET_Client myclient = new ET_Client();

            Console.WriteLine("--- Testing List ---");
            int MyNewListID = 0;

            Console.WriteLine("\n Create List");
            ET_List list = new ET_List();

            list.AuthStub    = myclient;
            list.ListName    = "C# SDK Rules!!";
            list.Description = "This is my SDK Created List";
            PostReturn postFR = list.Post();

            Console.WriteLine("Post Status: " + postFR.Status.ToString());
            Console.WriteLine("Message: " + postFR.Message.ToString());
            Console.WriteLine("Code: " + postFR.Code.ToString());
            Console.WriteLine("Results Length: " + postFR.Results.Length);

            if (postFR.Results.Length > 0)
            {
                MyNewListID = postFR.Results[0].NewID;
            }

            if (MyNewListID > 0)
            {
                Console.WriteLine("\n Retrieve newly create list");
                list.Props        = new string[] { "ID", "ListName", "Description" };
                list.SearchFilter = new SimpleFilterPart()
                {
                    Property = "ID", SimpleOperator = SimpleOperators.equals, Value = new String[] { MyNewListID.ToString() }
                };
                GetReturn getFR = list.Get();
                Console.WriteLine("Get Status: " + getFR.Status.ToString());
                Console.WriteLine("Message: " + getFR.Message.ToString());
                Console.WriteLine("Code: " + getFR.Code.ToString());
                Console.WriteLine("Results Length: " + getFR.Results.Length);
                foreach (ET_List ResultList in getFR.Results)
                {
                    Console.WriteLine("--ID: " + ResultList.ID + ", Name: " + ResultList.ListName + ", Description: " + ResultList.Description);
                }

                Console.WriteLine("\n Update list");
                ET_List patchList = new ET_List();
                patchList.ID          = MyNewListID;
                patchList.Description = "This is the new description";
                patchList.AuthStub    = myclient;
                FuelSDK.PatchReturn patchFR = patchList.Patch();
                Console.WriteLine("Patch Status: " + patchFR.Status.ToString());
                Console.WriteLine("Message: " + patchFR.Message.ToString());
                Console.WriteLine("Code: " + patchFR.Code.ToString());
                Console.WriteLine("Results Length: " + patchFR.Results.Length);

                Console.WriteLine("\n Retrieve List that should have description updated");
                list.Props        = new string[] { "ID", "ListName", "Description" };
                list.SearchFilter = new SimpleFilterPart()
                {
                    Property = "ID", SimpleOperator = SimpleOperators.equals, Value = new String[] { MyNewListID.ToString() }
                };
                getFR = list.Get();
                Console.WriteLine("Get Status: " + getFR.Status.ToString());
                Console.WriteLine("Message: " + getFR.Message.ToString());
                Console.WriteLine("Code: " + getFR.Code.ToString());
                Console.WriteLine("Results Length: " + getFR.Results.Length);
                foreach (ET_List ResultList in getFR.Results)
                {
                    Console.WriteLine("--ID: " + ResultList.ID + ", Name: " + ResultList.ListName + ", Description: " + ResultList.Description);
                }

                Console.WriteLine("\n Delete List");
                ET_List delList = new ET_List();
                delList.ID       = MyNewListID;
                delList.AuthStub = myclient;
                FuelSDK.DeleteReturn fr = delList.Delete();
                Console.WriteLine("Delete Status: " + fr.Status.ToString());
                Console.WriteLine("Message: " + fr.Message.ToString());
                Console.WriteLine("Code: " + fr.Code.ToString());
                Console.WriteLine("Results Length: " + fr.Results.Length);

                Console.WriteLine("\n Retrieve List to confirm deletion");
                list.Props        = new string[] { "ID", "ListName", "Description" };
                list.SearchFilter = new SimpleFilterPart()
                {
                    Property = "ID", SimpleOperator = SimpleOperators.equals, Value = new String[] { MyNewListID.ToString() }
                };
                getFR = list.Get();
                Console.WriteLine("Get Status: " + getFR.Status.ToString());
                Console.WriteLine("Message: " + getFR.Message.ToString());
                Console.WriteLine("Code: " + getFR.Code.ToString());
                Console.WriteLine("Results Length: " + getFR.Results.Length);
                foreach (ET_List ResultList in getFR.Results)
                {
                    Console.WriteLine("--ID: " + ResultList.ID + ", Name: " + ResultList.ListName + ", Description: " + ResultList.Description);
                }

                Console.WriteLine("\n Info List");
                ET_List listInfo = new ET_List();
                listInfo.AuthStub = myclient;
                InfoReturn info = listInfo.Info();
                Console.WriteLine("Info Status: " + info.Status.ToString());
                Console.WriteLine("Message: " + info.Message.ToString());
                Console.WriteLine("Code: " + info.Code.ToString());
                Console.WriteLine("Results Length: " + info.Results.Length);
                foreach (ET_PropertyDefinition def in info.Results)
                {
                    Console.WriteLine("--Name: " + def.Name + ", IsRetrievable: " + def.IsRetrievable.ToString());
                }
            }
        }
Beispiel #6
0
        static void TestET_ListSubscriber()
        {
            string NewListName         = "CSharpSDKListSubscriber";
            string SubscriberTestEmail = "*****@*****.**";

            Console.WriteLine("--- Testing ListSubscriber ---");
            ET_Client myclient = new ET_Client();

            Console.WriteLine("\n Create List");
            ET_List postList = new ET_List();

            postList.AuthStub = myclient;
            postList.ListName = NewListName;
            PostReturn prList = postList.Post();

            if (prList.Status && prList.Results.Length > 0)
            {
                int newListID = prList.Results[0].Object.ID;

                Console.WriteLine("\n Create Subscriber on List");
                ET_Subscriber postSub = new ET_Subscriber();
                postSub.Lists = new ET_SubscriberList[] { new ET_SubscriberList()
                                                          {
                                                              ID = newListID
                                                          } };
                postSub.AuthStub     = myclient;
                postSub.EmailAddress = SubscriberTestEmail;
                postSub.Attributes   = new FuelSDK.ET_ProfileAttribute[] { new ET_ProfileAttribute()
                                                                           {
                                                                               Name = "First Name", Value = "ExactTarget Example"
                                                                           } };
                PostReturn postResponse = postSub.Post();
                Console.WriteLine("Post Status: " + postResponse.Status.ToString());
                Console.WriteLine("Message: " + postResponse.Message.ToString());
                Console.WriteLine("Code: " + postResponse.Code.ToString());
                Console.WriteLine("Results Length: " + postResponse.Results.Length);


                if (!postResponse.Status)
                {
                    if (postResponse.Results.Length > 0 && postResponse.Results[0].ErrorCode == 12014)
                    {
                        // If the subscriber already exists in the account then we need to do an update.
                        //Update Subscriber On List
                        Console.WriteLine("\n Update Subscriber to add to List");
                        PatchReturn patchResponse = postSub.Patch();
                        Console.WriteLine("Post Status: " + patchResponse.Status.ToString());
                        Console.WriteLine("Message: " + patchResponse.Message.ToString());
                        Console.WriteLine("Code: " + patchResponse.Code.ToString());
                        Console.WriteLine("Results Length: " + patchResponse.Results.Length);
                    }
                }

                Console.WriteLine("\n Retrieve all Subscribers on the List");
                ET_List_Subscriber getListSub = new ET_List_Subscriber();
                getListSub.AuthStub     = myclient;
                getListSub.Props        = new string[] { "ObjectID", "SubscriberKey", "CreatedDate", "Client.ID", "Client.PartnerClientKey", "ListID", "Status" };
                getListSub.SearchFilter = new SimpleFilterPart()
                {
                    Property = "ListID", SimpleOperator = SimpleOperators.equals, Value = new string[] { newListID.ToString() }
                };
                GetReturn getResponse = getListSub.Get();
                Console.WriteLine("Get Status: " + getResponse.Status.ToString());
                Console.WriteLine("Message: " + getResponse.Message.ToString());
                Console.WriteLine("Code: " + getResponse.Code.ToString());
                Console.WriteLine("Results Length: " + getResponse.Results.Length);
                foreach (ET_List_Subscriber ResultListSub in getResponse.Results)
                {
                    Console.WriteLine("--ListID: " + ResultListSub.ID + ", SubscriberKey(EmailAddress): " + ResultListSub.SubscriberKey);
                }
            }


            //Console.WriteLine("Retrieve Filtered ListSubscribers with GetMoreResults");
            //ET_ListSubscriber oe = new ET_ListSubscriber();
            //oe.authStub = myclient;
            //oe.SearchFilter = new SimpleFilterPart() { Property = "EventDate", SimpleOperator = SimpleOperators.greaterThan, DateValue = new DateTime[] { filterDate } };
            //oe.props = new string[] { "ObjectID", "SubscriberKey", "CreatedDate", "Client.ID", "Client.PartnerClientKey", "ListID", "Status" };
            //GetReturn oeGet = oe.Get();

            //Console.WriteLine("Get Status: " + oeGet.Status.ToString());
            //Console.WriteLine("Message: " + oeGet.Message.ToString());
            //Console.WriteLine("Code: " + oeGet.Code.ToString());
            //Console.WriteLine("Results Length: " + oeGet.Results.Length);
            //Console.WriteLine("MoreResults: " + oeGet.MoreResults.ToString());
            //// Since this could potentially return a large number of results, we do not want to print the results
            ////foreach (ET_ListSubscriber ListSubscriber in oeGet.Results)
            ////{
            ////    Console.WriteLine("SubscriberKey: " + ListSubscriber.SubscriberKey + ", EventDate: " + ListSubscriber.EventDate.ToString());
            ////}

            //while (oeGet.MoreResults)
            //{
            //    Console.WriteLine("Continue Retrieve Filtered ListSubscribers with GetMoreResults");
            //    oeGet = oe.GetMoreResults();
            //    Console.WriteLine("Get Status: " + oeGet.Status.ToString());
            //    Console.WriteLine("Message: " + oeGet.Message.ToString());
            //    Console.WriteLine("Code: " + oeGet.Code.ToString());
            //    Console.WriteLine("Results Length: " + oeGet.Results.Length);
            //    Console.WriteLine("MoreResults: " + oeGet.MoreResults.ToString());
            //}


            //The following request could potentially bring back large amounts of data if run against a production account
            //Console.WriteLine("Retrieve All ListSubscribers with GetMoreResults");
            //ET_ListSubscriber oe = new ET_ListSubscriber();
            //oe.authStub = myclient;
            //oe.props = new string[] { "SendID", "SubscriberKey", "EventDate", "Client.ID", "EventType", "BatchID", "TriggeredSendDefinitionObjectID", "PartnerKey" };
            //GetResponse oeGetAll = oe.Get();

            //Console.WriteLine("Get Status: " + oeGetAll.Status.ToString());
            //Console.WriteLine("Message: " + oeGetAll.Message.ToString());
            //Console.WriteLine("Code: " + oeGetAll.Code.ToString());
            //Console.WriteLine("Results Length: " + oeGetAll.Results.Length);
            //Console.WriteLine("MoreResults: " + oeGetAll.MoreResults.ToString());
            //// Since this could potentially return a large number of results, we do not want to print the results
            ////foreach (ET_ListSubscriber ListSubscriber in oeGet.Results)
            ////{
            ////    Console.WriteLine("SubscriberKey: " + ListSubscriber.SubscriberKey + ", EventDate: " + ListSubscriber.EventDate.ToString());
            ////}

            //while (oeGetAll.MoreResults)
            //{
            //    oeGetAll = oe.GetMoreResults();
            //    Console.WriteLine("Get Status: " + oeGetAll.Status.ToString());
            //    Console.WriteLine("Message: " + oeGetAll.Message.ToString());
            //    Console.WriteLine("Code: " + oeGetAll.Code.ToString());
            //    Console.WriteLine("Results Length: " + oeGetAll.Results.Length);
            //    Console.WriteLine("MoreResults: " + oeGetAll.MoreResults.ToString());
            //}
        }