콘텐츠 메인

- 홈 UI 페이지 생성
This commit is contained in:
Yu Sung
2025-02-20 23:31:59 +09:00
parent e641636007
commit 48ebc1eaef
35 changed files with 1517 additions and 4 deletions

View File

@@ -38,6 +38,8 @@ enum ContentApi {
case unpinContent(contentId: Int)
case getAudioContentByTheme(themeId: Int, isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int, sort: ContentAllByThemeViewModel.Sort)
case generateUrl(contentId: Int)
case getContentMainHome
case getPopularContentByCreator(creatorId: Int)
}
extension ContentApi: TargetType {
@@ -133,6 +135,12 @@ extension ContentApi: TargetType {
case .generateUrl(let contentId):
return "/audio-content/\(contentId)/generate-url"
case .getContentMainHome:
return "/v2/audio-content/main/home"
case .getPopularContentByCreator:
return "/v2/audio-content/main/home/popular-content-by-creator"
}
}
@@ -147,6 +155,9 @@ extension ContentApi: TargetType {
case .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList, .getCurationList, .getAudioContentByTheme:
return .get
case .getContentMainHome, .getPopularContentByCreator:
return .get
case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent:
return .put
@@ -300,6 +311,13 @@ extension ContentApi: TargetType {
] as [String : Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getContentMainHome:
return .requestPlain
case .getPopularContentByCreator(let creatorId):
let parameters = ["creatorId": creatorId]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
}
}