feat(recommendation): 추천 서브 배너와 연속 순환을 추가한다
This commit is contained in:
+6
@@ -2,6 +2,7 @@ import Foundation
|
||||
|
||||
struct AudioRecommendationsResponse: Decodable {
|
||||
let banners: [AudioBannerResponse]
|
||||
let subBanners: [SubBanner]
|
||||
let originalSeries: [OriginalSeriesResponse]
|
||||
let latestAudios: [AudioCardResponse]
|
||||
let newAndHotAudios: [AudioCardResponse]
|
||||
@@ -10,8 +11,13 @@ struct AudioRecommendationsResponse: Decodable {
|
||||
let mostCommentedAudios: [CommentedAudioResponse]
|
||||
let recommendedAudios: [AudioCardResponse]
|
||||
|
||||
var eligibleSubBanners: [SubBanner] {
|
||||
subBanners.filter { $0.placement == .contentRecommendation && $0.isEligible }
|
||||
}
|
||||
|
||||
var isEmpty: Bool {
|
||||
banners.isEmpty &&
|
||||
eligibleSubBanners.isEmpty &&
|
||||
originalSeries.isEmpty &&
|
||||
latestAudios.isEmpty &&
|
||||
newAndHotAudios.isEmpty &&
|
||||
|
||||
Reference in New Issue
Block a user