From f980089dc35c5036cd8120cedcc6ce46940af16c Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 26 Feb 2025 18:57:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EB=A9=94?= =?UTF-8?q?=EC=9D=B8=20=EB=8B=A8=ED=8E=B8=20=ED=83=AD=20-=20=EC=B1=84?= =?UTF-8?q?=EB=84=90=EB=B3=84=20=EC=B6=94=EC=B2=9C=20=EB=8B=A8=ED=8E=B8=20?= =?UTF-8?q?API=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SodaLive/Sources/Content/ContentApi.swift | 10 +++++++++- .../V2/Content/ContentMainTabContentRepository.swift | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/SodaLive/Sources/Content/ContentApi.swift b/SodaLive/Sources/Content/ContentApi.swift index 31d473f..2a1301c 100644 --- a/SodaLive/Sources/Content/ContentApi.swift +++ b/SodaLive/Sources/Content/ContentApi.swift @@ -51,6 +51,7 @@ enum ContentApi { case getContentMainNewContentOfTheme(theme: String, isAdultContentVisible: Bool, contentType: ContentType) case getDailyContentRanking(sortType: String) case getRecommendContentByTag(tag: String) + case getContentMainContentPopularContentByCreator(creatorId: Int) case getContentMainAlarm case getContentMainAlarmAll(theme: String, page: Int, size: Int) @@ -191,6 +192,9 @@ extension ContentApi: TargetType { case .getRecommendContentByTag: return "/v2/audio-content/main/content/recommend-content-by-tag" + case .getContentMainContentPopularContentByCreator: + return "/v2/audio-content/main/content/popular-content-by-creator" + case .getContentMainAlarm: return "/v2/audio-content/main/alarm" @@ -237,7 +241,7 @@ extension ContentApi: TargetType { case .getContentMainHome, .getPopularContentByCreator, .getContentMainSeries, .getRecommendSeriesListByGenre, .getRecommendSeriesByCreator, .getContentMainContent, .getContentMainNewContentOfTheme, .getDailyContentRanking, .getRecommendContentByTag, .getContentMainAlarm, .getContentMainAlarmAll, .getContentMainAsmr, .getPopularAsmrContentByCreator, .getContentMainReplay, .getPopularReplayContentByCreator, - .getContentMainFree, .getIntroduceCreatorList, .getNewFreeContentOfTheme, .getPopularFreeContentByCreator, .getCompletedSeries: + .getContentMainFree, .getIntroduceCreatorList, .getNewFreeContentOfTheme, .getPopularFreeContentByCreator, .getCompletedSeries, .getContentMainContentPopularContentByCreator: return .get case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent: @@ -427,6 +431,10 @@ extension ContentApi: TargetType { let parameters = ["tag": tag] return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString) + case .getContentMainContentPopularContentByCreator(let creatorId): + let parameters = ["creatorId": creatorId] + return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString) + case .getContentMainAlarmAll(let theme, let page, let size), .getNewFreeContentOfTheme(let theme, let page, let size): let parameters = [ "theme": theme, diff --git a/SodaLive/Sources/Content/Main/V2/Content/ContentMainTabContentRepository.swift b/SodaLive/Sources/Content/Main/V2/Content/ContentMainTabContentRepository.swift index be67ceb..cd55fc4 100644 --- a/SodaLive/Sources/Content/Main/V2/Content/ContentMainTabContentRepository.swift +++ b/SodaLive/Sources/Content/Main/V2/Content/ContentMainTabContentRepository.swift @@ -37,6 +37,6 @@ final class ContentMainTabContentRepository { } func getPopularContentByCreator(creatorId: Int) -> AnyPublisher { - return api.requestPublisher(.getPopularContentByCreator(creatorId: creatorId)) + return api.requestPublisher(.getContentMainContentPopularContentByCreator(creatorId: creatorId)) } }