|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.createsend.CreateSendBase
com.createsend.Segments
public class Segments
Provides methods for accessing all Segment resources in the Campaign Monitor API
| Field Summary |
|---|
| Fields inherited from class com.createsend.CreateSendBase |
|---|
jerseyClient, urlEncodingScheme |
| Constructor Summary | |
|---|---|
Segments(AuthenticationDetails auth)
Constructor used to create new segments. |
|
Segments(AuthenticationDetails auth,
String segmentID)
Constructor for working with existing segments. |
|
| Method Summary | |
|---|---|
PagedResult<Subscriber> |
active()
Gets a paged collection of active subscribers within the specified segment. |
PagedResult<Subscriber> |
active(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of active subscribers within the specified segment since the provided date. |
PagedResult<Subscriber> |
active(Integer page,
Integer pageSize,
String orderField,
String orderDirection)
Gets a paged collection of active subscribers within the specified segment. |
void |
addRule(Rule rule)
Adds a new rule to an existing list segment |
String |
create(String listID,
Segment segment)
Creates a new segment on the specified list. |
void |
delete()
Deletes the specified segment. |
void |
deleteRules()
Deletes all rules from the specifed segment |
Segment |
details()
Gets the details of the specified segment, including all rules and the current number of active subscribers. |
String |
getSegmentID()
Gets the current segment ID. |
void |
setSegmentID(String segmentID)
Sets the current segment ID |
void |
update(Segment segment)
Updates an existing segment with the specified details |
| 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 Segments(AuthenticationDetails auth)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.
public Segments(AuthenticationDetails auth,
String segmentID)
auth - The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.segmentID - The Segment ID to use when making API calls.| Method Detail |
|---|
public void setSegmentID(String segmentID)
segmentID - The ID of the segment to apply calls to.public String getSegmentID()
public String create(String listID,
Segment segment)
throws CreateSendException
listID - The ID of the list to segmentsegment - The segment details
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public void update(Segment segment)
throws CreateSendException
segment - The details of the segment to update.
The SegmentID field of this object must be populated
CreateSendException - Thrown when the API responds with HTTP Status >= 400
public void addRule(Rule rule)
throws CreateSendException
rule - The rule specification
CreateSendException - Raised when the API responds with HTTP Status >= 400
public Segment details()
throws CreateSendException
CreateSendException - Raised when the API responds with HTTP Status >= 400
public PagedResult<Subscriber> active()
throws CreateSendException
CreateSendException - Thrown when the API responds with a HTTP Status >= 400
public PagedResult<Subscriber> active(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> active(Date subscribedFrom,
Integer page,
Integer pageSize,
String orderField,
String orderDirection)
throws CreateSendException
subscribedFrom - The API will only return subscribers who became active on or after this date.
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 HTTP Status >= 400
public void deleteRules()
throws CreateSendException
CreateSendException - Raised when the API responds with HTTP Status >= 400
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||