24 lines
501 B
Swift
24 lines
501 B
Swift
//
|
|
// FaqRepository.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2023/08/11.
|
|
//
|
|
|
|
import Foundation
|
|
import CombineMoya
|
|
import Combine
|
|
import Moya
|
|
|
|
final class FaqRepository {
|
|
private let api = MoyaProvider<FaqApi>()
|
|
|
|
func getFaqs(category: String) -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.faqs(category: category))
|
|
}
|
|
|
|
func getFaqCategories() -> AnyPublisher<Response, MoyaError> {
|
|
return api.requestPublisher(.faqCategories)
|
|
}
|
|
}
|