Impressia/Vernissage/EnvironmentObjects/Client+Trends.swift

26 lines
719 B
Swift
Raw Normal View History

2023-02-03 15:16:30 +01:00
//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
// Licensed under the MIT License.
//
import Foundation
2023-02-19 10:32:38 +01:00
import PixelfedKit
2023-02-03 15:16:30 +01:00
2023-02-19 10:43:37 +01:00
/// Pixelfed 'Trends'.
2023-02-03 15:16:30 +01:00
extension Client {
public class Trends: BaseClient {
2023-02-19 10:43:37 +01:00
public func statuses(range: Pixelfed.Trends.TrendRange) async throws -> [Status] {
return try await pixelfedClient.statusesTrends(range: range)
2023-02-03 15:16:30 +01:00
}
public func tags() async throws -> [TagTrend] {
return try await pixelfedClient.tagsTrends()
}
public func accounts() async throws -> [Account] {
return try await pixelfedClient.accountsTrends()
}
2023-02-03 15:16:30 +01:00
}
}