기부 랭킹 기간 선택 추가

프로필 기부 랭킹 조회와 프로필 갱신 요청에\n기간 값을 전달한다.
This commit is contained in:
Yu Sung
2026-02-03 18:38:36 +09:00
parent d686223362
commit 13f8d924c0
9 changed files with 257 additions and 87 deletions

View File

@@ -18,7 +18,7 @@ enum ExplorerApi {
case writeCheers(parentCheersId: Int?, creatorId: Int, content: String)
case modifyCheers(request: PutModifyCheersRequest)
case writeCreatorNotice(request: PostCreatorNoticeRequest)
case getCreatorProfileDonationRanking(userId: Int, page: Int, size: Int)
case getCreatorProfileDonationRanking(userId: Int, page: Int, size: Int, period: DonationRankingPeriod?)
}
extension ExplorerApi: TargetType {
@@ -40,7 +40,7 @@ extension ExplorerApi: TargetType {
case .getCreatorProfile(let userId, _):
return "/explorer/profile/\(userId)"
case .getCreatorProfileDonationRanking(let userId, _, _):
case .getCreatorProfileDonationRanking(let userId, _, _, _):
return "/explorer/profile/\(userId)/donation-rank"
case .getFollowerList(let userId, _, _):
@@ -112,12 +112,16 @@ extension ExplorerApi: TargetType {
case .writeCreatorNotice(let request):
return .requestJSONEncodable(request)
case .getCreatorProfileDonationRanking(_, let page, let size):
let parameters = [
case .getCreatorProfileDonationRanking(_, let page, let size, let period):
var parameters = [
"page": page - 1,
"size": size
] as [String : Any]
if let period {
parameters["period"] = period.rawValue
}
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
}
}