services.ListsInterface Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of courier-java Show documentation
Show all versions of courier-java Show documentation
Java SDK for communicating with the Courier REST API.
package services;
import models.ListUpdateBody;
import models.PureLists;
import models.ListBulkSubscriptionUpdate;
import models.ListSubscriptions;
import models.List;
import retrofit2.Call;
import retrofit2.http.*;
public interface ListsInterface {
@GET("/lists")
Call getLists(
@Query("cursor") String cursor,
@Query("pattern") String pattern,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@GET("/lists/{listId}")
Call getList(
@Path("listId") String listId,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@PUT("/lists/{listId}")
Call putList(
@Path("listId") String listId,
@Body ListUpdateBody listUpdateBody,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@DELETE("/lists/{listId}")
Call deleteList(
@Path("listId") String listId,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@PUT("/lists/{listId}/restore")
Call restoreList(
@Path("listId") String listId,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@GET("/lists/{listId}/subscriptions")
Call getListSubscriptions(
@Path("listId") String listId,
@Query("cursor") String cursor,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@PUT("/lists/{listId}/subscriptions")
Call bulkSubscribeRecipientsToList(
@Path("listId") String listId,
@Body ListBulkSubscriptionUpdate bulkSubscriptionUpdate,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@PUT("/lists/{listId}/subscriptions/{recipientId}")
Call subscribeRecipientToList(
@Path("listId") String listId,
@Path("recipientId") String recipientId,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
@DELETE("/lists/{listId}/subscriptions/{recipientId}")
Call unsubscribeRecipientFromList(
@Path("listId") String listId,
@Path("recipientId") String recipientId,
@Header("Authorization") String authorization,
@Header("User-Agent") String userAgent
);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy