feat(chat): 채팅방 목록 API와 저장소를 추가한다

This commit is contained in:
2026-06-09 23:30:11 +09:00
parent 06e4b5ad34
commit 32c30132b9
3 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package kr.co.vividnext.sodalive.v2.main.chat.data
import io.reactivex.rxjava3.core.Single
import kr.co.vividnext.sodalive.common.ApiResponse
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Query
interface ChatRoomApi {
@GET("/api/v2/chat/rooms")
fun getChatRooms(
@Header("Authorization") authHeader: String,
@Query("filter") filter: String,
@Query("cursor") cursor: String?
): Single<ApiResponse<ChatRoomListPageResponse>>
}

View File

@@ -0,0 +1,16 @@
package kr.co.vividnext.sodalive.v2.main.chat.data
import io.reactivex.rxjava3.core.Single
import kr.co.vividnext.sodalive.common.ApiResponse
class ChatRoomRepository(private val api: ChatRoomApi) {
fun getChatRooms(
token: String,
filter: String,
cursor: String?
): Single<ApiResponse<ChatRoomListPageResponse>> = api.getChatRooms(
authHeader = token,
filter = filter,
cursor = cursor
)
}