콘텐츠 메인
- 시리즈 탭 UI 페이지 생성
This commit is contained in:
@@ -38,8 +38,13 @@ enum ContentApi {
|
||||
case unpinContent(contentId: Int)
|
||||
case getAudioContentByTheme(themeId: Int, isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int, sort: ContentAllByThemeViewModel.Sort)
|
||||
case generateUrl(contentId: Int)
|
||||
|
||||
case getContentMainHome
|
||||
case getPopularContentByCreator(creatorId: Int)
|
||||
|
||||
case getContentMainSeries
|
||||
case getRecommendSeriesListByGenre(genreId: Int)
|
||||
case getRecommendSeriesByCreator(creatorId: Int)
|
||||
}
|
||||
|
||||
extension ContentApi: TargetType {
|
||||
@@ -141,6 +146,15 @@ extension ContentApi: TargetType {
|
||||
|
||||
case .getPopularContentByCreator:
|
||||
return "/v2/audio-content/main/home/popular-content-by-creator"
|
||||
|
||||
case .getContentMainSeries:
|
||||
return "/v2/audio-content/main/series"
|
||||
|
||||
case .getRecommendSeriesListByGenre:
|
||||
return "/v2/audio-content/main/series/recommend-by-genre"
|
||||
|
||||
case .getRecommendSeriesByCreator:
|
||||
return "/v2/audio-content/main/series/recommend-series-by-creator"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +169,7 @@ extension ContentApi: TargetType {
|
||||
case .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList, .getCurationList, .getAudioContentByTheme:
|
||||
return .get
|
||||
|
||||
case .getContentMainHome, .getPopularContentByCreator:
|
||||
case .getContentMainHome, .getPopularContentByCreator, .getContentMainSeries, .getRecommendSeriesListByGenre, .getRecommendSeriesByCreator:
|
||||
return .get
|
||||
|
||||
case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent:
|
||||
@@ -312,12 +326,20 @@ extension ContentApi: TargetType {
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
|
||||
case .getContentMainHome:
|
||||
case .getContentMainHome, .getContentMainSeries:
|
||||
return .requestPlain
|
||||
|
||||
case .getRecommendSeriesListByGenre(let genreId):
|
||||
let parameters = ["genreId": genreId]
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
|
||||
case .getPopularContentByCreator(let creatorId):
|
||||
let parameters = ["creatorId": creatorId]
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
|
||||
case .getRecommendSeriesByCreator(let creatorId):
|
||||
let parameters = ["creatorId": creatorId]
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user