Skip to content

richm541/java-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Constant Contact JAVA SDK

Installation

In order to use the Constant Contact SDK you have to follow these steps:

  1. Add the constantcontact-2.0.jar library to classpath of your project.

Also add this libraries to classpath of project: jackson-annotations-2.1.1.jar jackson-core-2.1.1.jar jackson-databind-2.1.3.jar constant-contact-httpclient-4.2.3.jar

  1. Place your credentials in app.config file.

APIKey=APIkey
ConsumerSecret=ConsumerSecret
Password=password
Username=username
RedirectURL=RedirectURL

Usage

  1. In the file you wish to use the SDK include the following code in your file:

import com.constantcontact.*;
import com.constantcontact.components.contacts.*;
import com.constantcontact.services.*;
import com.constantcontact.authentication.*;
import com.constantcontact.util.*;

  1. Create a ConstantContact object

In order to use credentials defined in app.config file you can use this constructor:

ConstantContact constantContact = new ConstantContact();

Otherwise the credentials can be specified as constructor parameters

ConstantContact constantContact = new ConstantContact("username", "password", "apiKey", "redirectUrl");

  1. Use the functions of the SDK using the created object.

######Example for getting an contact

Contact contact = constantContact.getContact(int contactId);

######Example for getting contact list

ResultSet<Contact> contactList = constantContact.getContacts();

4)Usage in Android

In order to use the Constant Contact SDK for Android you have to include constant contact SDK sources and libraries.

About

Constant Contact Java SDK for v2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%