인기콘텐츠 전체 보기 페이지 추가
This commit is contained in:
@@ -29,6 +29,7 @@ enum ContentApi {
|
||||
case getNewContentThemeList
|
||||
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)
|
||||
}
|
||||
|
||||
extension ContentApi: TargetType {
|
||||
@@ -97,12 +98,17 @@ extension ContentApi: TargetType {
|
||||
|
||||
case .getAudioContentListByCurationId(let curationId, _, _, _):
|
||||
return "/audio-content/curation/\(curationId)"
|
||||
|
||||
case .getContentRanking:
|
||||
return "/audio-content/ranking"
|
||||
}
|
||||
}
|
||||
|
||||
var method: Moya.Method {
|
||||
switch self {
|
||||
case .getAudioContentList, .getAudioContentDetail, .getOrderList, .getAudioContentThemeList, .getAudioContentCommentList, .getAudioContentCommentReplyList, .getMain, .getNewContentOfTheme, .getNewContentThemeList, .getNewContentAllOfTheme, .getAudioContentListByCurationId:
|
||||
case .getAudioContentList, .getAudioContentDetail, .getOrderList, .getAudioContentThemeList,
|
||||
.getAudioContentCommentList, .getAudioContentCommentReplyList, .getMain, .getNewContentOfTheme,
|
||||
.getNewContentThemeList, .getNewContentAllOfTheme, .getAudioContentListByCurationId, .getContentRanking:
|
||||
return .get
|
||||
|
||||
case .likeContent, .modifyAudioContent, .modifyComment:
|
||||
@@ -212,6 +218,14 @@ extension ContentApi: TargetType {
|
||||
"sort-type": sort
|
||||
] as [String : Any]
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
|
||||
case .getContentRanking(let page, let size):
|
||||
let parameters = [
|
||||
"page": page - 1,
|
||||
"size": size,
|
||||
] as [String : Any]
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user