Kurdtvs-Live-Kurdish-TV-Kur.../Mastodon/Service/APIService/APIService+Search.swift

24 lines
629 B
Swift

//
// APIService+Search.swift
// Mastodon
//
// Created by sxiaojian on 2021/3/31.
//
import Foundation
import MastodonSDK
import Combine
extension APIService {
func search(
domain: String,
query: Mastodon.API.V2.Search.Query,
mastodonAuthenticationBox: AuthenticationService.MastodonAuthenticationBox
) -> AnyPublisher<Mastodon.Response.Content<Mastodon.Entity.SearchResult>, Error> {
let authorization = mastodonAuthenticationBox.userAuthorization
return Mastodon.API.V2.Search.search(session: session, domain: domain, query: query, authorization: authorization)
}
}