fix(content): 전체 탭 query 값을 고정한다
This commit is contained in:
@@ -2,8 +2,6 @@ package kr.co.vividnext.sodalive.v2.main.content.data
|
||||
|
||||
import io.reactivex.rxjava3.core.Single
|
||||
import kr.co.vividnext.sodalive.common.ApiResponse
|
||||
import kr.co.vividnext.sodalive.home.SeriesPublishedDaysOfWeek
|
||||
import kr.co.vividnext.sodalive.v2.common.data.ContentSort
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Header
|
||||
import retrofit2.http.Query
|
||||
@@ -12,10 +10,10 @@ interface MainContentAllTabApi {
|
||||
@GET("/api/v2/audio/contents")
|
||||
fun getContents(
|
||||
@Header("Authorization") authHeader: String,
|
||||
@Query("type") type: MainContentAllType,
|
||||
@Query("sort") sort: ContentSort,
|
||||
@Query("type") type: String,
|
||||
@Query("sort") sort: String,
|
||||
@Query("page") page: Int,
|
||||
@Query("size") size: Int,
|
||||
@Query("dayOfWeek") dayOfWeek: SeriesPublishedDaysOfWeek?
|
||||
@Query("dayOfWeek") dayOfWeek: String?
|
||||
): Single<ApiResponse<MainContentAllTabResponse>>
|
||||
}
|
||||
|
||||
@@ -18,12 +18,22 @@ data class MainContentAllTabResponse(
|
||||
@SerializedName("hasNext") val hasNext: Boolean
|
||||
)
|
||||
|
||||
enum class MainContentAllType {
|
||||
AUDIO,
|
||||
SERIES,
|
||||
ORIGINAL,
|
||||
FREE,
|
||||
POINT
|
||||
@Keep
|
||||
enum class MainContentAllType(val queryValue: String) {
|
||||
@SerializedName("AUDIO")
|
||||
AUDIO("AUDIO"),
|
||||
|
||||
@SerializedName("SERIES")
|
||||
SERIES("SERIES"),
|
||||
|
||||
@SerializedName("ORIGINAL")
|
||||
ORIGINAL("ORIGINAL"),
|
||||
|
||||
@SerializedName("FREE")
|
||||
FREE("FREE"),
|
||||
|
||||
@SerializedName("POINT")
|
||||
POINT("POINT")
|
||||
}
|
||||
|
||||
@Keep
|
||||
|
||||
@@ -13,10 +13,10 @@ class MainContentAllTabRepository(private val api: MainContentAllTabApi) {
|
||||
dayOfWeek: SeriesPublishedDaysOfWeek?
|
||||
) = api.getContents(
|
||||
authHeader = token,
|
||||
type = type,
|
||||
sort = sort,
|
||||
type = type.queryValue,
|
||||
sort = sort.queryValue,
|
||||
page = page,
|
||||
size = size,
|
||||
dayOfWeek = dayOfWeek
|
||||
dayOfWeek = dayOfWeek?.queryValue
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user