콘텐츠 메인

- 단편 탭 UI 페이지 생성
This commit is contained in:
Yu Sung
2025-02-22 01:41:03 +09:00
parent 6bd27c5301
commit e9e7403579
18 changed files with 1018 additions and 95 deletions

View File

@@ -45,6 +45,11 @@ enum ContentApi {
case getContentMainSeries
case getRecommendSeriesListByGenre(genreId: Int)
case getRecommendSeriesByCreator(creatorId: Int)
case getContentMainContent
case getContentMainNewContentOfTheme(theme: String, isAdultContentVisible: Bool, contentType: ContentType)
case getDailyContentRanking(sortType: String)
case getRecommendContentByTag(tag: String)
}
extension ContentApi: TargetType {
@@ -155,6 +160,18 @@ extension ContentApi: TargetType {
case .getRecommendSeriesByCreator:
return "/v2/audio-content/main/series/recommend-series-by-creator"
case .getContentMainContent:
return "/v2/audio-content/main/content"
case .getContentMainNewContentOfTheme:
return "/v2/audio-content/main/content/new-content-by-theme"
case .getDailyContentRanking:
return "/v2/audio-content/main/content/ranking"
case .getRecommendContentByTag:
return "/v2/audio-content/main/content/recommend-content-by-tag"
}
}
@@ -169,7 +186,8 @@ extension ContentApi: TargetType {
case .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList, .getCurationList, .getAudioContentByTheme:
return .get
case .getContentMainHome, .getPopularContentByCreator, .getContentMainSeries, .getRecommendSeriesListByGenre, .getRecommendSeriesByCreator:
case .getContentMainHome, .getPopularContentByCreator, .getContentMainSeries, .getRecommendSeriesListByGenre, .getRecommendSeriesByCreator, .getContentMainContent,
.getContentMainNewContentOfTheme, .getDailyContentRanking, .getRecommendContentByTag:
return .get
case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent:
@@ -326,7 +344,7 @@ extension ContentApi: TargetType {
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getContentMainHome, .getContentMainSeries:
case .getContentMainHome, .getContentMainSeries, .getContentMainContent:
return .requestPlain
case .getRecommendSeriesListByGenre(let genreId):
@@ -340,6 +358,22 @@ extension ContentApi: TargetType {
case .getRecommendSeriesByCreator(let creatorId):
let parameters = ["creatorId": creatorId]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getContentMainNewContentOfTheme(let theme, let isAdultContentVisible, let contentType):
let parameters = [
"theme": theme,
"isAdultContentVisible": isAdultContentVisible,
"contentType": contentType
] as [String : Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getDailyContentRanking(let sortType):
let parameters = ["sortType": sortType]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getRecommendContentByTag(let tag):
let parameters = ["tag": tag]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
}
}