Overview

Namespaces

  • Ctct
    • Auth
    • Components
      • Account
      • Activities
      • Contacts
      • EmailMarketing
      • Library
      • Tracking
    • Exceptions
    • Services
    • Util
    • WebHooks

Classes

  • AccountService
  • ActivityService
  • BaseService
  • CampaignScheduleService
  • CampaignTrackingService
  • ContactService
  • ContactTrackingService
  • EmailMarketingService
  • LibraryService
  • ListService
  • Overview
  • Namespace
  • Class

Class EmailMarketingService

Performs all actions pertaining to Constant Contact Campaigns

Ctct\Services\BaseService
Extended by Ctct\Services\EmailMarketingService
Namespace: Ctct\Services
Package: Services
Author: Constant Contact
Located at Services/EmailMarketingService.php
Methods summary
public Ctct\Components\EmailMarketing\Campaign
# addCampaign( string $accessToken, Ctct\Components\EmailMarketing\Campaign $campaign )

Create a new campaign

Create a new campaign

Parameters

$accessToken
  • Constant Contact OAuth2 access token
$campaign
  • Campaign to be created

Returns

Ctct\Components\EmailMarketing\Campaign

Throws

Ctct\Exceptions\CtctException
public Ctct\Components\ResultSet
# getCampaigns( string $accessToken, array $params = array() )

Get a set of campaigns

Get a set of campaigns

Parameters

$accessToken
  • Constant Contact OAuth2 access token
$params
  • associative array of query parameters and values to append to the request. Allowed parameters include: limit - Specifies the number of results displayed per page of output, from 1 - 500, default = 50. modified_since - ISO-8601 formatted timestamp. next - the next link returned from a previous paginated call. May only be used by itself.

Returns

Ctct\Components\ResultSet

Throws

Ctct\Exceptions\CtctException
public Ctct\Components\EmailMarketing\Campaign
# getCampaign( string $accessToken, integer $campaign_id )

Get campaign details for a specific campaign

Get campaign details for a specific campaign

Parameters

$accessToken
  • Constant Contact OAuth2 access token
$campaign_id
  • Valid campaign id

Returns

Ctct\Components\EmailMarketing\Campaign

Throws

Ctct\Exceptions\CtctException
public boolean
# deleteCampaign( string $accessToken, integer $campaign_id )

Delete an email campaign

Delete an email campaign

Parameters

$accessToken
  • Constant Contact OAuth2 access token
$campaign_id
  • Valid campaign id

Returns

boolean

Throws

Ctct\Exceptions\CtctException
public Ctct\Components\EmailMarketing\Campaign
# updateCampaign( string $accessToken, Ctct\Components\EmailMarketing\Campaign $campaign )

Update a specific email campaign

Update a specific email campaign

Parameters

$accessToken
  • Constant Contact OAuth2 access token
$campaign
  • Campaign to be updated

Returns

Ctct\Components\EmailMarketing\Campaign

Throws

Ctct\Exceptions\CtctException
Methods inherited from Ctct\Services\BaseService
__construct(), convertException(), createBaseRequest(), getClient()
API documentation generated by ApiGen