public class Campaigns extends CreateSendBase
jerseyClient, urlEncodingScheme| Constructor and Description |
|---|
Campaigns(AuthenticationDetails auth)
Constructor used to create new campaigns.
|
Campaigns(AuthenticationDetails auth,
String campaignID)
Constructor used for working with existing campaigns.
|
| Modifier and Type | Method and Description |
|---|---|
PagedResult<Subscriber> |
bounces()
Gets a paged list of bounces for the specified campaign
|
PagedResult<Subscriber> |
bounces(Date bouncesFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of bounces for the specified campaign
|
PagedResult<Subscriber> |
bounces(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of bounces for the specified campaign
|
PagedResult<CampaignClick> |
clicks()
Gets a paged list of clicks for the specified campaign
|
PagedResult<CampaignClick> |
clicks(Date clicksFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of clicks for the specified campaign
|
PagedResult<CampaignClick> |
clicks(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of clicks for the specified campaign
|
String |
create(String clientID,
CampaignForCreation campaign)
Creates a new campaign for the specified client based on the provided campaign data.
|
String |
createFromTemplate(String clientID,
CampaignForCreationFromTemplate campaign)
Creates a new campaign for the specified client, based on the template
and campaign data specified.
|
void |
delete()
Deletes the specified draft campaign
|
EmailClient[] |
emailClientUsage()
Gets the email clients that subscribers used to open the campaign
|
String |
getCampaignID()
Gets the current campaign ID.
|
ListsAndSegments |
listsAndSegments()
Gets the lists and segments that a campaign is to be, or has been sent to.
|
PagedResult<CampaignOpen> |
opens()
Gets a paged list of opens for the specified campaign
|
PagedResult<CampaignOpen> |
opens(Date opensFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of opens for the specified campaign
|
PagedResult<CampaignOpen> |
opens(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of opens for the specified campaign
|
PagedResult<Subscriber> |
recipients(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of recipients for the specified campaign
|
void |
send(String confirmationEmail,
Date sendDate)
Sends an existing draft campaign using the provided confirmation email and send date.
|
void |
setCampaignID(String campaignID)
Sets the ID of the campaign to apply API calls to.
|
PagedResult<Subscriber> |
spamComplaints()
Gets a paged list of spam complaints for the specified campaign
|
PagedResult<Subscriber> |
spamComplaints(Date spamComplaintsFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of spam complaints for the specified campaign
|
PagedResult<Subscriber> |
spamComplaints(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of spam complaints for the specified campaign
|
CampaignSummary |
summary()
Get summary reporting data for the specified campaign
|
void |
test(PreviewData data)
Sends a preview of an existing draft campaign to the recipients specified in the preview data.
|
void |
unschedule()
Unschedules a campaign and moves it back to the drafts.
|
PagedResult<Subscriber> |
unsubscribes()
Gets a paged list of unsubscribes for the specified campaign
|
PagedResult<Subscriber> |
unsubscribes(Date unsubscribesFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of unsubscribes for the specified campaign
|
PagedResult<Subscriber> |
unsubscribes(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged list of unsubscribes for the specified campaign
|
refreshTokenpublic Campaigns(AuthenticationDetails auth)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.public Campaigns(AuthenticationDetails auth, String campaignID)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.campaignID - The campaign ID to use when making API calls.public String getCampaignID()
public void setCampaignID(String campaignID)
campaignID - The ID of the campaign to apply API calls to.public String create(String clientID, CampaignForCreation campaign) throws CreateSendException
clientID - The ID of the client to create the campaign forcampaign - The campaign information used for the new campaignCreateSendException - Thrown when the API responds with a HTTP Status >= 400public String createFromTemplate(String clientID, CampaignForCreationFromTemplate campaign) throws CreateSendException
clientID - The ID of the client to create the campaign forcampaign - The campaign information used for the new campaignCreateSendException - Thrown when the API responds with a HTTP Status >= 400public void send(String confirmationEmail, Date sendDate) throws CreateSendException
null sendDate.confirmationEmail - An email address to send the delivery confirmation to.sendDate - The date to send the campaign at. This date should be in the clients timezoneCreateSendException - Thrown when the API responds with a HTTP Status >= 400public void unschedule()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public void test(PreviewData data) throws CreateSendException
data - The recipients and personalisation scheme to use for the previewCreateSendException - Raised when the API responds with a HTTP status >= 400public CampaignSummary summary() throws CreateSendException
CreateSendException - Raised if the API responds with a HTTP Status >= 400public EmailClient[] emailClientUsage() throws CreateSendException
CreateSendException - Raised if the API responds with a HTTP Status >= 400public ListsAndSegments listsAndSegments() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> recipients(Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
page - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> bounces() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> bounces(Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
page - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> bounces(Date bouncesFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
bouncesFrom - The date to start getting bounce results from. This field is requiredpage - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<CampaignOpen> opens() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<CampaignOpen> opens(Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
page - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<CampaignOpen> opens(Date opensFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
opensFrom - The date to start getting open results from. This field is requiredpage - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<CampaignClick> clicks() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<CampaignClick> clicks(Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
page - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<CampaignClick> clicks(Date clicksFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
clicksFrom - The date to start getting click results from. This field is requiredpage - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> unsubscribes() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> unsubscribes(Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
page - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> unsubscribes(Date unsubscribesFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
unsubscribesFrom - The date to start getting unsubscribe results from. This field is requiredpage - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> spamComplaints() throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> spamComplaints(Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
page - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public PagedResult<Subscriber> spamComplaints(Date spamComplaintsFrom, Integer page, Integer pageSize, String orderField, String orderDirection) throws CreateSendException
spamComplaintsFrom - The date to start getting spam complaints from. This field is requiredpage - The page number or results to get. Use null for the default (page=1)pageSize - The number of records to get on the current page. Use null for the default.orderField - The field used to order the results by. Use null for the default.orderDirection - The direction to order the results by. Use null for the default.CreateSendException - Thrown when the API responds with a HTTP Status >= 400public void delete()
throws CreateSendException
CreateSendException - Raised when the API responds with a HTTP status >= 400Copyright © 2013. All Rights Reserved.