feat(creator): 오디오 탭 API 계약을 추가한다

This commit is contained in:
2026-06-19 15:41:25 +09:00
parent a0274518d2
commit 4e4d13b4de
3 changed files with 54 additions and 0 deletions

View File

@@ -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
)

View File

@@ -3,6 +3,7 @@ package kr.co.vividnext.sodalive.v2.creator.channel.data
import io.reactivex.rxjava3.core.Single
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 retrofit2.http.GET
import retrofit2.http.Header
@@ -24,4 +25,14 @@ interface CreatorChannelApi {
@Query("sort") sort: ContentSort,
@Header("Authorization") authHeader: String
): 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>>
}

View File

@@ -36,6 +36,22 @@ class CreatorChannelRepository(
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(
creatorId: Long,
follow: Boolean,