후원랭킹 전체보기 추가

This commit is contained in:
Yu Sung
2023-08-29 14:10:16 +09:00
parent 88fcbc98f4
commit e68961bd0d
8 changed files with 381 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ enum ExplorerApi {
case writeCheers(parentCheersId: Int?, creatorId: Int, content: String)
case modifyCheers(cheersId: Int, content: String)
case writeCreatorNotice(request: PostCreatorNoticeRequest)
case getCreatorProfileDonationRanking(userId: Int, page: Int, size: Int)
}
extension ExplorerApi: TargetType {
@@ -35,6 +36,9 @@ extension ExplorerApi: TargetType {
case .getCreatorProfile(let userId):
return "/explorer/profile/\(userId)"
case .getCreatorProfileDonationRanking(let userId, _, _):
return "/explorer/profile/\(userId)/donation-rank"
case .getFollowerList(let userId, _, _):
return "/explorer/profile/\(userId)/follower-list"
@@ -54,7 +58,7 @@ extension ExplorerApi: TargetType {
var method: Moya.Method {
switch self {
case .getExplorer, .searchChannel, .getCreatorProfile, .getFollowerList, .getCreatorProfileCheers:
case .getExplorer, .searchChannel, .getCreatorProfile, .getFollowerList, .getCreatorProfileCheers, .getCreatorProfileDonationRanking:
return .get
case .writeCheers, .writeCreatorNotice:
@@ -104,6 +108,14 @@ extension ExplorerApi: TargetType {
case .writeCreatorNotice(let request):
return .requestJSONEncodable(request)
case .getCreatorProfileDonationRanking(_, let page, let size):
let parameters = [
"page": page - 1,
"size": size
] as [String : Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
}
}