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 io.reactivex.rxjava3.core.Single
|
||||||
import kr.co.vividnext.sodalive.common.ApiResponse
|
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.GET
|
||||||
import retrofit2.http.Header
|
import retrofit2.http.Header
|
||||||
import retrofit2.http.Query
|
import retrofit2.http.Query
|
||||||
@@ -12,10 +10,10 @@ interface MainContentAllTabApi {
|
|||||||
@GET("/api/v2/audio/contents")
|
@GET("/api/v2/audio/contents")
|
||||||
fun getContents(
|
fun getContents(
|
||||||
@Header("Authorization") authHeader: String,
|
@Header("Authorization") authHeader: String,
|
||||||
@Query("type") type: MainContentAllType,
|
@Query("type") type: String,
|
||||||
@Query("sort") sort: ContentSort,
|
@Query("sort") sort: String,
|
||||||
@Query("page") page: Int,
|
@Query("page") page: Int,
|
||||||
@Query("size") size: Int,
|
@Query("size") size: Int,
|
||||||
@Query("dayOfWeek") dayOfWeek: SeriesPublishedDaysOfWeek?
|
@Query("dayOfWeek") dayOfWeek: String?
|
||||||
): Single<ApiResponse<MainContentAllTabResponse>>
|
): Single<ApiResponse<MainContentAllTabResponse>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,22 @@ data class MainContentAllTabResponse(
|
|||||||
@SerializedName("hasNext") val hasNext: Boolean
|
@SerializedName("hasNext") val hasNext: Boolean
|
||||||
)
|
)
|
||||||
|
|
||||||
enum class MainContentAllType {
|
@Keep
|
||||||
AUDIO,
|
enum class MainContentAllType(val queryValue: String) {
|
||||||
SERIES,
|
@SerializedName("AUDIO")
|
||||||
ORIGINAL,
|
AUDIO("AUDIO"),
|
||||||
FREE,
|
|
||||||
POINT
|
@SerializedName("SERIES")
|
||||||
|
SERIES("SERIES"),
|
||||||
|
|
||||||
|
@SerializedName("ORIGINAL")
|
||||||
|
ORIGINAL("ORIGINAL"),
|
||||||
|
|
||||||
|
@SerializedName("FREE")
|
||||||
|
FREE("FREE"),
|
||||||
|
|
||||||
|
@SerializedName("POINT")
|
||||||
|
POINT("POINT")
|
||||||
}
|
}
|
||||||
|
|
||||||
@Keep
|
@Keep
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ class MainContentAllTabRepository(private val api: MainContentAllTabApi) {
|
|||||||
dayOfWeek: SeriesPublishedDaysOfWeek?
|
dayOfWeek: SeriesPublishedDaysOfWeek?
|
||||||
) = api.getContents(
|
) = api.getContents(
|
||||||
authHeader = token,
|
authHeader = token,
|
||||||
type = type,
|
type = type.queryValue,
|
||||||
sort = sort,
|
sort = sort.queryValue,
|
||||||
page = page,
|
page = page,
|
||||||
size = size,
|
size = size,
|
||||||
dayOfWeek = dayOfWeek
|
dayOfWeek = dayOfWeek?.queryValue
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user