feat(home): 홈 추천 콘텐츠 섹션 추가
This commit is contained in:
@@ -12,6 +12,7 @@ enum HomeApi {
|
||||
case getHomeData(isAdultContentVisible: Bool, contentType: ContentType)
|
||||
case getLatestContentByTheme(theme: String, isAdultContentVisible: Bool, contentType: ContentType)
|
||||
case getDayOfWeekSeriesList(dayOfWeek: SeriesPublishedDaysOfWeek, isAdultContentVisible: Bool, contentType: ContentType)
|
||||
case getRecommendContents(isAdultContentVisible: Bool, contentType: ContentType)
|
||||
}
|
||||
|
||||
extension HomeApi: TargetType {
|
||||
@@ -29,6 +30,9 @@ extension HomeApi: TargetType {
|
||||
|
||||
case .getDayOfWeekSeriesList:
|
||||
return "/api/home/day-of-week-series"
|
||||
|
||||
case .getRecommendContents:
|
||||
return "/api/home/recommend-contents"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +67,14 @@ extension HomeApi: TargetType {
|
||||
"contentType": contentType
|
||||
] as [String: Any]
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
|
||||
case .getRecommendContents(let isAdultContentVisible, let contentType):
|
||||
let parameters = [
|
||||
"isAdultContentVisible": isAdultContentVisible,
|
||||
"contentType": contentType
|
||||
] as [String: Any]
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user