Documented the APIClient protocol in the library target.
This commit is contained in:
@@ -12,15 +12,44 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public protocol APIClient {
|
/// A protocol that defines API clients containing all available endpoints to interact with.
|
||||||
|
protocol APIClient {
|
||||||
|
|
||||||
// MARK: Functions
|
// MARK: Functions
|
||||||
|
|
||||||
func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo]
|
/// Gets a list of amiibo items based on a given filter.
|
||||||
func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries]
|
/// - Parameter filter: A filter to remove unwanted items from the result.
|
||||||
func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws -> [AmiiboType]
|
/// - Returns: A list of filtered amiibo items.
|
||||||
func getGameCharacters(by filter: GameCharacterFilter) async throws -> [GameCharacter]
|
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
|
||||||
func getGameSeries(by filter: GameSeriesFilter) async throws -> [GameSeries]
|
func getAmiibos(by filter: AmiiboFilter) async throws(AmiiboServiceError) -> [Amiibo]
|
||||||
func getLastUpdated() async throws -> Date
|
|
||||||
|
/// 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.
|
||||||
|
func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws(AmiiboServiceError) -> [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.
|
||||||
|
func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws(AmiiboServiceError) -> [AmiiboType]
|
||||||
|
|
||||||
|
/// 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.
|
||||||
|
func getGameCharacters(by filter: GameCharacterFilter) async throws(AmiiboServiceError) -> [GameCharacter]
|
||||||
|
|
||||||
|
/// 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.
|
||||||
|
func getGameSeries(by filter: GameSeriesFilter) async throws(AmiiboServiceError) -> [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.
|
||||||
|
func getLastUpdated() async throws(AmiiboServiceError) -> Date
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user