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