2021-04-19 14:34:08 +02:00
|
|
|
//
|
|
|
|
// APIService+Report.swift
|
|
|
|
// Mastodon
|
|
|
|
//
|
|
|
|
// Created by ihugo on 2021/4/19.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import MastodonSDK
|
|
|
|
import Combine
|
|
|
|
|
|
|
|
extension APIService {
|
|
|
|
|
|
|
|
func report(
|
|
|
|
query: Mastodon.API.Reports.FileReportQuery,
|
2022-02-08 05:36:06 +01:00
|
|
|
authenticationBox: MastodonAuthenticationBox
|
|
|
|
) async throws -> Mastodon.Response.Content<Bool> {
|
|
|
|
let response = try await Mastodon.API.Reports.fileReport(
|
|
|
|
session: session,
|
|
|
|
domain: authenticationBox.domain,
|
|
|
|
query: query,
|
|
|
|
authorization: authenticationBox.userAuthorization
|
|
|
|
).singleOutput()
|
|
|
|
|
|
|
|
return response
|
2021-04-19 14:34:08 +02:00
|
|
|
}
|
2022-02-08 05:36:06 +01:00
|
|
|
|
2021-04-19 14:34:08 +02:00
|
|
|
}
|