feat(explorer): 채널 후원 목록/등록 기능을 추가한다
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user