All Downloads are FREE. Search and download functionalities are using the official Maven repository.

services.ListsInterface Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
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