콘텐츠 메인 - 숏플, 라이브 다시 듣기 추가
This commit is contained in:
@@ -36,6 +36,7 @@ enum ContentApi {
|
||||
case getContentRankingSortType
|
||||
case pinContent(contentId: Int)
|
||||
case unpinContent(contentId: Int)
|
||||
case getAudioContentByTheme(themeId: Int, page: Int, size: Int, sort: ContentAllByThemeViewModel.Sort)
|
||||
}
|
||||
|
||||
extension ContentApi: TargetType {
|
||||
@@ -125,6 +126,9 @@ extension ContentApi: TargetType {
|
||||
|
||||
case .unpinContent(let contentId):
|
||||
return "/audio-content/unpin-at-the-top/\(contentId)"
|
||||
|
||||
case .getAudioContentByTheme(let themeId, _, _, _):
|
||||
return "/audio-content/theme/\(themeId)/content"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +140,7 @@ extension ContentApi: TargetType {
|
||||
.getContentRankingSortType:
|
||||
return .get
|
||||
|
||||
case .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList, .getCurationList:
|
||||
case .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList, .getCurationList, .getAudioContentByTheme:
|
||||
return .get
|
||||
|
||||
case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent:
|
||||
@@ -271,6 +275,15 @@ extension ContentApi: TargetType {
|
||||
|
||||
case .pinContent, .unpinContent:
|
||||
return .requestPlain
|
||||
|
||||
case .getAudioContentByTheme(_, let page, let size, let sort):
|
||||
let parameters = [
|
||||
"page": page - 1,
|
||||
"size": size,
|
||||
"sort-type": sort
|
||||
] as [String : Any]
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user