forked from zelo72/mastodon-ios
24 lines
629 B
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)
|
|
}
|
|
}
|