private static void Query(ActiveCampaignConnection connection, ActiveCampaignTestData testData) { IContactQueryClient contactQueryClient = new ContactQueryClient(connection); contactQueryClient.GetAll().Dump(); return; contactQueryClient.GetContacts(testData.ContactId).Dump(); IAutomationQueryClient automationQueryClient = new AutomationQueryClient(connection); automationQueryClient.GetAll().Dump(); }
private static void Commanding(ActiveCampaignConnection connection, ActiveCampaignTestData testData) { var client = new ListCommandingClient(connection); var command = new AddListCommand("New list", "LEGALDESK", "Via Morgagni", "Verona", "IT"); client.Add(command); ////var contactCommandingClient = new ContactCommandingClient(connection); //// var addTagCommand = new AddTagsCommand("*****@*****.**", "tag1", "tag2", "tag3") ; ////contactCommandingClient.AddTags(addTagCommand); ////var removeTagsCommand = new RemoveTagsCommand("*****@*****.**", "tag2"); ////contactCommandingClient.RemoveTags(removeTagsCommand); ////var contactQueryClient = new ContactQueryClient(connection); ////var contact = contactQueryClient.Get(testData.ContactEmail).Dump(); ////contactCommandingClient.Delete(contact.Id).Dump(); ////contactCommandingClient.Add(new AddContactCommand(testData.ContactId, testData.ContactEmail)).Dump(); ////contact = contactQueryClient.Get(testData.ContactEmail).Dump(); ////contactCommandingClient.Sync(new SyncContactCommand(testData.ContactEmail) { FirstName = "Bill", LastName = "White" }); ////IAutomationCommandingClient automationCommandingClient = new AutomationCommandingClient(connection); ////automationCommandingClient.AddContact(testData.ContactEmail, testData.Automation).Dump(); ////automationCommandingClient.RemoveContact(testData.ContactEmail, testData.Automation).Dump(); }