feat(dm): 음성 메시지 API 계약을 추가한다
This commit is contained in:
@@ -2,10 +2,14 @@ package kr.co.vividnext.sodalive.v2.main.chat.dm.data
|
|||||||
|
|
||||||
import io.reactivex.rxjava3.core.Single
|
import io.reactivex.rxjava3.core.Single
|
||||||
import kr.co.vividnext.sodalive.common.ApiResponse
|
import kr.co.vividnext.sodalive.common.ApiResponse
|
||||||
|
import okhttp3.MultipartBody
|
||||||
|
import okhttp3.RequestBody
|
||||||
import retrofit2.http.Body
|
import retrofit2.http.Body
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
|
import retrofit2.http.Multipart
|
||||||
import retrofit2.http.Header
|
import retrofit2.http.Header
|
||||||
import retrofit2.http.POST
|
import retrofit2.http.POST
|
||||||
|
import retrofit2.http.Part
|
||||||
import retrofit2.http.Path
|
import retrofit2.http.Path
|
||||||
import retrofit2.http.Query
|
import retrofit2.http.Query
|
||||||
|
|
||||||
@@ -30,4 +34,13 @@ interface DmChatApi {
|
|||||||
@Query("cursor") cursor: Long?,
|
@Query("cursor") cursor: Long?,
|
||||||
@Query("limit") limit: Int = 20
|
@Query("limit") limit: Int = 20
|
||||||
): Single<ApiResponse<DmChatMessagesPageResponse>>
|
): Single<ApiResponse<DmChatMessagesPageResponse>>
|
||||||
|
|
||||||
|
@Multipart
|
||||||
|
@POST("/api/v2/user-creator-chat/rooms/{roomId}/messages/voice")
|
||||||
|
fun sendDmVoiceMessage(
|
||||||
|
@Header("Authorization") authHeader: String,
|
||||||
|
@Path("roomId") roomId: Long,
|
||||||
|
@Part voiceMessageFile: MultipartBody.Part,
|
||||||
|
@Part("request") request: RequestBody
|
||||||
|
): Single<ApiResponse<SendDmVoiceMessageResponse>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,3 +42,10 @@ data class DmChatMessageResponse(
|
|||||||
@SerializedName("senderNickname") val senderNickname: String,
|
@SerializedName("senderNickname") val senderNickname: String,
|
||||||
@SerializedName("senderProfileImageUrl") val senderProfileImageUrl: String
|
@SerializedName("senderProfileImageUrl") val senderProfileImageUrl: String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class SendDmVoiceMessageResponse(
|
||||||
|
@SerializedName("message") val message: DmChatMessageResponse,
|
||||||
|
@SerializedName("deliveredRealtime") val deliveredRealtime: Boolean,
|
||||||
|
@SerializedName("pushSent") val pushSent: Boolean
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user