32 lines
960 B
Swift
32 lines
960 B
Swift
//
|
|
// ContentMainTabSeriesRepository.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2/20/25.
|
|
//
|
|
|
|
import Foundation
|
|
import CombineMoya
|
|
import Combine
|
|
import Moya
|
|
|
|
final class ContentMainTabSeriesRepository {
|
|
private let api = MoyaProvider<ContentApi>()
|
|
|
|
func getContentMainSeries() -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.getContentMainSeries)
|
|
}
|
|
|
|
func getRecommendSeriesListByGenre(genreId: Int) -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.getRecommendSeriesListByGenre(genreId: genreId))
|
|
}
|
|
|
|
func getRecommendSeriesByCreator(creatorId: Int) -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.getRecommendSeriesByCreator(creatorId: creatorId))
|
|
}
|
|
|
|
func getCompletedSeries(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.getCompletedSeries(page: page, size: size))
|
|
}
|
|
}
|