Interface DraftService


  • public interface DraftService
    Service for managing draft messages in channels.
    • Method Detail

      • createDraft

        @POST("channels/{type}/{id}/draft")
        retrofit2.Call<Draft.CreateDraftResponse> createDraft​(@Path("type")
                                                              java.lang.String type,
                                                              @Path("id")
                                                              java.lang.String id,
                                                              @Body
                                                              Draft.CreateDraftRequestData request)
        Creates a draft message in a channel.
        Parameters:
        type - The channel type
        id - The channel ID
        request - The draft creation request data
        Returns:
        A response with the created draft
      • deleteDraft

        @DELETE("channels/{type}/{id}/draft")
        retrofit2.Call<StreamResponseObject> deleteDraft​(@Path("type")
                                                         java.lang.String type,
                                                         @Path("id")
                                                         java.lang.String id,
                                                         @Query("user_id")
                                                         java.lang.String userId,
                                                         @Query("parent_id") @Nullable
                                                         @Nullable java.lang.String parentId)
        Deletes a draft message from a channel.
        Parameters:
        type - The channel type
        id - The channel ID
        userId - The user ID
        parentId - Optional parent message ID
        Returns:
        A response indicating success
      • getDraft

        @GET("channels/{type}/{id}/draft")
        retrofit2.Call<Draft.GetDraftResponse> getDraft​(@Path("type")
                                                        java.lang.String type,
                                                        @Path("id")
                                                        java.lang.String id,
                                                        @Query("user_id")
                                                        java.lang.String userId,
                                                        @Query("parent_id") @Nullable
                                                        @Nullable java.lang.String parentId)
        Gets a draft message from a channel.
        Parameters:
        type - The channel type
        id - The channel ID
        userId - The user ID
        parentId - Optional parent message ID
        Returns:
        A response with the draft