// // https://mczachurski.dev // Copyright © 2023 Marcin Czachurski and the repository contributors. // Licensed under the MIT License. // import Foundation import MastodonSwift extension MastodonClientAuthenticated { func getAccount(for accountId: String) async throws -> Account { let request = try Self.request( for: baseURL, target: Mastodon.Account.account(accountId), withBearerToken: token ) let (data, _) = try await urlSession.data(for: request) return try JSONDecoder().decode(Account.self, from: data) } }