Methods summary
public
|
#
__construct( string $apiKey )
Class constructor Registers the API key with the ConstantContact class that
will be used for all API calls.
Class constructor Registers the API key with the ConstantContact class that
will be used for all API calls.
Parameters
- $apiKey
string $apiKey - Constant Contact API Key
|
public
Ctct\Components\ResultSet
|
#
getContacts( string $accessToken, array $params = array() )
Get a set of campaigns
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow 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. email - the contact by email address
to retrieve information for
Returns
|
public
Ctct\Components\Contacts\Contact
|
#
getContact( string $accessToken, integer $contactId )
Get an individual contact
Get an individual contact
Parameters
- $accessToken
string $accessToken - Valid access token
- $contactId
integer $contactId - Id of the contact to retrieve
Returns
|
public
array
|
#
getContactByEmail( string $accessToken, string $email )
Get contacts with a specified email eaddress
Get contacts with a specified email eaddress
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $email
string $email - contact email address to search for
Returns
array
|
public
Ctct\Components\Contacts\Contact
|
#
addContact( string $accessToken, Ctct\Components\Contacts\Contact $contact, boolean $actionByVisitor = false )
Add a new contact to an account
Add a new contact to an account
Parameters
- $accessToken
string $accessToken - Valid access token
- $contact
Ctct\Components\Contacts\Contact $contact - Contact to add
- $actionByVisitor
boolean $actionByVisitor - is the action being taken by the visitor
Returns
|
public
boolean
|
#
deleteContact( string $accessToken, mixed $contact )
Sets an individual contact to 'REMOVED' status
Sets an individual contact to 'REMOVED' status
Parameters
- $accessToken
string $accessToken - Valid access token
- $contact
mixed $contact - Either a Contact id or the Contact itself
Returns
boolean
Throws
|
public
boolean
|
#
deleteContactFromLists( string $accessToken, mixed $contact )
Delete a contact from all contact lists
Delete a contact from all contact lists
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or the Contact object itself
Returns
boolean
Throws
|
public
boolean
|
#
deleteContactFromList( string $accessToken, mixed $contact, mixed $list )
Delete a contact from all contact lists
Delete a contact from all contact lists
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or a Contact object
- $list
mixed $list - ContactList id or a ContactList object
Returns
boolean
Throws
|
public
Ctct\Components\Contacts\Contact
|
#
updateContact( string $accessToken, Ctct\Components\Contacts\Contact $contact, boolean $actionByVisitor = false )
Update an individual contact
Update an individual contact
Parameters
- $accessToken
string $accessToken - Valid access token
- $contact
Ctct\Components\Contacts\Contact $contact - Contact to update
- $actionByVisitor
boolean $actionByVisitor - is the action being taken by the visitor, default is false
Returns
|
public
array
|
#
getLists( string $accessToken, array $params = array() )
Get lists
Parameters
- $accessToken
string $accessToken - Valid access token
- $params
string $date - ISO-8601 date to query by
Returns
array
|
public
Ctct\Components\Contacts\ContactList
|
#
getList( string $accessToken, integer $listId )
Get an individual list
Parameters
- $accessToken
string $accessToken - Valid access token
- $listId
integer $listId - Id of the list to retrieve
Returns
|
public
Ctct\Components\Contacts\ContactList
|
|
public
Ctct\Components\Contacts\ContactList
|
|
public
array
|
#
getContactsFromList( string $accessToken, mixed $list, mixed $param = null )
Get contact that belong to a specific list
Get contact that belong to a specific list
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $list
mixed $list - Id of the list or a ContactList object
- $param
mixed $param - denotes the number of results per set, limited to 50, or a next
parameter provided from a previous getContactsFromList call
Returns
array
Throws
|
public
Ctct\Components\ResultSet
|
#
getEmailCampaigns( string $accessToken, array $params = array() )
Get a set of campaigns
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow 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. email - the contact by email address
to retrieve information for
Returns
|
public
|
#
getEmailCampaign( string $accessToken, integer $campaignId )
Get an individual campaign
Get an individual campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaignId
integer $campaignId - Valid campaign id
|
public
boolean
|
#
deleteEmailCampaign( string $accessToken, mixed $campaign )
Delete an individual campaign
Delete an individual campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Id of a campaign or a Campaign object itself
Returns
boolean
Throws
|
public
Ctct\Components\EmailMarketing\Campaign
|
|
public
Ctct\Components\EmailMarketing\Campaign
|
|
public
Ctct\Components\EmailMarketing\Schedule
|
|
public
array
|
#
getEmailCampaignSchedules( string $accessToken, mixed $campaign )
Get an array of schedules associated with a given campaign
Get an array of schedules associated with a given campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
Returns
array
|
public
array
|
#
getEmailCampaignSchedule( string $accessToken, mixed $campaign, mixed $schedule )
Get a specific schedule associated with a given campaign
Get a specific schedule associated with a given campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
- $schedule
mixed $schedule - Schedule id or Schedule object itself
Returns
array
Throws
|
public
array
|
|
public
array
|
#
deleteEmailCampaignSchedule( string $accessToken, mixed $campaign, mixed $schedule )
Delete a specific schedule associated with a given campaign
Delete a specific schedule associated with a given campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
- $schedule
mixed $schedule - Schedule id or Schedule object itself
Returns
array
Throws
|
public
Ctct\Components\EmailMarketing\TestSend
|
|
public
Ctct\Components\ResultSet
|
#
getEmailCampaignSends( string $accessToken, mixed $campaign, array $params = array() )
Get sends for a campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getEmailCampaignBounces( string $accessToken, mixed $campaign, array $params = array() )
Get bounces for a campaign
Get bounces for a campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getEmailCampaignClicks( string $accessToken, mixed $campaign, array $params = array() )
Get clicks for a campaign
Get clicks for a campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $emailCampaign - Campaign id or Campaign object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getEmailCampaignOpens( string $accessToken, mixed $campaign, array $params = array() )
Get opens for a campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getEmailCampaignForwards( string $accessToken, mixed $campaign, array $params = array() )
Get forwards for a campaign
Get forwards for a campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getEmailCampaignUnsubscribes( string $accessToken, mixed $campaign, array $params = array() )
Get unsubscribes for a campaign
Get unsubscribes for a campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\Tracking\TrackingSummary
|
#
getEmailCampaignSummaryReport( string $accessToken, mixed $campaign )
Get a reporting summary for a campaign
Get a reporting summary for a campaign
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $campaign
mixed $campaign - Campaign id or Campaign object itself
Returns
|
public
Ctct\Components\ResultSet
|
#
getContactSends( string $accessToken, mixed $contact, array $params = array() )
Get sends for a Contact
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or Contact object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getContactBounces( string $accessToken, mixed $contact, array $params = array() )
Get bounces for a Contact
Get bounces for a Contact
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or Contact object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getContactClicks( string $accessToken, mixed $contact, array $params = array() )
Get clicks for a Contact
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or Contact object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getContactOpens( string $accessToken, mixed $contact, array $params = array() )
Get opens for a Contact
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or Contact object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getContactForwards( string $accessToken, mixed $contact, array $params = array() )
Get forwards for a Contact
Get forwards for a Contact
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or Contact object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
Ctct\Components\ResultSet
|
#
getContactUnsubscribes( string $accessToken, mixed $contact, array $params = array() )
Get opt outs for a Contact
Get opt outs for a Contact
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or Contact object itself
- $params
mixed $params - associative array of query parameters and values to append to the
request. Allow parameters include: limit - Specifies the number of results
displayed per page of output, from 1 - 500, default = 50. created_since - Used
to retrieve a list of events since the date and time specified (in ISO-8601
format). next - the next link returned from a previous paginated call. May only
be used by itself.
Returns
|
public
array
|
#
getVerifiedEmailAddresses( string $accessToken, string $status = null )
Get verified addresses for the account
Get verified addresses for the account
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $status
string $status - Status to filter query results by
Returns
array of VerifiedEmailAddress objects
|
public
Ctct\Components\Tracking\TrackingSummary
|
#
getContactSummaryReport( string $accessToken, mixed $contact )
Get a reporting summary for a Contact
Get a reporting summary for a Contact
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $contact
mixed $contact - Contact id or Contact object itself
Returns
|
public
array
|
#
getActivities( string $accessToken )
Get an array of activities
Get an array of activities
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
Returns
|
public
{@link
|
#
getActivity( string $accessToken, string $activityId )
Get a single activity by id
Get a single activity by id
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $activityId
string $activityId - Activity id
Returns
{@link Ctct\Components\Activities\Activity}
|
public
|
|
public
|
#
addClearListsActivity( string $accessToken, array $lists )
Add an ClearLists Activity to remove all contacts from the provided lists
Add an ClearLists Activity to remove all contacts from the provided lists
Parameters
|
public
|
#
addRemoveContactsFromListsActivity( string $accessToken, array $emailAddresses, array $lists )
Add a Remove Contacts From Lists Activity
Add a Remove Contacts From Lists Activity
Parameters
- $accessToken
string $accessToken - Constant Contact OAuth2 access token
- $emailAddresses
array $emailAddresses - email addresses to be removed
- $lists
array $lists - lists to remove the provided email addresses from
|
public
array
|
|