Updated some documentation on the source code in the library target.

This commit is contained in:
2026-07-26 10:37:07 +02:00
parent fb95989d83
commit 6c6dc59b80
4 changed files with 10 additions and 4 deletions
@@ -17,6 +17,8 @@ import OpenAPIRuntime
import OpenAPIURLSession
/// A type that implements a live client to the [Amiibo API](https://www.amiiboapi.org) online service.
///
/// This client maps any transport error or unsuccessful HTTP response to an ``AmiiboServiceError`` error, and sorts the items of the list responses in ascending order by identifier or key.
public struct AmiiboLiveClient: Sendable {
// MARK: Constants
@@ -109,7 +111,7 @@ extension AmiiboLiveClient: AmiiboClient {
}
/// Gets the date when the data was last updated.
/// - Returns: A last updated date.
/// - Returns: A last updated date, decoded as UTC.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getLastUpdated() async throws(AmiiboServiceError) -> Date {
try await fetchLastUpdated()
@@ -317,7 +319,7 @@ private extension AmiiboLiveClient {
}
/// Fetches the date when the data was last updated.
/// - Returns: A fetched last updated date.
/// - Returns: A fetched last updated date, decoded as UTC.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchLastUpdated() async throws(AmiiboServiceError) -> Date {
let response = try await perform {