feat(audio-content-all): 무료 콘텐츠, 포인트 대여 콘텐츠 전체보기 페이지 UI/API 구현
This commit is contained in:
@@ -67,6 +67,8 @@ enum ContentApi {
|
||||
case getIntroduceCreatorList(isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int)
|
||||
case getNewFreeContentOfTheme(theme: String, isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int)
|
||||
case getPopularFreeContentByCreator(creatorId: Int, isAdultContentVisible: Bool, contentType: ContentType)
|
||||
|
||||
case getAllAudioContents(isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int, isFree: Bool?, isPointAvailableOnly: Bool?)
|
||||
}
|
||||
|
||||
extension ContentApi: TargetType {
|
||||
@@ -228,6 +230,9 @@ extension ContentApi: TargetType {
|
||||
|
||||
case .getPopularFreeContentByCreator:
|
||||
return "/v2/audio-content/main/free/popular-content-by-creator"
|
||||
|
||||
case .getAllAudioContents:
|
||||
return "/audio-content/all"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,6 +259,9 @@ extension ContentApi: TargetType {
|
||||
case .registerComment, .orderAudioContent, .addAllPlaybackTracking, .uploadAudioContent, .donation, .pinContent:
|
||||
return .post
|
||||
|
||||
case .getAllAudioContents:
|
||||
return .get
|
||||
|
||||
case .deleteAudioContent:
|
||||
return .delete
|
||||
}
|
||||
@@ -540,6 +548,24 @@ extension ContentApi: TargetType {
|
||||
"size": size
|
||||
] as [String : Any]
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
|
||||
case .getAllAudioContents(let isAdultContentVisible, let contentType, let page, let size, let isFree, let isPointAvailableOnly):
|
||||
var parameters = [
|
||||
"isAdultContentVisible": isAdultContentVisible,
|
||||
"contentType": contentType,
|
||||
"page": page - 1,
|
||||
"size": size
|
||||
] as [String : Any]
|
||||
|
||||
if let isFree = isFree {
|
||||
parameters["isFree"] = isFree
|
||||
}
|
||||
|
||||
if let isPointAvailableOnly = isPointAvailableOnly {
|
||||
parameters["isPointAvailableOnly"] = isPointAvailableOnly
|
||||
}
|
||||
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user