feat(creator): 시리즈 탭 API 계약을 추가한다
This commit is contained in:
@@ -5,6 +5,7 @@ import kr.co.vividnext.sodalive.common.ApiResponse
|
||||
import kr.co.vividnext.sodalive.v2.common.data.ContentSort
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.audio.data.CreatorChannelAudioTabResponse
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.data.CreatorChannelLiveTabResponse
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.series.data.CreatorChannelSeriesTabResponse
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Header
|
||||
import retrofit2.http.Path
|
||||
@@ -35,4 +36,13 @@ interface CreatorChannelApi {
|
||||
@Query("themeId") themeId: Long?,
|
||||
@Header("Authorization") authHeader: String
|
||||
): Single<ApiResponse<CreatorChannelAudioTabResponse>>
|
||||
|
||||
@GET("/api/v2/creator-channels/{creatorId}/series")
|
||||
fun getSeries(
|
||||
@Path("creatorId") creatorId: Long,
|
||||
@Query("page") page: Int,
|
||||
@Query("size") size: Int,
|
||||
@Query("sort") sort: ContentSort,
|
||||
@Header("Authorization") authHeader: String
|
||||
): Single<ApiResponse<CreatorChannelSeriesTabResponse>>
|
||||
}
|
||||
|
||||
@@ -52,6 +52,20 @@ class CreatorChannelRepository(
|
||||
authHeader = token
|
||||
)
|
||||
|
||||
fun getSeries(
|
||||
creatorId: Long,
|
||||
page: Int,
|
||||
size: Int,
|
||||
sort: ContentSort,
|
||||
token: String
|
||||
) = api.getSeries(
|
||||
creatorId = creatorId,
|
||||
page = page,
|
||||
size = size,
|
||||
sort = sort,
|
||||
authHeader = token
|
||||
)
|
||||
|
||||
fun followCreator(
|
||||
creatorId: Long,
|
||||
follow: Boolean,
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package kr.co.vividnext.sodalive.v2.creator.channel.series.data
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kr.co.vividnext.sodalive.v2.common.data.ContentSort
|
||||
|
||||
@Keep
|
||||
data class CreatorChannelSeriesTabResponse(
|
||||
@SerializedName("seriesCount") val seriesCount: Int,
|
||||
@SerializedName("series") val series: List<CreatorChannelSeriesResponse>,
|
||||
@SerializedName("sort") val sort: ContentSort,
|
||||
@SerializedName("page") val page: Int,
|
||||
@SerializedName("size") val size: Int,
|
||||
@SerializedName("hasNext") val hasNext: Boolean
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class CreatorChannelSeriesResponse(
|
||||
@SerializedName("seriesId") val seriesId: Long,
|
||||
@SerializedName("title") val title: String,
|
||||
@SerializedName("coverImageUrl") val coverImageUrl: String?,
|
||||
@SerializedName("publishedDaysOfWeek") val publishedDaysOfWeek: String?,
|
||||
@SerializedName("contentCount") val contentCount: Int,
|
||||
@SerializedName("isProceeding") val isProceeding: Boolean,
|
||||
@SerializedName("isOriginal") val isOriginal: Boolean,
|
||||
@SerializedName("isAdult") val isAdult: Boolean,
|
||||
@SerializedName("purchasedContentCount") val purchasedContentCount: Int?,
|
||||
@SerializedName("paidContentCount") val paidContentCount: Int?,
|
||||
@SerializedName("purchasedPaidContentRate") val purchasedPaidContentRate: Double?
|
||||
)
|
||||
Reference in New Issue
Block a user