public interface ContactService
See Working With Contacts on the Constant Contact Developer Website
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<Contact> |
createContact(Contact contact,
OptInSource optInSource)
Create an individual
Contact |
retrofit2.Call<ContactList> |
createContactList(ContactList contactList)
Create a new
ContactList |
retrofit2.Call<SignupFormResponse> |
createCustomSignupForm(SignupFormRequest signupFormRequest)
Create a custom signup form
|
retrofit2.Call<retrofit2.Response> |
deleteContactList(java.lang.String listId)
Delete a
ContactList |
retrofit2.Call<Contact> |
getContact(java.lang.String contactId)
Get an individual
Contact |
retrofit2.Call<ContactList> |
getContactList(java.lang.String listId)
Get a specific
ContactList |
retrofit2.Call<java.util.List<ContactList>> |
getContactLists(java.lang.String date)
Get all
ContactList in the account |
retrofit2.Call<Paged<Contact>> |
getContacts(int limit,
ContactStatus status)
|
retrofit2.Call<Paged<Contact>> |
getContacts(int limit,
java.lang.String date,
ContactStatus status)
|
retrofit2.Call<Paged<Contact>> |
getContacts(java.lang.String nextLink)
|
retrofit2.Call<Paged<Contact>> |
getContacts(java.lang.String listId,
int limit,
java.lang.String date)
|
retrofit2.Call<retrofit2.Response> |
unsubscribeContact(java.lang.String contactId)
Opt out an individual
Contact |
retrofit2.Call<Contact> |
updateContact(Contact contact,
java.lang.String contactId,
OptInSource optInSource)
Update an individual
Contact |
retrofit2.Call<ContactList> |
updateContactList(ContactList contactList,
java.lang.String listId)
Update a
ContactList |
@GET(value="v2/contacts") retrofit2.Call<Paged<Contact>> getContacts(@Query(value="limit") int limit, @Query(value="status") ContactStatus status)
limit
- Size of page to return (1-500)status
- Retrieve contacts with only the chosen ContactStatus
@GET(value="v2/contacts") retrofit2.Call<Paged<Contact>> getContacts(@Query(value="limit") int limit, @Query(value="modified_since") java.lang.String date, @Query(value="status") ContactStatus status)
limit
- Size of page to return (1-500)date
- Date to specify retrieval of contacts that have been modified since then, in ISO-8601 formatstatus
- Retrieve contacts with only the chosen ContactStatus
@GET(value="v2/lists/{listId}/contacts") retrofit2.Call<Paged<Contact>> getContacts(@Path(value="listId") java.lang.String listId, @Query(value="limit") int limit, @Query(value="modified_since") java.lang.String date)
listId
- ID of the ContactList to get Contacts fromlimit
- Size of page to return (1-500)date
- Date to specify retrieval of contacts that have been modified since then, in ISO-8601 format@GET(value="v2/contacts?next={next}") retrofit2.Call<Paged<Contact>> getContacts(@Path(value="next") java.lang.String nextLink)
nextLink
- Value of the path found in the meta of the original callPaged
@POST(value="v2/contacts") retrofit2.Call<Contact> createContact(@Body Contact contact, @Query(value="action_by") OptInSource optInSource)
Contact
contact
- ContactoptInSource
- Specify who is creating this contact with OptInSource
@GET(value="v2/contacts/{contactId}") retrofit2.Call<Contact> getContact(@Path(value="contactId") java.lang.String contactId)
Contact
contactId
- Contact's ID@PUT(value="v2/contacts/{contactId") retrofit2.Call<Contact> updateContact(@Body Contact contact, @Path(value="contactId") java.lang.String contactId, @Query(value="action_by") OptInSource optInSource)
Contact
contact
- Contact object with updated informationcontactId
- Contact's IDoptInSource
- Specify who is updating this contact with OptInSource
@DELETE(value="v2/contacts/{contactId}") retrofit2.Call<retrofit2.Response> unsubscribeContact(@Path(value="contactId") java.lang.String contactId)
Contact
contactId
- Contact's IDResponse
@GET(value="v2/lists") retrofit2.Call<java.util.List<ContactList>> getContactLists(@Query(value="modified_since") java.lang.String date)
ContactList
in the accountdate
- Date to specify retrieval of contact lists that have been modified since then, in ISO-8601 format@POST(value="v2/lists") retrofit2.Call<ContactList> createContactList(@Body ContactList contactList)
ContactList
contactList
- ContactList object (requires only name and status to create)@GET(value="v2/lists/{listId}") retrofit2.Call<ContactList> getContactList(@Path(value="listId") java.lang.String listId)
ContactList
listId
- ID of the list@PUT(value="v2/lists/{listId}") retrofit2.Call<ContactList> updateContactList(@Body ContactList contactList, @Path(value="listId") java.lang.String listId)
ContactList
contactList
- ContactListlistId
- ID of the list@DELETE(value="v2/lists/{listId}") retrofit2.Call<retrofit2.Response> deleteContactList(@Path(value="listId") java.lang.String listId)
ContactList
listId
- ID of the listResponse
@POST(value="v2/signupform") retrofit2.Call<SignupFormResponse> createCustomSignupForm(@Body SignupFormRequest signupFormRequest)
signupFormRequest
- object that contains params for the signup form