|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.createsend.CreateSendBase
com.createsend.Campaigns
public class Campaigns
Provides methods for accessing all Campaign resources in the Campaign Monitor API
| Field Summary |
|---|
| Fields inherited from class com.createsend.CreateSendBase |
|---|
jerseyClient, urlEncodingScheme |
| Constructor Summary | |
|---|---|
Campaigns(AuthenticationDetails auth)
Constructor used to create new campaigns. |
|
Campaigns(AuthenticationDetails auth,
String campaignID)
Constructor used for working with existing campaigns. |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class com.createsend.CreateSendBase |
|---|
refreshToken |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
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 campaign
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 campaign
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 timezone
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public void unschedule()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public void test(PreviewData data)
throws CreateSendException
data - The recipients and personalisation scheme to use for the preview
CreateSendException - Raised when the API responds with a HTTP status >= 400
public CampaignSummary summary()
throws CreateSendException
CreateSendException - Raised if the API responds with a HTTP Status >= 400
public EmailClient[] emailClientUsage()
throws CreateSendException
CreateSendException - Raised if the API responds with a HTTP Status >= 400
public ListsAndSegments listsAndSegments()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 >= 400
public PagedResult<Subscriber> bounces()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 >= 400
public 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 >= 400
public PagedResult<CampaignOpen> opens()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 >= 400
public 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 >= 400
public PagedResult<CampaignClick> clicks()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 >= 400
public 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 >= 400
public PagedResult<Subscriber> unsubscribes()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 >= 400
public 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 >= 400
public PagedResult<Subscriber> spamComplaints()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public 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 >= 400
public 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 >= 400
public void delete()
throws CreateSendException
CreateSendException - Raised when the API responds with a HTTP status >= 400
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||