feat(explorer): 채널 후원 목록/등록 기능을 추가한다

This commit is contained in:
Yu Sung
2026-02-25 20:57:23 +09:00
parent e9bd1e7396
commit 32d1d970e4
17 changed files with 853 additions and 58 deletions

View File

@@ -20,6 +20,8 @@ enum ExplorerApi {
case modifyCheers(request: PutModifyCheersRequest)
case writeCreatorNotice(request: PostCreatorNoticeRequest)
case getCreatorProfileDonationRanking(userId: Int, page: Int, size: Int, period: DonationRankingPeriod?)
case getChannelDonationList(creatorId: Int)
case postChannelDonation(request: PostChannelDonationRequest)
}
extension ExplorerApi: TargetType {
@@ -61,15 +63,18 @@ extension ExplorerApi: TargetType {
case .writeCreatorNotice:
return "/explorer/profile/notice"
case .getChannelDonationList, .postChannelDonation:
return "/explorer/profile/channel-donation"
}
}
var method: Moya.Method {
switch self {
case .getExplorer, .searchChannel, .getCreatorProfile, .getCreatorDetail, .getFollowerList, .getCreatorProfileCheers, .getCreatorProfileDonationRanking, .getCreatorRank:
case .getExplorer, .searchChannel, .getCreatorProfile, .getCreatorDetail, .getFollowerList, .getCreatorProfileCheers, .getCreatorProfileDonationRanking, .getCreatorRank, .getChannelDonationList:
return .get
case .writeCheers, .writeCreatorNotice:
case .writeCheers, .writeCreatorNotice, .postChannelDonation:
return .post
case .modifyCheers:
@@ -115,7 +120,13 @@ extension ExplorerApi: TargetType {
case .writeCreatorNotice(let request):
return .requestJSONEncodable(request)
case .getChannelDonationList(let creatorId):
return .requestParameters(parameters: ["creatorId": creatorId], encoding: URLEncoding.queryString)
case .postChannelDonation(let request):
return .requestJSONEncodable(request)
case .getCreatorProfileDonationRanking(_, let page, let size, let period):
var parameters = [
"page": page - 1,