24 lines
696 B
Swift
24 lines
696 B
Swift
//
|
|
// CharacterDetailRepository.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 9/1/25.
|
|
//
|
|
import Foundation
|
|
import CombineMoya
|
|
import Combine
|
|
import Moya
|
|
|
|
class CharacterDetailRepository {
|
|
private let characterApi = MoyaProvider<CharacterApi>()
|
|
private let talkApi = MoyaProvider<TalkApi>()
|
|
|
|
func getCharacterDetail(characterId: Int) -> AnyPublisher<Response, MoyaError> {
|
|
return characterApi.requestPublisher(.getCharacterDetail(characterId: characterId))
|
|
}
|
|
|
|
func createChatRoom(characterId: Int) -> AnyPublisher<Response, MoyaError> {
|
|
return talkApi.requestPublisher(.createChatRoom(request: CreateChatRoomRequest(characterId: characterId)))
|
|
}
|
|
}
|