|
|||||||||
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,
java.lang.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(java.util.Date bouncesFrom,
java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of bounces for the specified campaign |
PagedResult<Subscriber> |
bounces(java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.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(java.util.Date clicksFrom,
java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of clicks for the specified campaign |
PagedResult<CampaignClick> |
clicks(java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of clicks for the specified campaign |
java.lang.String |
create(java.lang.String clientID,
CampaignForCreation campaign)
Creates a new campaign for the specified client based on the provided campaign data. |
java.lang.String |
createFromTemplate(java.lang.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 |
java.lang.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(java.util.Date opensFrom,
java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of opens for the specified campaign |
PagedResult<CampaignOpen> |
opens(java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of opens for the specified campaign |
PagedResult<Subscriber> |
recipients(java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of recipients for the specified campaign |
void |
send(java.lang.String confirmationEmail,
java.util.Date sendDate)
Sends an existing draft campaign using the provided confirmation email and send date. |
void |
setCampaignID(java.lang.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(java.util.Date spamComplaintsFrom,
java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of spam complaints for the specified campaign |
PagedResult<Subscriber> |
spamComplaints(java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.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(java.util.Date unsubscribesFrom,
java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.String orderDirection)
Gets a paged list of unsubscribes for the specified campaign |
PagedResult<Subscriber> |
unsubscribes(java.lang.Integer page,
java.lang.Integer pageSize,
java.lang.String orderField,
java.lang.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, java.lang.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 java.lang.String getCampaignID()
public void setCampaignID(java.lang.String campaignID)
campaignID
- The ID of the campaign to apply API calls to.public java.lang.String create(java.lang.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 >= 400public java.lang.String createFromTemplate(java.lang.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 >= 400public void send(java.lang.String confirmationEmail, java.util.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 >= 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 preview
CreateSendException
- 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(java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.util.Date bouncesFrom, java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.util.Date opensFrom, java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.util.Date clicksFrom, java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.util.Date unsubscribesFrom, java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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(java.util.Date spamComplaintsFrom, java.lang.Integer page, java.lang.Integer pageSize, java.lang.String orderField, java.lang.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 >= 400
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |