StevenShi / constantcontact-csharp-tutor

Constant Contact web services integration sample app written in c#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

constantcontact-csharp-tutor

Constant Contact C# Tutor is an actual working app written in C# to demonstrate integration with Constant Contact Web services API. This code is provided as is. You are free to copy and reuse it, and it does not carry any warranties, implied or otherwise.

Requires .NET 4 framework to run.

Since this is a working app that integrates with Constant Contact web services API, you will also need your Constant Contact login credentials, which can be obtained for free by signing up for a trial from www.constantcontact.com

Compiled version of the sample app can be downloaded from the /App directory.

To read the source code behind how the app is built, look inside the /Code directory.

What is Constant Contact C# Tutor?
Constant Contact C# Tutor is a small application developed in .NET that is intended to demonstrate how to use the Constant Contact API. It has basic examples of API calls including GET, POST, PUT, and DELETE. Beside the actual call the application intercepts and displays the http request and http response in order to show what happens behind the covers.

Get started
Clone the git repo and change directory into the /App directory.
Go ahead and run CSharpTutor.exe

Click on “Get Started” button. This action will display the login control and the request/response display panels. Also a “Restart” button is activated to start the API calls from beginning.

Login
The login API call tries to access the Constant Contact main API page.

For login the user need to enter the user name, password and an API key. The user can get the API key at: http://community.constantcontact.com/t5/Documentation/API-Keys/ba-p/25015 On the login panel there is a link label that will display the Constant Contact API document for how to obtain an API key for use in integration with Constant Contact web services.

List API Calls
After login the user has the ability to perform API calls to retrieve the email lists, add a new list, or remove an existing one. There are 3 buttons to perform these actions. “Load existing lists” – this button will populate the right side list control with all the email list for the current user. “Add new list” – this button will display a pop up window where the user can enter the name for the new list. “Remove selected list” – this button will remove the selected list from the user’s email list collection.

All the buttons have below them a link that will guide the user to Constant Contact API documentation page. For each action the user can see in the request/response display panels what happens behind the scenes.

Show Contacts in list
There is a fourth button that will display all the contacts in the selected list. Hitting this button will show all the contacts in the selected list. Below the “Show contacts in list” button there is a link to the actual Constant Contact API document call for this action. In the request/response panels the actual web services API call is shown.

Update selected contact
If the email list contains contacts then this button will be active. You can use this button to update the customer’s name. Next to this button there is a link to the API documentation for this call.

Go Back
This button will get the user back to the list API calls panel.

About

Constant Contact web services integration sample app written in c#


Languages

Language:C# 100.0%