feat(creator): 오디오 탭 API 계약을 추가한다
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
package kr.co.vividnext.sodalive.v2.creator.channel.audio.data
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
import kr.co.vividnext.sodalive.v2.common.data.ContentSort
|
||||||
|
import kr.co.vividnext.sodalive.v2.creator.channel.data.CreatorChannelAudioContentResponse
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class CreatorChannelAudioTabResponse(
|
||||||
|
@SerializedName("audioContentCount") val audioContentCount: Int,
|
||||||
|
@SerializedName("themes") val themes: List<CreatorChannelAudioThemeResponse>,
|
||||||
|
@SerializedName("themeId") val themeId: Long?,
|
||||||
|
@SerializedName("purchasedAudioContentRate") val purchasedAudioContentRate: Double,
|
||||||
|
@SerializedName("purchasedAudioContentCount") val purchasedAudioContentCount: Int,
|
||||||
|
@SerializedName("paidAudioContentCount") val paidAudioContentCount: Int,
|
||||||
|
@SerializedName("audioContents") val audioContents: List<CreatorChannelAudioContentResponse>,
|
||||||
|
@SerializedName("sort") val sort: ContentSort,
|
||||||
|
@SerializedName("page") val page: Int,
|
||||||
|
@SerializedName("size") val size: Int,
|
||||||
|
@SerializedName("hasNext") val hasNext: Boolean
|
||||||
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class CreatorChannelAudioThemeResponse(
|
||||||
|
@SerializedName("themeId") val themeId: Long,
|
||||||
|
@SerializedName("themeName") val themeName: String
|
||||||
|
)
|
||||||
@@ -3,6 +3,7 @@ package kr.co.vividnext.sodalive.v2.creator.channel.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.v2.common.data.ContentSort
|
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.live.data.CreatorChannelLiveTabResponse
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
import retrofit2.http.Header
|
import retrofit2.http.Header
|
||||||
@@ -24,4 +25,14 @@ interface CreatorChannelApi {
|
|||||||
@Query("sort") sort: ContentSort,
|
@Query("sort") sort: ContentSort,
|
||||||
@Header("Authorization") authHeader: String
|
@Header("Authorization") authHeader: String
|
||||||
): Single<ApiResponse<CreatorChannelLiveTabResponse>>
|
): Single<ApiResponse<CreatorChannelLiveTabResponse>>
|
||||||
|
|
||||||
|
@GET("/api/v2/creator-channels/{creatorId}/audio")
|
||||||
|
fun getAudio(
|
||||||
|
@Path("creatorId") creatorId: Long,
|
||||||
|
@Query("page") page: Int,
|
||||||
|
@Query("size") size: Int,
|
||||||
|
@Query("sort") sort: ContentSort,
|
||||||
|
@Query("themeId") themeId: Long?,
|
||||||
|
@Header("Authorization") authHeader: String
|
||||||
|
): Single<ApiResponse<CreatorChannelAudioTabResponse>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,22 @@ class CreatorChannelRepository(
|
|||||||
authHeader = token
|
authHeader = token
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun getAudio(
|
||||||
|
creatorId: Long,
|
||||||
|
page: Int,
|
||||||
|
size: Int,
|
||||||
|
sort: ContentSort,
|
||||||
|
themeId: Long?,
|
||||||
|
token: String
|
||||||
|
) = api.getAudio(
|
||||||
|
creatorId = creatorId,
|
||||||
|
page = page,
|
||||||
|
size = size,
|
||||||
|
sort = sort,
|
||||||
|
themeId = themeId,
|
||||||
|
authHeader = token
|
||||||
|
)
|
||||||
|
|
||||||
fun followCreator(
|
fun followCreator(
|
||||||
creatorId: Long,
|
creatorId: Long,
|
||||||
follow: Boolean,
|
follow: Boolean,
|
||||||
|
|||||||
Reference in New Issue
Block a user