A library written entirely with [Swift](https://www.swift.org) that provides everything the developer needs to interact with the [Amiibo API](https://www.amiiboapi.org) backend service.
The [Amiibo API](https://www.amiiboapi.org) recommends that consumers who call the API regularly implement caching on their systems. Pass a custom `URLSessionTransport` with a cache-configured `URLSession` to `AmiiboLiveClient`:
```swift
importOpenAPIURLSession
letconfiguration=URLSessionConfiguration.default
configuration.urlCache=URLCache(
memoryCapacity:5_000_000,
diskCapacity:50_000_000
)
lettransport=URLSessionTransport(
configuration:.init(
session:URLSession(configuration:configuration)
)
)
letservice=AmiiboService(
client:AmiiboLiveClient(transport:transport)
)
```
## Testing
The `AmiiboClient` protocol enables creating custom mock clients for unit testing without network calls. Conform to `AmiiboClient` and inject it into `AmiiboService` via its `init(client:)` initializer:
Please refer to the [online documentation](https://rock-n-code.github.io/amiibo-service/documentation/amiiboservice/) for further information about this library.