인기 콘텐츠 전체 보기 - 정렬 추가

This commit is contained in:
Yu Sung
2023-11-03 14:45:51 +09:00
parent cf7f1527b7
commit 27df89d78e
4 changed files with 68 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ enum ContentApi {
case getNewContentAllOfTheme(theme: String, page: Int, size: Int)
case getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort)
case getContentRanking(page: Int, size: Int, sortType: String)
case getContentRankingSortType
}
extension ContentApi: TargetType {
@@ -101,6 +102,9 @@ extension ContentApi: TargetType {
case .getContentRanking:
return "/audio-content/ranking"
case .getContentRankingSortType:
return "/audio-content/ranking-sort-type"
}
}
@@ -108,7 +112,8 @@ extension ContentApi: TargetType {
switch self {
case .getAudioContentList, .getAudioContentDetail, .getOrderList, .getAudioContentThemeList,
.getAudioContentCommentList, .getAudioContentCommentReplyList, .getMain, .getNewContentOfTheme,
.getNewContentThemeList, .getNewContentAllOfTheme, .getAudioContentListByCurationId, .getContentRanking:
.getNewContentThemeList, .getNewContentAllOfTheme, .getAudioContentListByCurationId, .getContentRanking,
.getContentRankingSortType:
return .get
case .likeContent, .modifyAudioContent, .modifyComment:
@@ -228,6 +233,9 @@ extension ContentApi: TargetType {
] as [String : Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getContentRankingSortType:
return .requestPlain
}
}