// // ExplorerRepository.swift // SodaLive // // Created by klaus on 2023/08/10. // import Foundation import CombineMoya import Combine import Moya final class ExplorerRepository { private let api = MoyaProvider() func getExplorer() -> AnyPublisher { return api.requestPublisher(.getExplorer) } func searchChannel(channel: String) -> AnyPublisher { return api.requestPublisher(.searchChannel(channel: channel)) } func getCreatorProfile(id: Int) -> AnyPublisher { return api.requestPublisher(.getCreatorProfile(userId: id)) } func getFollowerList(userId: Int, page: Int, size: Int) -> AnyPublisher { return api.requestPublisher(.getFollowerList(userId: userId, page: page, size: size)) } func getCreatorProfileCheers(userId: Int, page: Int, size: Int) -> AnyPublisher { return api.requestPublisher(.getCreatorProfileCheers(userId: userId, page: page, size: size)) } func writeCheers(parentCheersId: Int?, creatorId: Int, content: String) -> AnyPublisher { return api.requestPublisher(.writeCheers(parentCheersId: parentCheersId, creatorId: creatorId, content: content)) } func modifyCheers(cheersId: Int, content: String) -> AnyPublisher { return api.requestPublisher(.modifyCheers(cheersId: cheersId, content: content)) } func writeCreatorNotice(notice: String) -> AnyPublisher { return api.requestPublisher(.writeCreatorNotice(request: PostCreatorNoticeRequest(notice: notice))) } }