diff --git a/Sources/AmiiboService/Public/Services/AmiiboService.swift b/Sources/AmiiboService/Public/Services/AmiiboService.swift index fdb947f..51e9bd1 100644 --- a/Sources/AmiiboService/Public/Services/AmiiboService.swift +++ b/Sources/AmiiboService/Public/Services/AmiiboService.swift @@ -18,17 +18,14 @@ public struct AmiiboService { // MARK: Properties /// A client to interact with the endpoints. - private let client: any APIClient + private let client: any AmiiboClient // MARK: Initializers /// Initializes this service with a specific client type. - /// - Parameter client: A representation of a client to use to interact with the endpoints. - public init(_ client: AmiiboClient) { - self.client = switch client { - case let .mock(mockClient): mockClient - case let .live(liveClient): liveClient - } + /// - Parameter client: A client to use to interact with the endpoints. + public init(client: some AmiiboClient = AmiiboLiveClient()) { + self.client = client } // MARK: Functions diff --git a/Tests/AmiiboService/Tests/Public/Services/AmiiboServiceLiveTests.swift b/Tests/AmiiboService/Tests/Public/Services/AmiiboServiceLiveTests.swift index 908c379..536f87d 100644 --- a/Tests/AmiiboService/Tests/Public/Services/AmiiboServiceLiveTests.swift +++ b/Tests/AmiiboService/Tests/Public/Services/AmiiboServiceLiveTests.swift @@ -24,7 +24,7 @@ struct AmiiboServiceLiveTests { // MARK: Initializers init() { - self.service = .init(.live()) + self.service = .init() } // MARK: Functions tests