콘텐츠 메인 단편 탭

- 채널별 추천 단편 API 변경
This commit is contained in:
Yu Sung 2025-02-26 18:57:38 +09:00
parent 1474c70e88
commit f980089dc3
2 changed files with 10 additions and 2 deletions

View File

@ -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,

View File

@ -37,6 +37,6 @@ final class ContentMainTabContentRepository {
}
func getPopularContentByCreator(creatorId: Int) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getPopularContentByCreator(creatorId: creatorId))
return api.requestPublisher(.getContentMainContentPopularContentByCreator(creatorId: creatorId))
}
}