public class Subscribers extends CreateSendBase
jerseyClient, urlEncodingScheme| Constructor and Description |
|---|
Subscribers(AuthenticationDetails auth,
String listID)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
add(SubscriberToAdd subscriber)
Adds a single subscriber to the specified list
|
ImportResult |
addMany(SubscribersToAdd subscribers)
Import many subscribers into the specified list
|
void |
delete(String emailAddress)
Moves the given email address into the deleted list
|
Subscriber |
details(String emailAddress)
Gets the details for the subscriber with the given email address in the specified list
|
String |
getListID()
Gets the current list ID.
|
HistoryItem[] |
history(String emailAddress)
Gets the complete history for a given subscriber in the specified list
|
void |
setListID(String listID)
Sets the current list ID.
|
void |
unsubscribe(String emailAddress)
Unsubscribes the given email address from the specified list
|
void |
update(String originalEmailAddress,
SubscriberToAdd newDetails)
Updates any provided information for an existing subscriber
|
refreshTokenpublic Subscribers(AuthenticationDetails auth, String listID)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.listID - The List ID to use when making API calls.public void setListID(String listID)
listID - The ID of the list to apply any calls to.public String getListID()
public String add(SubscriberToAdd subscriber) throws CreateSendException
subscriber - The subscriber to add to the listCreateSendException - Thrown when the API responds with HTTP Status >= 400public ImportResult addMany(SubscribersToAdd subscribers) throws CreateSendException
subscribers - The subscribers to add to the listCreateSendException - Thrown when the API responds with HTTP Status >= 400public Subscriber details(String emailAddress) throws CreateSendException
emailAddress - The email address to get the subscriber details forCreateSendException - Thrown when the API responds with HTTP Status >= 400public HistoryItem[] history(String emailAddress) throws CreateSendException
emailAddress - The email address of the subscriber to get the history forCreateSendException - Thrown when the API responds with HTTP Status >= 400public void unsubscribe(String emailAddress) throws CreateSendException
emailAddress - The email address to unsubscibeCreateSendException - Thrown when the API responds with HTTP Status >= 400public void delete(String emailAddress) throws CreateSendException
emailAddress - The email address to deleteCreateSendException - Thrown when the API responds with HTTP Status >= 400public void update(String originalEmailAddress, SubscriberToAdd newDetails) throws CreateSendException
originalEmailAddress - The current email address of the existing subscribernewDetails - The new details for the subscriber. Any details included here will be used in the updated.
Any details omitted will not be changed.CreateSendException - Thrown when the API responds with HTTP Status >= 400Copyright © 2013. All Rights Reserved.