Package io.getstream.chat.java.services
Interface DraftService
-
public interface DraftServiceService for managing draft messages in channels.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description retrofit2.Call<Draft.CreateDraftResponse>createDraft(java.lang.String type, java.lang.String id, Draft.CreateDraftRequestData request)Creates a draft message in a channel.retrofit2.Call<StreamResponseObject>deleteDraft(java.lang.String type, java.lang.String id, java.lang.String userId, @Nullable java.lang.String parentId)Deletes a draft message from a channel.retrofit2.Call<Draft.GetDraftResponse>getDraft(java.lang.String type, java.lang.String id, java.lang.String userId, @Nullable java.lang.String parentId)Gets a draft message from a channel.retrofit2.Call<Draft.QueryDraftsResponse>queryDrafts(Draft.QueryDraftsRequestData request)Queries all drafts for a user.
-
-
-
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 typeid- The channel IDrequest- 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 typeid- The channel IDuserId- The user IDparentId- 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 typeid- The channel IDuserId- The user IDparentId- Optional parent message ID- Returns:
- A response with the draft
-
queryDrafts
@POST("drafts/query") retrofit2.Call<Draft.QueryDraftsResponse> queryDrafts(@Body Draft.QueryDraftsRequestData request)Queries all drafts for a user.- Parameters:
request- The query parameters- Returns:
- A response with the matching drafts
-
-