Package io.getstream.chat.java.services
Interface MessageService
public interface MessageService
-
Method Summary
Modifier and TypeMethodDescriptionretrofit2.Call<Message.MessageCommitResponse>retrofit2.Call<Message.MessageDeleteResponse>retrofit2.Call<StreamResponseObject>deleteFile(String channelType, String channelId, String url) retrofit2.Call<StreamResponseObject>deleteImage(String channelType, String channelId, String url) retrofit2.Call<Message.MessageGetResponse>retrofit2.Call<Message.MessageGetManyResponse>retrofit2.Call<Message.MessageGetRepliesResponse>getReplies(String parentId, String idGte, String idGt, String idLte, String idLt, Date createdAtAfterOrEqual, Date createdAtAfter, Date createdAtBeforeOrEqual, Date createdAtBefore) retrofit2.Call<Message.MessagePartialUpdateResponse>partialUpdate(String id, Message.MessagePartialUpdateRequestData messagePartialUpdateRequestData) retrofit2.Call<Message.MessageRunCommandActionResponse>runCommandAction(String messageId, Message.MessageRunCommandActionRequestData messageRunCommandActionRequestData) retrofit2.Call<Message.MessageSearchResponse>search(Message.MessageSearchRequestData messageSearchRequestData) retrofit2.Call<Message.MessageSendResponse>send(String channelType, String channelId, Message.MessageSendRequestData messageSendRequestData) retrofit2.Call<Message.MessageTranslateResponse>translate(String messageId, Message.MessageTranslateRequestData messageTranslateRequestData) retrofit2.Call<StreamResponseObject>unblockMessage(Message.MessageUnblockRequestData messageUnblockRequestData) retrofit2.Call<Message.MessageUpdateResponse>update(String id, Message.MessageUpdateRequestData messageUpdateRequestData) retrofit2.Call<Message.MessageUploadFileResponse>uploadFile(String channelType, String channelId, okhttp3.RequestBody userRequestBody, okhttp3.MultipartBody.Part multipartFile) retrofit2.Call<Message.MessageUploadImageResponse>uploadImage(String channelType, String channelId, okhttp3.RequestBody userRequestBody, okhttp3.MultipartBody.Part multipartFile, okhttp3.RequestBody uploadSizesRequestBody)
-
Method Details
-
send
@POST("channels/{type}/{id}/message") retrofit2.Call<Message.MessageSendResponse> send(@NotNull @Path("type") String channelType, @NotNull @Path("id") String channelId, @NotNull @Body Message.MessageSendRequestData messageSendRequestData) -
update
@POST("messages/{id}") retrofit2.Call<Message.MessageUpdateResponse> update(@NotNull @Path("id") String id, @NotNull @Body Message.MessageUpdateRequestData messageUpdateRequestData) -
search
@GET("search") retrofit2.Call<Message.MessageSearchResponse> search(@NotNull @Query("payload") Message.MessageSearchRequestData messageSearchRequestData) -
commit
@POST("messages/{id}/commit") retrofit2.Call<Message.MessageCommitResponse> commit(@NotNull @Path("id") String messageId) -
uploadFile
@Multipart @Headers("X-Stream-LogRequestBody: false") @POST("channels/{type}/{id}/file") retrofit2.Call<Message.MessageUploadFileResponse> uploadFile(@NotNull @Path("type") String channelType, @NotNull @Path("id") String channelId, @NotNull @Part("user") okhttp3.RequestBody userRequestBody, @NotNull @Part okhttp3.MultipartBody.Part multipartFile) -
uploadImage
@Multipart @Headers("X-Stream-LogRequestBody: false") @POST("channels/{type}/{id}/image") retrofit2.Call<Message.MessageUploadImageResponse> uploadImage(@NotNull @Path("type") String channelType, @NotNull @Path("id") String channelId, @NotNull @Part("user") okhttp3.RequestBody userRequestBody, @NotNull @Part okhttp3.MultipartBody.Part multipartFile, @NotNull @Part("upload_sizes") okhttp3.RequestBody uploadSizesRequestBody) -
deleteFile
@DELETE("channels/{type}/{id}/file") retrofit2.Call<StreamResponseObject> deleteFile(@NotNull @Path("type") String channelType, @NotNull @Path("id") String channelId, @NotNull @Query("url") String url) -
deleteImage
@DELETE("channels/{type}/{id}/image") retrofit2.Call<StreamResponseObject> deleteImage(@NotNull @Path("type") String channelType, @NotNull @Path("id") String channelId, @NotNull @Query("url") String url) -
delete
@DELETE("messages/{id}") retrofit2.Call<Message.MessageDeleteResponse> delete(@NotNull @Path("id") String id, @Nullable @Query("hard") Boolean hard) -
get
@GET("messages/{id}") retrofit2.Call<Message.MessageGetResponse> get(@NotNull @Path("id") String id, @Nullable @Query("show_deleted_message") Boolean showDeletedMessage) -
getMany
@GET("channels/{type}/{id}/messages") retrofit2.Call<Message.MessageGetManyResponse> getMany(@NotNull @Path("type") String channelType, @NotNull @Path("id") String channelId, @NotNull @Query("ids") String messageIds) -
getReplies
@GET("messages/{parent_id}/replies") retrofit2.Call<Message.MessageGetRepliesResponse> getReplies(@NotNull @Path("parent_id") String parentId, @Nullable @Query("id_gte") String idGte, @Nullable @Query("id_gt") String idGt, @Nullable @Query("id_lte") String idLte, @Nullable @Query("id_lt") String idLt, @Nullable @Query("created_at_after_or_equal") Date createdAtAfterOrEqual, @Nullable @Query("created_at_after") Date createdAtAfter, @Nullable @Query("created_at_before_or_equal") Date createdAtBeforeOrEqual, @Nullable @Query("created_at_before") Date createdAtBefore) -
runCommandAction
@POST("messages/{id}/action") retrofit2.Call<Message.MessageRunCommandActionResponse> runCommandAction(@NotNull @Path("id") String messageId, @NotNull @Body Message.MessageRunCommandActionRequestData messageRunCommandActionRequestData) -
translate
@POST("messages/{id}/translate") retrofit2.Call<Message.MessageTranslateResponse> translate(@NotNull @Path("id") String messageId, @NotNull @Body Message.MessageTranslateRequestData messageTranslateRequestData) -
partialUpdate
@PUT("messages/{id}") retrofit2.Call<Message.MessagePartialUpdateResponse> partialUpdate(@NotNull @Path("id") String id, @NotNull @Body Message.MessagePartialUpdateRequestData messagePartialUpdateRequestData) -
unblockMessage
@POST("moderation/unblock_message") retrofit2.Call<StreamResponseObject> unblockMessage(@NotNull @Body Message.MessageUnblockRequestData messageUnblockRequestData)
-