Defined the Service public protocol.

This commit is contained in:
Javier Cicchelli 2023-04-19 22:26:23 +02:00
parent d1de1939e4
commit 60c1bf55db
2 changed files with 16 additions and 2 deletions

View File

@ -8,8 +8,8 @@ public struct KeyNameFilter {
// MARK: Initialisers
public init(
key: String?,
name: String?
key: String? = nil,
name: String? = nil
) {
self.key = key
self.name = name

View File

@ -0,0 +1,14 @@
import Foundation
protocol Service {
// MARK: Functions
func amiibos(filter: AmiiboFilter) async throws -> [Amiibo]
func amiiboSeries(filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries]
func amiiboTypes(filter: AmiiboTypeFilter) async throws -> [AmiiboType]
func gameSeries(filter: GameSeriesFilter) async throws -> [GameSeries]
func characters(filter: CharacterFilter) async throws -> [Character]
func lastUpdated() async throws -> Date
}