24 lines
518 B
Swift
24 lines
518 B
Swift
//
|
|
// CharacterRepository.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 8/29/25.
|
|
//
|
|
|
|
import Foundation
|
|
import CombineMoya
|
|
import Combine
|
|
import Moya
|
|
|
|
class CharacterRepository {
|
|
private let api = MoyaProvider<CharacterApi>()
|
|
|
|
func getCharacterMain() -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.getCharacterHome)
|
|
}
|
|
|
|
func refreshRecommendCharacters() -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.refreshRecommendCharacters)
|
|
}
|
|
}
|