Skip to content
Constant Contact PHP SDK for v2 API
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src/Ctct
standalone
test #102 - add CampaignPreview Jul 1, 2015
.gitignore
.travis.yml
README.md Add a manual zip of the library and dependencies Feb 17, 2016
composer.json Less constrained versioning for Guzzle Aug 7, 2015
license.txt Update PHPUnit version, copyright, and Readme Jan 12, 2015
phpunit.xml Resolving PSR1/2 Code Violations May 10, 2013

README.md

Constant Contact PHP SDK

Build Status Latest Stable Version Latest Unstable Version

This library utilizes GuzzlePHP

Installing via Composer (recommended)

Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project. In order to use the Constant Contact PHP SDK through composer, you must add "constantcontact/constantcontact" as a dependency in your project's composer.json file.

 {
        "require": {
            "constantcontact/constantcontact": "2.1.*"
        }
    }

Manual Installation

If you are unable to install using composer, we have provided a zip file that includes a version of the dependencies at the time of our release, as well as our library. Unzip the vendor file in the standalone directory, and require the autoload.php file to use our methods.

Documentation

The source documentation is hosted at http://constantcontact.github.io/php-sdk

API Documentation is located at http://developer.constantcontact.com/docs/developer-guides/api-documentation-index.html

Usage

The ConstantContact class contains the underlying services that hold the methods that use the API.

use Ctct\ConstantContact;
$cc = new ConstantContact('your api key');

$contacts = $cc->contactService->getContacts('your access token')

Many methods will take an array of parameters for use in the calls. Available params are documented in the PHPDoc of the method.

$params = array("limit" => 500);
$contacts = $cc->contactService->getContacts('your access token', $params);

Minimum Requirements

Use of this library requires PHP 5.4+, and PHP cURL extension (http://php.net/manual/en/book.curl.php)

If you are being required to use an older version of PHP, it is highly recommended that you update to at least 5.4 - but you can use version 1.3.* via composer, or manually.

You can’t perform that action at this time.