콘텐츠 메인

- 모닝콜 탭 UI 페이지 생성
This commit is contained in:
Yu Sung
2025-02-22 04:42:50 +09:00
parent e9e7403579
commit 53266dc91b
12 changed files with 345 additions and 6 deletions

View File

@@ -50,6 +50,9 @@ enum ContentApi {
case getContentMainNewContentOfTheme(theme: String, isAdultContentVisible: Bool, contentType: ContentType)
case getDailyContentRanking(sortType: String)
case getRecommendContentByTag(tag: String)
case getContentMainAlarm
case getContentMainAlarmAll(theme: String, page: Int, size: Int)
}
extension ContentApi: TargetType {
@@ -172,6 +175,12 @@ extension ContentApi: TargetType {
case .getRecommendContentByTag:
return "/v2/audio-content/main/content/recommend-content-by-tag"
case .getContentMainAlarm:
return "/v2/audio-content/main/alarm"
case .getContentMainAlarmAll:
return "/v2/audio-content/main/alarm/all"
}
}
@@ -187,7 +196,7 @@ extension ContentApi: TargetType {
return .get
case .getContentMainHome, .getPopularContentByCreator, .getContentMainSeries, .getRecommendSeriesListByGenre, .getRecommendSeriesByCreator, .getContentMainContent,
.getContentMainNewContentOfTheme, .getDailyContentRanking, .getRecommendContentByTag:
.getContentMainNewContentOfTheme, .getDailyContentRanking, .getRecommendContentByTag, .getContentMainAlarm, .getContentMainAlarmAll:
return .get
case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent:
@@ -344,7 +353,7 @@ extension ContentApi: TargetType {
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getContentMainHome, .getContentMainSeries, .getContentMainContent:
case .getContentMainHome, .getContentMainSeries, .getContentMainContent, .getContentMainAlarm:
return .requestPlain
case .getRecommendSeriesListByGenre(let genreId):
@@ -374,6 +383,15 @@ extension ContentApi: TargetType {
case .getRecommendContentByTag(let tag):
let parameters = ["tag": tag]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getContentMainAlarmAll(let theme, let page, let size):
let parameters = [
"theme": theme,
"page": page - 1,
"size": size
] as [String : Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
}
}