feat(content): 익명 추천 조회와 서브 배너 응답을 추가한다
This commit is contained in:
+1
-1
@@ -8,6 +8,6 @@ import retrofit2.http.Header
|
||||
interface AudioRecommendationsApi {
|
||||
@GET("/api/v2/audio/recommendations")
|
||||
fun getRecommendations(
|
||||
@Header("Authorization") authHeader: String
|
||||
@Header("Authorization") authHeader: String?
|
||||
): Single<ApiResponse<AudioRecommendationsResponse>>
|
||||
}
|
||||
|
||||
+3
-1
@@ -3,6 +3,7 @@ package kr.co.vividnext.sodalive.v2.main.content.data
|
||||
import androidx.annotation.Keep
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kr.co.vividnext.sodalive.settings.event.EventItem
|
||||
import kr.co.vividnext.sodalive.v2.widget.subbanner.SubBannerResponse
|
||||
|
||||
@Keep
|
||||
data class AudioRecommendationsResponse(
|
||||
@@ -13,7 +14,8 @@ data class AudioRecommendationsResponse(
|
||||
@SerializedName("freeAudios") val freeAudios: List<AudioCardResponse>,
|
||||
@SerializedName("pointAudios") val pointAudios: List<AudioCardResponse>,
|
||||
@SerializedName("mostCommentedAudios") val mostCommentedAudios: List<CommentedAudioResponse>,
|
||||
@SerializedName("recommendedAudios") val recommendedAudios: List<AudioCardResponse>
|
||||
@SerializedName("recommendedAudios") val recommendedAudios: List<AudioCardResponse>,
|
||||
@SerializedName("subBanners") val subBanners: List<SubBannerResponse?>? = null
|
||||
)
|
||||
|
||||
@Keep
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package kr.co.vividnext.sodalive.v2.main.content.data
|
||||
|
||||
class AudioRecommendationsRepository(private val api: AudioRecommendationsApi) {
|
||||
fun getRecommendations(token: String) = api.getRecommendations(authHeader = token)
|
||||
fun getRecommendations(token: String?) = api.getRecommendations(authHeader = token?.takeIf { it.isNotBlank() })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user