Impressia/Vernissage/EnvironmentObjects/Client+Trends.swift

25 lines
683 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.
2023-03-28 10:35:38 +02:00
// Licensed under the Apache License 2.0.
2023-02-03 15:16:30 +01:00
//
2023-02-03 15:16:30 +01:00
import Foundation
2023-02-19 10:32:38 +01:00
import PixelfedKit
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
}
}