mastodon-ios/MastodonSDK/Sources/MastodonCore/Service/API/APIService+Report.swift

29 lines
652 B
Swift
Raw Normal View History

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 {
2022-11-04 06:28:09 +01:00
public func report(
2021-04-19 14:34:08 +02:00
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
}