Interface MessageService


  • public interface MessageService
    • Method Detail

      • send

        @POST("channels/{type}/{id}/message")
        retrofit2.Call<Message.MessageSendResponse> send​(@NotNull @Path("type")
                                                         @NotNull java.lang.String channelType,
                                                         @NotNull @Path("id")
                                                         @NotNull java.lang.String channelId,
                                                         @NotNull @Body
                                                         @NotNull Message.MessageSendRequestData messageSendRequestData)
      • commit

        @POST("messages/{id}/commit")
        retrofit2.Call<Message.MessageCommitResponse> commit​(@NotNull @Path("id")
                                                             @NotNull java.lang.String messageId)
      • uploadFile

        @Multipart
        @Headers("X-Stream-LogRequestBody: false")
        @POST("channels/{type}/{id}/file")
        retrofit2.Call<Message.MessageUploadFileResponse> uploadFile​(@NotNull @Path("type")
                                                                     @NotNull java.lang.String channelType,
                                                                     @NotNull @Path("id")
                                                                     @NotNull java.lang.String channelId,
                                                                     @NotNull @Part("user")
                                                                     @NotNull 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")
                                                                       @NotNull java.lang.String channelType,
                                                                       @NotNull @Path("id")
                                                                       @NotNull java.lang.String channelId,
                                                                       @NotNull @Part("user")
                                                                       @NotNull okhttp3.RequestBody userRequestBody,
                                                                       @NotNull @Part
                                                                       okhttp3.MultipartBody.Part multipartFile,
                                                                       @NotNull @Part("upload_sizes")
                                                                       @NotNull okhttp3.RequestBody uploadSizesRequestBody)
      • deleteFile

        @DELETE("channels/{type}/{id}/file")
        retrofit2.Call<StreamResponseObject> deleteFile​(@NotNull @Path("type")
                                                        @NotNull java.lang.String channelType,
                                                        @NotNull @Path("id")
                                                        @NotNull java.lang.String channelId,
                                                        @NotNull @Query("url")
                                                        @NotNull java.lang.String url)
      • deleteImage

        @DELETE("channels/{type}/{id}/image")
        retrofit2.Call<StreamResponseObject> deleteImage​(@NotNull @Path("type")
                                                         @NotNull java.lang.String channelType,
                                                         @NotNull @Path("id")
                                                         @NotNull java.lang.String channelId,
                                                         @NotNull @Query("url")
                                                         @NotNull java.lang.String url)
      • delete

        @DELETE("messages/{id}")
        retrofit2.Call<Message.MessageDeleteResponse> delete​(@NotNull @Path("id")
                                                             @NotNull java.lang.String id,
                                                             @Nullable @Query("hard")
                                                             @Nullable java.lang.Boolean hard,
                                                             @Nullable @Query("deleted_by")
                                                             @Nullable java.lang.String deletedBy,
                                                             @Nullable @Query("delete_for_me")
                                                             @Nullable java.lang.Boolean deleteForMe)
      • get

        @GET("messages/{id}")
        retrofit2.Call<Message.MessageGetResponse> get​(@NotNull @Path("id")
                                                       @NotNull java.lang.String id,
                                                       @Nullable @Query("show_deleted_message")
                                                       @Nullable java.lang.Boolean showDeletedMessage)
      • getMany

        @GET("channels/{type}/{id}/messages")
        retrofit2.Call<Message.MessageGetManyResponse> getMany​(@NotNull @Path("type")
                                                               @NotNull java.lang.String channelType,
                                                               @NotNull @Path("id")
                                                               @NotNull java.lang.String channelId,
                                                               @NotNull @Query("ids")
                                                               @NotNull java.lang.String messageIds)
      • getReplies

        @GET("messages/{parent_id}/replies")
        retrofit2.Call<Message.MessageGetRepliesResponse> getReplies​(@NotNull @Path("parent_id")
                                                                     @NotNull java.lang.String parentId,
                                                                     @Nullable @Query("id_gte")
                                                                     @Nullable java.lang.String idGte,
                                                                     @Nullable @Query("id_gt")
                                                                     @Nullable java.lang.String idGt,
                                                                     @Nullable @Query("id_lte")
                                                                     @Nullable java.lang.String idLte,
                                                                     @Nullable @Query("id_lt")
                                                                     @Nullable java.lang.String idLt,
                                                                     @Nullable @Query("created_at_after_or_equal")
                                                                     @Nullable java.util.Date createdAtAfterOrEqual,
                                                                     @Nullable @Query("created_at_after")
                                                                     @Nullable java.util.Date createdAtAfter,
                                                                     @Nullable @Query("created_at_before_or_equal")
                                                                     @Nullable java.util.Date createdAtBeforeOrEqual,
                                                                     @Nullable @Query("created_at_before")
                                                                     @Nullable java.util.Date createdAtBefore)