Documented the functions for the AmiiboLiveClient and the AmiiboMockClients types in the library target.
This commit is contained in:
@@ -37,11 +37,16 @@ public struct AmiiboLiveClient {
|
||||
}
|
||||
|
||||
// MARK: - APIClient
|
||||
// TODO: Remove the documentation from the functions inside the following extension as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
|
||||
|
||||
extension AmiiboLiveClient: APIClient {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
/// Gets a list of amiibo items based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered amiibo items.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getAmiibos(
|
||||
by filter: AmiiboFilter
|
||||
) async throws(AmiiboServiceError) -> [Amiibo] {
|
||||
@@ -84,7 +89,11 @@ extension AmiiboLiveClient: APIClient {
|
||||
throw AmiiboServiceError.undocumented(statusCode)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of amiibo series based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered amiibo series.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getAmiiboSeries(
|
||||
by filter: AmiiboSeriesFilter
|
||||
) async throws(AmiiboServiceError) -> [AmiiboSeries] {
|
||||
@@ -121,7 +130,11 @@ extension AmiiboLiveClient: APIClient {
|
||||
throw AmiiboServiceError.undocumented(statusCode)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of amiibo types based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered amiibo types.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getAmiiboTypes(
|
||||
by filter: AmiiboTypeFilter
|
||||
) async throws(AmiiboServiceError) -> [AmiiboType] {
|
||||
@@ -158,7 +171,11 @@ extension AmiiboLiveClient: APIClient {
|
||||
throw AmiiboServiceError.undocumented(statusCode)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of game characters based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered game characters.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getGameCharacters(
|
||||
by filter: GameCharacterFilter
|
||||
) async throws(AmiiboServiceError) -> [GameCharacter] {
|
||||
@@ -195,7 +212,11 @@ extension AmiiboLiveClient: APIClient {
|
||||
throw AmiiboServiceError.undocumented(statusCode)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of game series based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered game series.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getGameSeries(
|
||||
by filter: GameSeriesFilter
|
||||
) async throws(AmiiboServiceError) -> [GameSeries] {
|
||||
@@ -232,7 +253,10 @@ extension AmiiboLiveClient: APIClient {
|
||||
throw AmiiboServiceError.undocumented(statusCode)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Gets the date when the data was last updated.
|
||||
/// - Returns: A last updated date.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getLastUpdated() async throws(AmiiboServiceError) -> Date {
|
||||
let response: Operations.getLastUpdated.Output
|
||||
|
||||
|
||||
@@ -70,11 +70,16 @@ public struct AmiiboMockClient {
|
||||
}
|
||||
|
||||
// MARK: - APIClient
|
||||
// TODO: Remove the documentation from the functions inside the following extension as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
|
||||
|
||||
extension AmiiboMockClient: APIClient {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
/// Gets a list of amiibo items based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered amiibo items.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getAmiibos(by filter: AmiiboFilter) async throws(AmiiboServiceError) -> [Amiibo] {
|
||||
try throwErrorIfExists()
|
||||
|
||||
@@ -84,7 +89,11 @@ extension AmiiboMockClient: APIClient {
|
||||
|
||||
return amiibos
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of amiibo series based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered amiibo series.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws(AmiiboServiceError) -> [AmiiboSeries] {
|
||||
try throwErrorIfExists()
|
||||
|
||||
@@ -94,7 +103,11 @@ extension AmiiboMockClient: APIClient {
|
||||
|
||||
return amiiboSeries
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of amiibo types based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered amiibo types.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws(AmiiboServiceError) -> [AmiiboType] {
|
||||
try throwErrorIfExists()
|
||||
|
||||
@@ -104,7 +117,11 @@ extension AmiiboMockClient: APIClient {
|
||||
|
||||
return amiiboTypes
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of game characters based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered game characters.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getGameCharacters(by filter: GameCharacterFilter) async throws(AmiiboServiceError) -> [GameCharacter] {
|
||||
try throwErrorIfExists()
|
||||
|
||||
@@ -114,7 +131,11 @@ extension AmiiboMockClient: APIClient {
|
||||
|
||||
return gameCharacters
|
||||
}
|
||||
|
||||
|
||||
/// Gets a list of game series based on a given filter.
|
||||
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||
/// - Returns: A list of filtered game series.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getGameSeries(by filter: GameSeriesFilter) async throws(AmiiboServiceError) -> [GameSeries] {
|
||||
try throwErrorIfExists()
|
||||
|
||||
@@ -124,7 +145,10 @@ extension AmiiboMockClient: APIClient {
|
||||
|
||||
return gameSeries
|
||||
}
|
||||
|
||||
|
||||
/// Gets the date when the data was last updated.
|
||||
/// - Returns: A last updated date.
|
||||
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||
public func getLastUpdated() async throws(AmiiboServiceError) -> Date {
|
||||
try throwErrorIfExists()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user