콘텐츠 메인

- 무료 탭 UI 페이지 생성
This commit is contained in:
Yu Sung
2025-02-22 05:50:26 +09:00
parent 4df34b7fb6
commit e6621c6606
5 changed files with 279 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
//
// ContentMainTabFreeRepository.swift
// SodaLive
//
// Created by klaus on 2/22/25.
//
import Foundation
import CombineMoya
import Combine
import Moya
final class ContentMainTabFreeRepository {
private let api = MoyaProvider<ContentApi>()
func getContentMainFree() -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getContentMainFree)
}
func getIntroduceCreatorList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getIntroduceCreatorList(page: page, size: size))
}
func getNewContentOfTheme(theme: String, page: Int = 1, size: Int = 20) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getNewFreeContentOfTheme(theme: theme, page: page, size: size))
}
func getPopularContentByCreator(creatorId: Int) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getPopularFreeContentByCreator(creatorId: creatorId))
}
}