Files
sodalive-ios/SodaLive/Sources/Content/Main/V2/Alarm/ContentMainTabAlarmRepository.swift
Yu Sung d5e1acb1c3 콘텐츠 메인
- 남성향, 여성향 콘텐츠 설정 적용
- 19금 콘텐츠 보기 여부 설정 적용
2025-03-18 20:50:44 +09:00

38 lines
1.1 KiB
Swift

//
// ContentMainTabAlarmRepository.swift
// SodaLive
//
// Created by klaus on 2/22/25.
//
import Foundation
import CombineMoya
import Combine
import Moya
final class ContentMainTabAlarmRepository {
private let api = MoyaProvider<ContentApi>()
func getContentMainAlarm() -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(
.getContentMainAlarm(
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL
)
)
}
func getContentMainAlarmAll(theme: String, page: Int = 1, size: Int = 10) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(
.getContentMainAlarmAll(
theme: theme,
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL,
page: page,
size: size
)
)
}
}