11 Commits

Author SHA1 Message Date
javier c303e1f8f3 Some suggested improvements (#16)
This PR contains the work done to make some overall improvements to the library:
* Fixed code duplication from supporting multiple Swift version in the `AmiiboLiveClient` client;
* Improved the error handling from the client's calls in the `AmiiboLiveClient` client;
* Conformed to `AmiiboLiveClient` and the filter types to the `Sendable` protocol;
* Added the "transport" argument to the initializer of the `AmiiboLiveClient` client;
* Updated the `DocC` library documentation.

Reviewed-on: #16
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-02 01:51:16 +00:00
javier 463d15975c Amiibo Service live tests refactoring (#15)
This PR contains the work done to refactor the test cases for the `AmiiboService` service type in the test target, to write them as the `Swift Testing` framework intended. In. addition, the documentation tasks in the `Makefile` file and the generated `DocC` documentation for Github Pages have also been updated.

Reviewed-on: #15
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-01 23:19:14 +00:00
javier 8760ff6e12 Bumped the Swift version of the Package file (#14)
This PR contains the work done to bump the Swift compiler version in which the library is being built to `v5.10`.

Reviewed-on: #14
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-18 15:03:07 +00:00
javier bc0ae63719 Some package and library documentation updates (#13)
This PR contains the work done to:
* Updated the library *DocC* documentation catalog;
* Updated the library documentation for both *Xcode* and *GitHub Pages*;
* Added the Swift version and compatibility badges to the README file;
* Added the link to the *GitHub Pages* documentation in the *Swift Package Index* configuration.

Reviewed-on: #13
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-12 00:51:06 +00:00
javier 3d923982b1 Improvements on the AmiiboService service type initialization (#12)
This PR addresses the issue #10 as described in the *Possible Solution* section in that issue.

Reviewed-on: #12
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-12 00:13:58 +00:00
javier 19583290be Possible fix for compilation issue in Swift 5 (#11)
This PR contains the work done to amend the issue #9 which, basically, provides a separate functions declaration for the `APIClient` protocol and the `AmiiboService` service type on Swift 5.

Reviewed-on: #11
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-11 22:49:58 +00:00
javier 0af0e3056d Patched (temporarily) the DocC documentation (#8)
This PR contains the work done to:
* Documented the public properties, initializers, and/or functions of those types conforming to the `APIClient`, `KeyNameFilter`, and `KeyNameModel` protocols, to fix the issue that the protocol documentations cannot be inherited;
* Moved the `AmiiboService` DocC documentation catalog inside the library target;
* Amended the folder structure of the library and test targets;
* Fixed further documentation issues encountered while revising the written documentation;
* Added the `lib-test` task in the `Makefile` file;
* Improved the naming for the existing tasks in the `Makefile` file.

Reviewed-on: #8
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-10 19:47:45 +00:00
javier b39fd8533b DocC documentation content fixes. (#6)
This PR contains the work done to:
* Fix some documentation issues encountered in the `README` file;
* Fix some documentation issues encountered in the `Library` article of the DocC documentation catalog;
* Update the DocC documentation of the library for GitHub Pages.

Reviewed-on: #6
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-09 18:58:18 +00:00
javier 410a200661 GitHub Pages documentation support. (#5)
This PR contains the work done to:
* Update the `Library` article in the DocC documentation catalog in the project;
* Generate the DocC documentation of the library for GitHub Pages;
* Written the `README` file in the project.

Reviewed-on: #5
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-09 18:34:29 +00:00
javier 37c0f3e322 DocC documentation support (#4)
This PR contains the work done to:
* Documented all the `private`, `internal`, and `public` interfaces on the existing codebase;
* Set the DocC documentation catalog in the project;
* Written the main `Library` article for the DocC documentation catalog;
* Added the documentation tasks in the `Makefile` file.

Reviewed-on: #4
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-09 17:30:19 +00:00
javier 39c6d6e8d6 Basic update of the existing files in the project (#3)
This PR contains the work done to:
* update the `Package.swift` file;
* update the file headers of the existing file in the project;
* update the cases of the `AmiiboServiceLiveTests` tests.

Reviewed-on: #3
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-09 17:20:05 +00:00
317 changed files with 2988 additions and 1976 deletions
+22
View File
@@ -0,0 +1,22 @@
# ===----------------------------------------------------------------------===
#
# This source file is part of the AmiiboService open source project
#
# Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
# Licensed under the EUPL 1.2 or later.
#
# See LICENSE for license information
# See CONTRIBUTORS for the list of AmiiboAPI project authors
#
# ===----------------------------------------------------------------------===
# --- DOCUMENTATION ---
DOCC_ARCHIVE_OUTPUT=./${SPM_LIBRARY_TARGET}.doccarchive
DOCC_GITHUB_OUTPUT=./docs
DOCC_GITHUB_BASE_PATH=amiibo-service
DOCC_PREVIEW_URL=http://localhost:8080/documentation/amiiboservice
# -- SWIFT PACKAGE MANAGER ---
SPM_LIBRARY_TARGET=AmiiboService
+7 -4
View File
@@ -2,9 +2,6 @@
.DS_Store
.netrc
# Visual Studio Code
.vscode
# Xcode
DerivedData/
@@ -31,4 +28,10 @@ Packages/
# hence it is not needed unless you have added a package configuration file to your project
.swiftpm
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
# Visual Studio Code
.vscode
# DocC documentation
*.doccarchive
+15
View File
@@ -0,0 +1,15 @@
# ===----------------------------------------------------------------------===
#
# This source file is part of the AmiiboService open source project
#
# Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
# Licensed under the EUPL 1.2 or later.
#
# See LICENSE for license information
# See CONTRIBUTORS for the list of AmiiboAPI project authors
#
# ===----------------------------------------------------------------------===
version: 1
external_links:
documentation: "https://rock-n-code.github.io/amiibo-service/documentation/amiiboservice/"
+66 -16
View File
@@ -1,8 +1,8 @@
# ===----------------------------------------------------------------------===
#
# This source file is part of the AmiiboAPI open source project
# This source file is part of the AmiiboService open source project
#
# Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
# Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
# Licensed under the EUPL 1.2 or later.
#
# See LICENSE for license information
@@ -17,30 +17,80 @@ environment ?= .env
include $(environment)
export $(shell sed 's/=.*//' $(environment))
# IDE
# LIBRARY
open-in-xcode: ## Opens this package with Xcode
@open -a Xcode Package.swift
lib-build: ## Builds the library
@swift build
open-in-vscode: ## Opens this package with Visual Studio Code
@code .
lib-release: ## Releases the library
@swift build -c release
lib-test: ## Runs the unit tests for the library
@swift test \
--disable-xctest \
--enable-code-coverage \
--enable-swift-testing \
--parallel
# SWIFT PACKAGE MANAGER
package-build: ## Builds the project locally
@swift build
package-clean: ## Deletes built SPM artifacts from the package
pkg-clean: ## Deletes built SPM artifacts of the package
@swift package clean
package-outdated: ## Lists the SPM package dependencies that can be updated
@swift package update --dry-run
package-reset: ## Resets the complete SPM cache/build folder from the package
pkg-reset: ## Resets the complete SPM cache/build folder of the package
@swift package reset
package-update: ## Updates the SPM package dependencies
pkg-pristine: pkg-clean pkg-reset ## Deletes all built artifacts, caches, and documentations of the package
@rm -drf $(DOCC_ARCHIVE_OUTPUT)
@rm -drf $(DOCC_GITHUB_OUTPUT)
pkg-outdated: ## Lists the SPM package dependencies that can be updated
@swift package update --dry-run
pkg-update: ## Updates the SPM package dependencies
@swift package update
# DOCUMENTATION
doc-generate: doc-generate-archive doc-generate-github ## Generates the library documentation for both Github and Xcode
doc-generate-archive: ## Generates the library documentation archive for Xcode
@swift package \
--allow-writing-to-directory $(DOCC_ARCHIVE_OUTPUT) \
generate-documentation \
--target $(SPM_LIBRARY_TARGET) \
--include-extended-types \
--enable-inherited-docs \
--output-path $(DOCC_ARCHIVE_OUTPUT)
doc-generate-github: ## Generates the library documentation for Github
@swift package \
--allow-writing-to-directory $(DOCC_GITHUB_OUTPUT) \
generate-documentation \
--target $(SPM_LIBRARY_TARGET) \
--disable-indexing \
--transform-for-static-hosting \
--include-extended-types \
--enable-inherited-docs \
--hosting-base-path $(DOCC_GITHUB_BASE_PATH) \
--output-path $(DOCC_GITHUB_OUTPUT)
doc-preview: ## Previews the library documentation in Safari
@open -a safari $(DOCC_PREVIEW_URL)
@swift package \
--disable-sandbox \
preview-documentation \
--target $(SPM_LIBRARY_TARGET) \
--include-extended-types \
--enable-inherited-docs
# IDE
ide-xcode: ## Opens this package with Xcode
@open -a Xcode Package.swift
ide-vscode: ## Opens this package with Visual Studio Code
@code .
# HELP
+22 -41
View File
@@ -1,10 +1,10 @@
// swift-tools-version: 5.9
// swift-tools-version: 5.10
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -15,7 +15,7 @@
import PackageDescription
let package = Package(
name: AmiiboAPI.package,
name: AmiiboService.package,
platforms: [
.iOS(.v13),
.macOS(.v10_15),
@@ -25,61 +25,42 @@ let package = Package(
],
products: [
.library(
name: AmiiboAPI.package,
targets: [
AmiiboAPI.target
]
name: AmiiboService.package,
targets: [AmiiboService.target]
)
],
dependencies: [
.package(
url: "https://github.com/apple/swift-openapi-generator.git",
from: "1.3.0"
),
.package(
url: "https://github.com/apple/swift-openapi-runtime",
from: "1.5.0"
),
.package(
url: "https://github.com/apple/swift-openapi-urlsession",
from: "1.0.2"
)
.package(url: "https://github.com/apple/swift-openapi-generator.git", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.5.0"),
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.2"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"),
],
targets: [
.target(
name: AmiiboAPI.target,
name: AmiiboService.target,
dependencies: [
.product(
name: "OpenAPIRuntime",
package: "swift-openapi-runtime"
),
.product(
name: "OpenAPIURLSession",
package: "swift-openapi-urlsession"
)
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
],
path: "Sources",
path: "Sources/AmiiboService",
plugins: [
.plugin(
name: "OpenAPIGenerator",
package: "swift-openapi-generator"
),
.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator"),
]
),
.testTarget(
name: AmiiboAPI.test,
name: AmiiboService.test,
dependencies: [
.byName(name: AmiiboAPI.target)
.byName(name: AmiiboService.target)
],
path: "Tests"
path: "Tests/AmiiboService"
),
]
)
// MARK: - Constants
enum AmiiboAPI {
static let package = "amiibo-api"
static let target = "AmiiboAPI"
static let test = "\(AmiiboAPI.target)Tests"
enum AmiiboService {
static let package = "amiibo-service"
static let target = "AmiiboService"
static let test = "\(AmiiboService.target)Tests"
}
+37 -1
View File
@@ -1 +1,37 @@
# Amiibo API
# Amiibo Service
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frock-n-code%2Famiibo-service%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/rock-n-code/amiibo-service)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frock-n-code%2Famiibo-service%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/rock-n-code/amiibo-service)
A library written entirely with [Swift](https://www.swift.org) that provides everything the developer needs to interacts with the [Amiibo API](https://www.amiiboapi.com) backend service.
## Installation
To use this library with your package, then add it as a dependency in the `Package.swift` file:
```swift
let package = Package(
// name, platforms, products, etc.
dependencies: [
.package(url: "https://github.com/rock-n-code/amiibo-service", from: "1.0.0"),
// other dependencies
],
targets: [
.target(
name: "SomeTarget",
dependencies: [
.product(name: "AmiiboService", package: "amiibo-service"),
]
)
// other targets
]
)
```
It is also possible to use this library with your app in Xcode, then add it as a dependency in your Xcode project.
> important: Swift 5.10 or higher is required in order to compile this library.
## Documentation
Please refer to the [online documentation](https://rock-n-code.github.io/amiibo-service/documentation/amiiboservice/) for further informations about this library.
@@ -0,0 +1,81 @@
# ``AmiiboService``
A library that provides everything the developer needs to interacts with the **Amiibo API** backend service.
## Overview
The `AmiiboService` library is a Swift Package Manager package dependency aims at allowing the developer to interact with the [Amiibo API](https://www.amiiboapi.com) backend service seamlessly, by not only providing the *service* type but also any possible *clients*, *models*, *filters* and *errors* types that might be needed during implementation.
## Design
Although it could have been possible to generate a one-to-one RESTful client based on the Open API specification document that describe the available endpoints of the backend service, it was decided to design a `AmiiboService` service type that removes the complexities of the API design imposed by the backend service, and provides the developer with a simple interface, and a seamless experience.
## Installation
To use the `AmiiboService` library with your package, then add it as a dependency in the `Package.swift` file:
```swift
let package = Package(
// name, platforms, products, etc.
dependencies: [
.package(url: "https://github.com/rock-n-code/amiibo-service", from: "1.0.0"),
// other dependencies
],
targets: [
.target(
name: "SomeTarget",
dependencies: [
.product(name: "AmiiboService", package: "amiibo-service"),
]
)
// other targets
]
)
```
It is also possible to use the `AmiiboService` library with your app in Xcode, then add it as a dependency in your Xcode project.
> important: Swift 5.10 or higher is required in order to compile this library.
## Tasks
This library offers a set of ready-to-use project management tasks that the developer could use from the command line. To show the list of tasks on the `Terminal` app, plus display some explanations about each and every one of them; please enter the following command:
```bash
$ make
```
## Topics
### Service
- ``AmiiboService``
### Clients
- ``AmiiboClient``
- ``AmiiboLiveClient``
### Models
- ``Amiibo``
- ``Amiibo/Game``
- ``Amiibo/Platform``
- ``Amiibo/Release``
- ``Amiibo/Usage``
- ``AmiiboSeries``
- ``AmiiboType``
- ``GameCharacter``
- ``GameSeries``
### Filters
- ``AmiiboFilter``
- ``AmiiboSeriesFilter``
- ``AmiiboTypeFilter``
- ``GameCharacterFilter``
- ``GameSeriesFilter``
### Errors
- ``AmiiboServiceError``
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -14,7 +14,13 @@ import Foundation
extension DateFormatter {
static var isoDateTime: DateFormatter {
// MARK: Properties
/// An ISO timestamp formatter.
///
/// This formatter implements the `yyyy-MM-dd'T'HH:mm:ss.SSSSSS` custom date format.
/// Within the context of this library, this formatter is solely used to decode a date formatted as a timestamp that is returned by the ``AmiiboService/getLastUpdated()`` function.
static var isoTimestamp: DateFormatter {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS"
@@ -0,0 +1,37 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
/// A protocol that defines filters that might contain `key` and/or `name` values.
protocol KeyNameFilter {
// MARK: Properties
/// A key to return, if any.
var key: String? { get }
/// A name to return, if any.
var name: String? { get }
// MARK: Initializers
/// Initializes this filter without key or name values.
init()
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
init(key: String)
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
init(name: String)
}
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -10,15 +10,21 @@
//
//===----------------------------------------------------------------------===
/// A protocol that defines decodable models containing the `key` and `name` properties.
protocol KeyNameModel: Sendable {
// MARK: Properties
/// A key.
var key: String { get }
/// A name.
var name: String { get }
// MARK: Initialisers
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.Tuple)
}
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -13,10 +13,19 @@
import Foundation
import OpenAPIRuntime
struct ISODateTranscoder: DateTranscoder {
/// A type that allows the decoding and encoding of ISO timestamp dates, defined by the `yyyy-MM-dd'T'HH:mm:ss.SSSSSS` custom date format.
struct ISOTimestampTranscoder {
// MARK: Properties
private let dateFormatter: DateFormatter = .isoDateTime
/// A formatter to use to decode and encode ISO timestamps dates.
private let dateFormatter: DateFormatter = .isoTimestamp
}
// MARK: - DateTranscoder
extension ISOTimestampTranscoder: DateTranscoder {
// MARK: Functions
@@ -0,0 +1,434 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
import OpenAPIRuntime
import OpenAPIURLSession
/// A type that implements a live client to the online service.
public struct AmiiboLiveClient: Sendable {
// MARK: Properties
/// A client generated by the `OpenAPIRuntime` library.
private let client: Client
// MARK: Initializers
/// Initializes this client.
/// - Parameter transport: A transport that performs HTTP operations.
public init(transport: any ClientTransport = URLSessionTransport()) {
self.client = .init(
// The force unwrapping implemented below assumes that the server definition from the OpenAPI specification is correct.
serverURL: try! Servers.Server1.url(),
configuration: .init(dateTranscoder: ISOTimestampTranscoder()),
transport: transport
)
}
}
// MARK: - AmiiboClient
// 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: AmiiboClient {
// MARK: Functions
#if swift(>=6.0)
/// 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 await fetchAmiibos(filter)
}
/// 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 await fetchAmiiboSeries(filter)
}
/// 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 await fetchAmiiboTypes(filter)
}
/// 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 await fetchGameCharacters(filter)
}
/// 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 await fetchGameSeries(filter)
}
/// 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 await fetchLastUpdated()
}
#else
/// 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 -> [Amiibo] {
try await fetchAmiibos(filter)
}
/// 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 -> [AmiiboSeries] {
try await fetchAmiiboSeries(filter)
}
/// 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 -> [AmiiboType] {
try await fetchAmiiboTypes(filter)
}
/// 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 -> [GameCharacter] {
try await fetchGameCharacters(filter)
}
/// 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 -> [GameSeries] {
try await fetchGameSeries(filter)
}
/// 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 -> Date {
try await fetchLastUpdated()
}
#endif
}
// MARK: - Helpers
private extension AmiiboLiveClient {
// MARK: Functions
/// Fetches 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 fetched amiibo items filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchAmiibos(
_ filter: AmiiboFilter
) async throws -> [Amiibo] {
let response: Operations.getAmiibos.Output
do {
response = try await client.getAmiibos(.init(query: .init(
amiiboSeries: filter.series,
character: filter.gameCharacter,
gameseries: filter.gameSeries,
id: filter.identifier,
name: filter.name,
showgames: filter.showGames,
showusage: filter.showUsage,
_type: filter.type
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches 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 fetched amiibo series filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchAmiiboSeries(
_ filter: AmiiboSeriesFilter
) async throws -> [AmiiboSeries] {
let response: Operations.getAmiiboSeries.Output
do {
response = try await client.getAmiiboSeries(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches 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 fetched amiibo types filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchAmiiboTypes(
_ filter: AmiiboTypeFilter
) async throws -> [AmiiboType] {
let response: Operations.getAmiiboTypes.Output
do {
response = try await client.getAmiiboTypes(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches 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 fetched game characters filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchGameCharacters(
_ filter: GameCharacterFilter
) async throws -> [GameCharacter] {
let response: Operations.getGameCharacters.Output
do {
response = try await client.getGameCharacters(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches 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 fetched game series filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchGameSeries(
_ filter: GameSeriesFilter
) async throws -> [GameSeries] {
let response: Operations.getGameSeries.Output
do {
response = try await client.getGameSeries(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches the date when the data was last updated.
/// - Returns: A fetched last updated date.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchLastUpdated() async throws -> Date {
let response: Operations.getLastUpdated.Output
do {
response = try await client.getLastUpdated()
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return output.lastUpdated
}
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Maps a given error to a `AmiiboServiceError` error.
/// - Parameter error: An error to map.
/// - Throws: An ``AmiiboServiceError`` error.
func handle(error: any Error) throws -> Never {
switch error {
case is CancellationError:
throw AmiiboServiceError.cancelled
case let clientError as ClientError:
switch clientError.underlyingError {
case is DecodingError:
throw AmiiboServiceError.decoding
case let urlError as URLError:
switch urlError.code {
case .cannotFindHost,
.cannotConnectToHost,
.dnsLookupFailed,
.networkConnectionLost,
.notConnectedToInternet,
.timedOut:
throw AmiiboServiceError.notAvailable
default:
throw AmiiboServiceError.unknown
}
default:
throw AmiiboServiceError.unknown
}
default:
throw AmiiboServiceError.unknown
}
}
/// Retrieves a list of amiibo items from a wrapper container.
/// - Parameter wrapper: A wrapper container that either has an object or a list of items.
/// - Returns: A list of amiibo items, sorted by identifiers.
func map(
_ wrapper: Components.Schemas.AmiiboWrapper
) -> [Amiibo] {
switch wrapper.amiibo {
case let .Amiibo(object):
return [Amiibo(object)]
case let .AmiiboList(list):
return list
.map { Amiibo($0) }
.sorted { $0.identifier < $1.identifier }
}
}
/// Retrieves a list of items that conforms to the `KeyNameModel` protocol from a wrapper container.
/// - Parameter wrapper: A wrapper container that either has an object or a list of items.
/// - Returns: A list of items that conforms to the `KeyNameModel` protocol, sorted by keys.
func map<Model: KeyNameModel>(
_ wrapper: Components.Schemas.TupleWrapper
) -> [Model] {
switch wrapper.amiibo {
case let .Tuple(payload):
return [Model(payload)]
case let .TupleList(list):
return list
.map { Model($0) }
.sorted { $0.key < $1.key }
}
}
}
@@ -0,0 +1,33 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
/// A representation of all the possible errors that the ``AmiiboService`` service could throw.
public enum AmiiboServiceError: Error {
/// A bad request has been given to the client.
case badRequest
/// A call to an endpoint has been cancelled by the user.
case cancelled
/// A response cannot be decoded.
case decoding
/// An online service is not currently available.
case notAvailable
/// A response cannot be found.
case notFound
/// An undocumented/unsupported status code error.
case undocumented(_ statusCode: Int)
/// An unknown error.
case unknown
}
// MARK: - Equatable
extension AmiiboServiceError: Equatable {}
@@ -0,0 +1,74 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting amiibo items.
public struct AmiiboFilter: Sendable {
// MARK: Properties
/// A game character to return, if any.
public let gameCharacter: String?
/// A game series to return, if any.
public let gameSeries: String?
/// An amiibo identifier to return, if any.
public let identifier: String?
/// An amiibo name to return, if any.
public let name: String?
/// An amiibo series to return, if any.
public let series: String?
/// A flag indicating whether to include games in the response, if any.
public let showGames: Bool?
/// A flag indicating whether to include amiibo usages in games in the response, if any.
public let showUsage: Bool?
/// An amiibo type to return, if any.
public let type: String?
// MARK: Initializers
/// Initializes this filter.
/// - Parameters:
/// - identifier: An amiibo identifier to return, if any.
/// - name: An amiibo name to return, if any.
/// - type: An amiibo type to return, if any.
/// - series: An amiibo series to return, if any.
/// - gameCharacter: A game character to return, if any.
/// - gameSeries: A game series to return, if any.
/// - showGames: A flag indicating whether to include games in the response, if any.
/// - showUsage: A flag indicating whether to include amiibo usages in games in the response, if any.
public init(
identifier: String? = nil,
name: String? = nil,
type: String? = nil,
series: String? = nil,
gameCharacter: String? = nil,
gameSeries: String? = nil,
showGames: Bool? = nil,
showUsage: Bool? = nil
) {
self.gameCharacter = gameCharacter
self.gameSeries = gameSeries
self.identifier = identifier
self.name = name
self.series = series
self.showGames = showGames
self.showUsage = showUsage
self.type = type
}
}
@@ -0,0 +1,48 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting amiibo series.
public struct AmiiboSeriesFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -0,0 +1,48 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting amiibo types.
public struct AmiiboTypeFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -0,0 +1,48 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting game characters.
public struct GameCharacterFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -0,0 +1,48 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting game series.
public struct GameSeriesFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -12,23 +12,45 @@
import Foundation
/// A model that represents an amiibo item.
public struct Amiibo: Sendable {
// MARK: Properties
/// A game character.
public let gameCharacter: String
/// A game series.
public let gameSeries: String
/// The first 8 hexadecimal characters of an identifier.
public let head: String
/// An image link.
public let image: String
/// An amiibo name.
public let name: String
/// A game platform type, if any.
public let platform: Platform?
/// A release date.
public let release: Release
/// An amiibo series.
public let series: String
/// The last 8 hexadecimal characters of an identifier.
public let tail: String
/// An amiibo type.
public let type: String
// MARK: Initialisers
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.Amiibo) {
self.gameCharacter = payload.character
self.gameSeries = payload.gameSeries
@@ -48,10 +70,12 @@ public struct Amiibo: Sendable {
// MARK: Computed
/// An identifier.
public var identifier: String {
head + tail
}
/// A URL related to an image link, if any.
public var imageURL: URL? {
.init(string: image)
}
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -11,16 +11,24 @@
//===----------------------------------------------------------------------===
extension Amiibo {
/// A model that represents a game related to an amiibo item.
public struct Game: Sendable {
// MARK: Properties
/// A list of identifiers.
public let identifiers: [String]
/// A name.
public let name: String
/// A list of amiibo usages, if any.
public let usages: [Usage]?
// MARK: Initialisers
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.AmiiboGame) {
self.identifiers = payload.gameID
self.name = payload.gameName
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -11,16 +11,30 @@
//===----------------------------------------------------------------------===
extension Amiibo {
/// A model that represents a collection of `WiiU`, `3DS`, and `Switch` games related to an amiibo item.
public struct Platform: Sendable {
// MARK: Properties
/// A list of `Switch` games related to an amiibo item.
public let `switch`: [Game]
/// A list of `3DS` games related to an amiibo item.
public let threeDS: [Game]
/// A list of `WiiU` games related to an amiibo item.
public let wiiU: [Game]
// MARK: Initialisers
/// Initializes this model.
///
/// > important: In case no data is provided, then an instance of this model is not created.
///
/// - Parameters:
/// - switch: A list of `Switch` games related to an amiibo item, if any.
/// - threeDS: A list of `3DS` games related to an amiibo item, if any.
/// - wiiU: A list of `WiiU` games related to an amiibo item, if any.
init?(
_ `switch`: [Components.Schemas.AmiiboGame]?,
_ threeDS: [Components.Schemas.AmiiboGame]?,
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -13,17 +13,27 @@
import Foundation
extension Amiibo {
/// A model that represents a collection of release dates related to an amiibo item.
public struct Release: Sendable {
// MARK: Properties
/// A release date for North America, if any.
public let america: Date?
/// A release date for Australia, if any.
public let australia: Date?
/// A release date for Europe, if any.
public let europe: Date?
/// A release date for Japan, if any.
public let japan: Date?
// MARK: Initialisers
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.AmiiboRelease) {
self.america = payload.na
self.australia = payload.au
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -11,15 +11,21 @@
//===----------------------------------------------------------------------===
extension Amiibo {
/// A model that represents the usage of an amiibo item within a certain game.
public struct Usage: Sendable {
// MARK: Properties
/// An explanation of how to use an amiibo item.
public let explanation: String
/// A flag that indicates whether an amiibo item can save game data in it.
public let isWriteable: Bool
// MARK: Initialisers
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.AmiiboUsage) {
self.explanation = payload.Usage
self.isWriteable = payload.write
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -10,14 +10,20 @@
//
//===----------------------------------------------------------------------===
/// A model that represents an amiibo series.
public struct AmiiboSeries: KeyNameModel {
// MARK: Properties
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initialisers
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -10,14 +10,20 @@
//
//===----------------------------------------------------------------------===
/// A model that represents an amiibo type.
public struct AmiiboType: KeyNameModel {
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initialisers
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -10,14 +10,20 @@
//
//===----------------------------------------------------------------------===
/// A model that represents a game character.
public struct GameCharacter: KeyNameModel {
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initialisers
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -10,14 +10,20 @@
//
//===----------------------------------------------------------------------===
/// A model that represents a game series.
public struct GameSeries: KeyNameModel {
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initialisers
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
@@ -0,0 +1,92 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
/// A protocol that defines API clients containing all available endpoints to interact with.
public protocol AmiiboClient {
// MARK: Functions
#if swift(>=6.0)
/// 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.
func getAmiibos(by filter: AmiiboFilter) async throws(AmiiboServiceError) -> [Amiibo]
/// 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
#else
/// 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.
func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo]
/// 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 -> [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 -> [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 -> [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 -> [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 -> Date
#endif
}
@@ -0,0 +1,149 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
/// A type that implements the service that uses a client to make calls.
public struct AmiiboService {
// MARK: Properties
/// A client to interact with the endpoints.
private let client: any AmiiboClient
// MARK: Initializers
/// Initializes this service with a specific client type.
/// - Parameter client: A client to use to interact with the endpoints.
public init(client: some AmiiboClient = AmiiboLiveClient()) {
self.client = client
}
// MARK: Functions
#if swift(>=6.0)
/// 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(
_ filter: AmiiboFilter = .init()
) async throws(AmiiboServiceError) -> [Amiibo] {
try await client.getAmiibos(by: filter)
}
/// 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(
_ filter: AmiiboSeriesFilter = .init()
) async throws(AmiiboServiceError) -> [AmiiboSeries] {
try await client.getAmiiboSeries(by: filter)
}
/// 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(
_ filter: AmiiboTypeFilter = .init()
) async throws(AmiiboServiceError) -> [AmiiboType] {
try await client.getAmiiboTypes(by: filter)
}
/// 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(
_ filter: GameCharacterFilter = .init()
) async throws(AmiiboServiceError) -> [GameCharacter] {
try await client.getGameCharacters(by: filter)
}
/// 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(
_ filter: GameSeriesFilter = .init()
) async throws(AmiiboServiceError) -> [GameSeries] {
try await client.getGameSeries(by: filter)
}
/// 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 await client.getLastUpdated()
}
#else
/// 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(
_ filter: AmiiboFilter = .init()
) async throws -> [Amiibo] {
try await client.getAmiibos(by: filter)
}
/// 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(
_ filter: AmiiboSeriesFilter = .init()
) async throws -> [AmiiboSeries] {
try await client.getAmiiboSeries(by: filter)
}
/// 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(
_ filter: AmiiboTypeFilter = .init()
) async throws -> [AmiiboType] {
try await client.getAmiiboTypes(by: filter)
}
/// 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(
_ filter: GameCharacterFilter = .init()
) async throws -> [GameCharacter] {
try await client.getGameCharacters(by: filter)
}
/// 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(
_ filter: GameSeriesFilter = .init()
) async throws -> [GameSeries] {
try await client.getGameSeries(by: filter)
}
/// 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 -> Date {
try await client.getLastUpdated()
}
#endif
}
@@ -1,8 +1,8 @@
# ===----------------------------------------------------------------------===
#
# This source file is part of the AmiiboAPI open source project
# This source file is part of the AmiiboService open source project
#
# Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
# Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
# Licensed under the EUPL 1.2 or later.
#
# See LICENSE for license information
@@ -13,4 +13,5 @@
generate:
- types
- client
namingStrategy: defensive
accessModifier: internal
@@ -1,8 +1,8 @@
# ===----------------------------------------------------------------------===
#
# This source file is part of the AmiiboAPI open source project
# This source file is part of the AmiiboService open source project
#
# Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
# Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
# Licensed under the EUPL 1.2 or later.
#
# See LICENSE for license information
@@ -1,29 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import OpenAPIURLSession
extension Client {
// MARK: Constants
static var live: Client {
get throws {
.init(
serverURL: try Servers.server1(),
configuration: .init(dateTranscoder: ISODateTranscoder()),
transport: URLSessionTransport()
)
}
}
}
@@ -1,26 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
public protocol APIClient {
// MARK: Functions
func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo]
func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries]
func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws -> [AmiiboType]
func getGameCharacters(by filter: GameCharacterFilter) async throws -> [GameCharacter]
func getGameSeries(by filter: GameSeriesFilter) async throws -> [GameSeries]
func getLastUpdated() async throws -> Date
}
@@ -1,248 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
import OpenAPIRuntime
import OpenAPIURLSession
public struct AmiiboLiveClient {
// MARK: Properties
private let client: Client
// MARK: Initialisers
public init() throws {
self.client = .init(
serverURL: try Servers.server1(),
configuration: .init(dateTranscoder: ISODateTranscoder()),
transport: URLSessionTransport()
)
}
}
// MARK: - APIProtocol
extension AmiiboLiveClient: APIClient {
// MARK: Functions
public func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo] {
let response = try await {
do {
return try await client.getAmiibos(
.init(query: .init(
amiiboSeries: filter.series,
character: filter.gameCharacter,
gameseries: filter.gameSeries,
id: filter.identifier,
name: filter.name,
showgames: filter.showGames,
showusage: filter.showUsage,
_type: filter.type
))
)
} catch let error as ClientError {
guard let _ = error.underlyingError as? DecodingError else {
throw AmiiboServiceError.unknown
}
throw AmiiboServiceError.decoding
} catch {
throw AmiiboServiceError.unknown
}
}()
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries] {
let response = try await client.getAmiiboSeries(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: AmiiboSeries.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws -> [AmiiboType] {
let response = try await client.getAmiiboTypes(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: AmiiboType.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getGameCharacters(by filter: GameCharacterFilter) async throws -> [GameCharacter] {
let response = try await client.getGameCharacters(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: GameCharacter.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getGameSeries(by filter: GameSeriesFilter) async throws -> [GameSeries] {
let response = try await client.getGameSeries(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: GameSeries.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getLastUpdated() async throws -> Date {
let response = try await client.getLastUpdated()
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return output.lastUpdated
}
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
}
// MARK: - Helpers
private extension AmiiboLiveClient {
// MARK: Functions
func map(_ wrapper: Components.Schemas.AmiiboWrapper) -> [Amiibo] {
switch wrapper.amiibo {
case let .Amiibo(object):
return [.init(object)]
case let .AmiiboList(list):
return list
.map { .init($0) }
.sorted { $0.identifier < $1.identifier }
}
}
func map<Model: KeyNameModel>(
_ wrapper: Components.Schemas.TupleWrapper,
as: Model.Type
) -> [Model] {
switch wrapper.amiibo {
case let .Tuple(payload):
return [.init(payload)]
case let .TupleList(list):
return list
.map { .init($0) }
.sorted { $0.key < $1.key }
}
}
}
@@ -1,130 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
public struct AmiiboMockClient {
// MARK: Properties
private let amiibos: [Amiibo]?
private let amiiboSeries: [AmiiboSeries]?
private let amiiboTypes: [AmiiboType]?
private let error: AmiiboServiceError?
private let gameCharacters: [GameCharacter]?
private let gameSeries: [GameSeries]?
private let lastUpdated: Date?
// MARK: Initialisers
public init(
amiibos: [Amiibo]? = nil,
amiiboSeries: [AmiiboSeries]? = nil,
amiiboTypes: [AmiiboType]? = nil,
gameCharacters: [GameCharacter]? = nil,
gameSeries: [GameSeries]? = nil,
lastUpdated: Date? = nil,
error: AmiiboServiceError? = nil
) {
self.amiibos = amiibos
self.amiiboSeries = amiiboSeries
self.amiiboTypes = amiiboTypes
self.error = error
self.gameCharacters = gameCharacters
self.gameSeries = gameSeries
self.lastUpdated = lastUpdated
}
}
// MARK: - APIClient
extension AmiiboMockClient: APIClient {
// MARK: Functions
public func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo] {
try throwErrorIfExists()
guard let amiibos else {
throw AmiiboServiceError.notFound
}
return amiibos
}
public func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries] {
try throwErrorIfExists()
guard let amiiboSeries else {
throw AmiiboServiceError.notFound
}
return amiiboSeries
}
public func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws -> [AmiiboType] {
try throwErrorIfExists()
guard let amiiboTypes else {
throw AmiiboServiceError.notFound
}
return amiiboTypes
}
public func getGameCharacters(by filter: GameCharacterFilter) async throws -> [GameCharacter] {
try throwErrorIfExists()
guard let gameCharacters else {
throw AmiiboServiceError.notFound
}
return gameCharacters
}
public func getGameSeries(by filter: GameSeriesFilter) async throws -> [GameSeries] {
try throwErrorIfExists()
guard let gameSeries else {
throw AmiiboServiceError.notFound
}
return gameSeries
}
public func getLastUpdated() async throws -> Date {
try throwErrorIfExists()
guard let lastUpdated else {
throw AmiiboServiceError.notFound
}
return lastUpdated
}
}
// MARK: - Helpers
private extension AmiiboMockClient {
// MARK: Functions
func throwErrorIfExists() throws {
if let error {
throw error
}
}
}
@@ -1,24 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public enum AmiiboServiceError: Error {
case badRequest
case decoding
case notAvailable
case notFound
case undocumented(_ statusCode: Int)
case unknown
}
// MARK: - Equatable
extension AmiiboServiceError: Equatable {}
-48
View File
@@ -1,48 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct AmiiboFilter {
// MARK: Properties
public let gameCharacter: String?
public let gameSeries: String?
public let identifier: String?
public let name: String?
public let series: String?
public let showGames: Bool?
public let showUsage: Bool?
public let type: String?
// MARK: Initialisers
public init(
identifier: String? = nil,
name: String? = nil,
type: String? = nil,
series: String? = nil,
gameCharacter: String? = nil,
gameSeries: String? = nil,
showGames: Bool? = nil,
showUsage: Bool? = nil
) {
self.gameCharacter = gameCharacter
self.gameSeries = gameSeries
self.identifier = identifier
self.name = name
self.series = series
self.showGames = showGames
self.showUsage = showUsage
self.type = type
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct AmiiboSeriesFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct AmiiboTypeFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct GameCharacterFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct GameSeriesFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,63 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
public struct AmiiboService {
// MARK: Properties
private let client: any APIClient
// MARK: Initialisers
public init(_ client: any APIClient) {
self.client = client
}
// MARK: Functions
public func getAmiibos(
_ filter: AmiiboFilter = .init()
) async throws -> [Amiibo] {
try await client.getAmiibos(by: filter)
}
public func getAmiiboSeries(
_ filter: AmiiboSeriesFilter = .init()
) async throws -> [AmiiboSeries] {
try await client.getAmiiboSeries(by: filter)
}
public func getAmiiboTypes(
_ filter: AmiiboTypeFilter = .init()
) async throws -> [AmiiboType] {
try await client.getAmiiboTypes(by: filter)
}
public func getGameCharacters(
_ filter: GameCharacterFilter = .init()
) async throws -> [GameCharacter] {
try await client.getGameCharacters(by: filter)
}
public func getGameSeries(
_ filter: GameSeriesFilter = .init()
) async throws -> [GameSeries] {
try await client.getGameSeries(by: filter)
}
public func getLastUpdated() async throws -> Date {
try await client.getLastUpdated()
}
}
@@ -0,0 +1,693 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import AmiiboService
import Foundation
import Testing
@Suite("Amiibo Service", .tags(.live))
struct AmiiboServiceLiveTests {
// MARK: Properties
private let service: AmiiboService
// MARK: Initializers
init() {
self.service = .init()
}
// MARK: Functions tests
#if swift(>=6.2)
@Test(arguments: zip(
Input.amiibos,
Output.amiibos
))
func `get amiibos`(
filter: AmiiboFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiibos(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.amiibosThrows,
Output.amiibosThrows
))
func `get amiibos throws`(
filter: AmiiboFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiibosThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.amiiboSeries,
Output.amiiboSeries
))
func `get amiibo series`(
filter: AmiiboSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboSeries(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.amiiboSeriesThrows,
Output.amiiboSeriesThrows
))
func `get amiibo series throws`(
filter: AmiiboSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboSeriesThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.amiiboTypes,
Output.amiiboTypes
))
func `get amiibo types`(
filter: AmiiboTypeFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboTypes(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.amiiboTypesThrows,
Output.amiiboTypesThrows
))
func `get amiibo types throws`(
filter: AmiiboTypeFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboTypesThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.gameCharacters,
Output.gameCharacters
))
func `get game characters`(
filter: GameCharacterFilter,
expects numberOfItems: Int
) async throws {
try await assertGameCharacters(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.gameCharactersThrows,
Output.gameCharactersThrows
))
func `get game characters throws`(
filter: GameCharacterFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameCharactersThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.gameSeries,
Output.gameSeries
))
func `get game series`(
filter: GameSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertGameSeries(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.gameSeriesThrows,
Output.gameSeriesThrows
))
func `get game series throws`(
filter: GameSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameSeriesThrows(
error: error,
when: filter
)
}
@Test
func `get the last updated timestamp`() async throws {
try await assertLastUpdated(
day: 21,
month: 9,
year: 2025
)
}
#else
@Test("get amiibos", arguments: zip(
Input.amiibos,
Output.amiibos
))
func getAmiibos(
filter: AmiiboFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiibos(
with: filter,
expects: numberOfItems
)
}
@Test("get amiibos throws", arguments: zip(
Input.amiibosThrows,
Output.amiibosThrows
))
func getAmiibosThrows(
filter: AmiiboFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiibosThrows(
error: error,
when: filter
)
}
@Test("get amiibo series", arguments: zip(
Input.amiiboSeries,
Output.amiiboSeries
))
func getAmiiboSeries(
filter: AmiiboSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboSeries(
with: filter,
expects: numberOfItems
)
}
@Test("get amiibo series throws", arguments: zip(
Input.amiiboSeriesThrows,
Output.amiiboSeriesThrows
))
func getAmiiboSeriesThrows(
filter: AmiiboSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboSeriesThrows(
error: error,
when: filter
)
}
@Test("get amiibo types", arguments: zip(
Input.amiiboTypes,
Output.amiiboTypes
))
func getAmiiboTypes(
filter: AmiiboTypeFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboTypes(
with: filter,
expects: numberOfItems
)
}
@Test("get amiibo types throws", arguments: zip(
Input.amiiboTypesThrows,
Output.amiiboTypesThrows
))
func getAmiiboTypesThrows(
filter: AmiiboTypeFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboTypesThrows(
error: error,
when: filter
)
}
@Test("get game characters", arguments: zip(
Input.gameCharacters,
Output.gameCharacters
))
func getGameCharacters(
filter: GameCharacterFilter,
expects numberOfItems: Int
) async throws {
try await assertGameCharacters(
with: filter,
expects: numberOfItems
)
}
@Test("get game characters throws", arguments: zip(
Input.gameCharactersThrows,
Output.gameCharactersThrows
))
func getGameCharactersThrows(
filter: GameCharacterFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameCharactersThrows(
error: error,
when: filter
)
}
@Test("get game series", arguments: zip(
Input.gameSeries,
Output.gameSeries
))
func getGameSeries(
filter: GameSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertGameSeries(
with: filter,
expects: numberOfItems
)
}
@Test("get game series throws", arguments: zip(
Input.gameSeriesThrows,
Output.gameSeriesThrows
))
func getGameSeriesThrows(
filter: GameSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameSeriesThrows(
error: error,
when: filter
)
}
@Test("get last updated timestamp")
func getLastUpdated() async throws {
try await assertLastUpdated(
day: 21,
month: 9,
year: 2025
)
}
#endif
}
// MARK: - Assertions
private extension AmiiboServiceLiveTests {
// MARK: Functions
/// Asserts the number of items returned by the `amiibos` endpoint that matched a given filter.
/// - Parameters:
/// - filter: An amiibo filter type.
/// - numberOfItems: An expected number of items returned.
func assertAmiibos(
with filter: AmiiboFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let amiibos = try await service.getAmiibos(filter)
// THEN
#expect(amiibos.count == numberOfItems)
guard
!amiibos.isEmpty,
(filter.showGames == true || filter.showUsage == true)
else { return }
let firstAmiiboPlatform = try #require(amiibos.first?.platform)
#expect(amiibos.last?.platform != nil)
if filter.showUsage == true {
#expect(firstAmiiboPlatform.switch.first?.usages?.isEmpty == false)
#expect(firstAmiiboPlatform.threeDS.first?.usages?.isEmpty == false)
#expect(firstAmiiboPlatform.wiiU.first?.usages?.isEmpty == false)
}
}
/// Asserts the error thrown by the `amiibos` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: An amiibo filter type.
func assertsAmiibosThrows(
error: AmiiboServiceError,
when filter: AmiiboFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getAmiibos(filter)
}
}
/// Asserts the number of items returned by the `amiiboSeries` endpoint that matched a given filter.
/// - Parameters:
/// - filter: An amiibo series filter type.
/// - numberOfItems: An expected number of items returned.
func assertAmiiboSeries(
with filter: AmiiboSeriesFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let amiiboSeries = try await service.getAmiiboSeries(filter)
// THEN
#expect(amiiboSeries.count == numberOfItems)
}
/// Asserts the error thrown by the `amiiboSeries` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: An amiibo series filter type.
func assertsAmiiboSeriesThrows(
error: AmiiboServiceError,
when filter: AmiiboSeriesFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getAmiiboSeries(filter)
}
}
/// Asserts the number of items returned by the `amiiboTypes` endpoint that matched a given filter.
/// - Parameters:
/// - filter: An amiibo type filter type.
/// - numberOfItems: An expected number of items returned.
func assertAmiiboTypes(
with filter: AmiiboTypeFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let amiiboTypes = try await service.getAmiiboTypes(filter)
// THEN
#expect(amiiboTypes.count == numberOfItems)
}
/// Asserts the error thrown by the `amiiboTypes` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: An amiibo type filter type.
func assertsAmiiboTypesThrows(
error: AmiiboServiceError,
when filter: AmiiboTypeFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getAmiiboTypes(filter)
}
}
/// Asserts the number of items returned by the `gameCharacters` endpoint that matched a given filter.
/// - Parameters:
/// - filter: A game character filter type.
/// - numberOfItems: An expected number of items returned.
func assertGameCharacters(
with filter: GameCharacterFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let gameCharacters = try await service.getGameCharacters(filter)
// THEN
#expect(gameCharacters.count == numberOfItems)
}
/// Asserts the error thrown by the `gameCharacters` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: A game character filter type.
func assertsGameCharactersThrows(
error: AmiiboServiceError,
when filter: GameCharacterFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getGameCharacters(filter)
}
}
/// Asserts the number of items returned by the `gameSeries` endpoint that matched a given filter.
/// - Parameters:
/// - filter: A game series filter type.
/// - numberOfItems: An expected number of items returned.
func assertGameSeries(
with filter: GameSeriesFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let gameSeries = try await service.getGameSeries(filter)
// THEN
#expect(gameSeries.count == numberOfItems)
}
/// Asserts the error thrown by the `gameSeries` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: A game series filter type.
func assertsGameSeriesThrows(
error: AmiiboServiceError,
when filter: GameSeriesFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getGameSeries(filter)
}
}
/// Asserts the date returned by the `lastUpdated` endpoint.
/// - Parameters:
/// - day: A number of day of the last updated date.
/// - month: A number of month of the last updated date.
/// - year: A number of year of the last updated date.
func assertLastUpdated(
day: Int,
month: Int,
year: Int
) async throws {
// GIVEN
// WHEN
let dateLastUpdated = try await service.getLastUpdated()
// THEN
let dateComponents = Calendar.current.dateComponents(
[.year, .month, .day],
from: dateLastUpdated
)
#expect(dateComponents.year == year)
#expect(dateComponents.month == month)
#expect(dateComponents.day == day)
}
}
// MARK: - Arguments
enum Input {
/// A list of amiibo filters to input to the `assertAmiibos` assertion.
static let amiibos: [AmiiboFilter] = [
.init(),
.init(identifier: "0000000000000002"),
.init(name: "zelda"),
.init(name: "Something"),
.init(name: "zel"),
.init(name: .empty),
.init(type: "0x00"),
.init(type: "Figure"),
.init(type: "0x0f"),
.init(type: "something"),
.init(type: "fig"),
.init(type: .empty),
.init(series: "0x00"),
.init(series: "Legend of Zelda"),
.init(series: "0xf9"),
.init(series: "something"),
.init(series: "fig"),
.init(series: .empty),
.init(gameCharacter: "0x00"),
.init(gameCharacter: "Zelda"),
.init(gameCharacter: "0xf9"),
.init(gameCharacter: "something"),
.init(gameCharacter: "fig"),
.init(gameCharacter: .empty),
.init(gameSeries: "0x00"),
.init(gameSeries: "Legend of Zelda"),
.init(gameSeries: "0xf9"),
.init(gameSeries: "something"),
.init(gameSeries: "Super"),
.init(gameSeries: .empty),
.init(showGames: true),
.init(showUsage: true)
]
/// A list of amiibo series filters to input to the `assertAmiibosThrows` assertion.
static let amiibosThrows: [AmiiboFilter] = [
.init(identifier: "0000000000000000"),
.init(identifier: "0000000"),
.init(identifier: .empty),
.init(type: "0x"),
.init(series: "0x"),
.init(gameCharacter: "0x"),
.init(gameSeries: "0x"),
]
/// A list of amiibo series filters to input to the `assertAmiiboSeries` assertion.
static let amiiboSeries: [AmiiboSeriesFilter] = [
.init(),
.init(key: "0x01"),
.init(name: "Legend of Zelda"),
.init(name: "Zelda"),
.init(name: .empty)
]
/// A list of amiibo series filters to input to the `assertAmiiboSeriesThrows` assertion.
static let amiiboSeriesThrows: [AmiiboSeriesFilter] = [
.init(key: "0xf9"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
/// A list of amiibo type filters to input to the `assertAmiiboTypes` assertion.
static let amiiboTypes: [AmiiboTypeFilter] = [
.init(),
.init(key: "0x01"),
.init(name: "Card"),
.init(name: "Ca"),
.init(name: .empty)
]
/// A list of amiibo type filters to input to the `assertAmiiboTypesThrows` assertion.
static let amiiboTypesThrows: [AmiiboTypeFilter] = [
.init(key: "0x09"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
/// A list of game character filters to input to the `assertGameCharacters` assertion.
static let gameCharacters: [GameCharacterFilter] = [
.init(),
.init(key: "0x0001"),
.init(name: "Zelda"),
.init(name: "Zeld"),
.init(name: .empty)
]
/// A list of game character filters to input to the `assertGameCharactersThrows` assertion.
static let gameCharactersThrows: [GameCharacterFilter] = [
.init(key: "0xffff"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
/// A list of game series filters to input to the `assertGameSeries` assertion.
static let gameSeries: [GameSeriesFilter] = [
.init(),
.init(key: "0x001"),
.init(name: "Pikmin"),
.init(name: "Pik"),
.init(name: .empty)
]
/// A list of game series filters to input to the `assertGameSeriesThrows` assertion.
static let gameSeriesThrows: [GameSeriesFilter] = [
.init(key: "0xffff"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
}
enum Output {
/// A list of number of items that are expected from the `assertAmiibos` assertion.
static let amiibos: [Int] = [.totalAmiibos, 1, 5, .zero, 7, .totalAmiibos, 235, 235, .zero, .zero, .zero, .zero, 96, 26, .zero, .zero, 25, .totalAmiibos, 12, 6, .zero, .zero, .zero, .totalAmiibos, 49, 32, .zero, .zero, 147, .totalAmiibos, .totalAmiibos, .totalAmiibos]
/// A list of errors are expected to be thrown from the `assertAmiibosThrows` assertion.
static let amiibosThrows: [AmiiboServiceError] = [.decoding, .decoding, .badRequest, .badRequest, .badRequest, .badRequest, .badRequest]
/// A list of number of items that are expected from the `assertAmiiboSeries` assertion.
static let amiiboSeries: [Int] = [.totalAmiiboSeries, 1, 1, 1, .totalAmiiboSeries]
/// A list of errors are expected to be thrown from the `assertAmiiboSeriesThrows` assertion.
static let amiiboSeriesThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
/// A list of number of items that are expected from the `assertAmiiboTypes` assertion.
static let amiiboTypes: [Int] = [.totalAmiiboTypes, 1, 1, 1, .totalAmiiboTypes]
/// A list of errors are expected to be thrown from the `assertAmiiboTypesThrows` assertion.
static let amiiboTypesThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
/// A list of number of items that are expected from the `assertGameCharacters` assertion.
static let gameCharacters: [Int] = [.totalGameCharacters, 1, 1, 1, .totalGameCharacters]
/// A list of errors are expected to be thrown from the `assertGameCharactersThrows` assertion.
static let gameCharactersThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
/// A list of number of items that are expected from the `assertGameSeries` assertion.
static let gameSeries: [Int] = [.totalGameSeries, 1, 1, 1, .totalGameSeries]
/// A list of errors are expected to be thrown from the `assertGameSeriesThrows` assertion.
static let gameSeriesThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
}
// MARK: - Constants
private extension Int {
/// A number that represents the total number of amiibo items currently available at the live service.
static let totalAmiibos = 889
/// A number that represents the total number of amiibo series currently available at the live service.
static let totalAmiiboSeries = 29
/// A number that represents the total number of amiibo types currently available at the live service.
static let totalAmiiboTypes = 5
/// A number that represents the total number of game characters currently available at the live service.
static let totalGameCharacters = 668
/// A number that represents the total number of game series currently available at the live service.
static let totalGameSeries = 117
}
private extension String {
/// An empty string.
static let empty = ""
}
@@ -0,0 +1,217 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import AmiiboService
import Foundation
/// A type that implements a mock client, for testing purposes.
struct AmiiboMockClient {
// MARK: Properties
/// A list of amiibo items to return, if any.
private let amiibos: [Amiibo]?
/// A list of amiibo series to return, if any.
private let amiiboSeries: [AmiiboSeries]?
/// A list of amiibo types to return, if any.
private let amiiboTypes: [AmiiboType]?
/// An error to throw, if any.
private let error: AmiiboServiceError?
/// A list of game characters to return, if any.
private let gameCharacters: [GameCharacter]?
/// A list of game series to return, if any.
private let gameSeries: [GameSeries]?
/// A last updated date to return, if any.
private let lastUpdated: Date?
// MARK: Initializers
/// Initializes this client.
/// - Parameters:
/// - amiibos: A list of amiibo items to return, if any.
/// - amiiboSeries: A list of amiibo series to return, if any.
/// - amiiboTypes: A list of amiibo types to return, if any.
/// - gameCharacters: A list of game characters to return, if any.
/// - gameSeries: A list of game series to return, if any.
/// - lastUpdated: A last updated date to return, if any.
/// - error: An error to throw, if any.
init(
amiibos: [Amiibo]? = nil,
amiiboSeries: [AmiiboSeries]? = nil,
amiiboTypes: [AmiiboType]? = nil,
gameCharacters: [GameCharacter]? = nil,
gameSeries: [GameSeries]? = nil,
lastUpdated: Date? = nil,
error: AmiiboServiceError? = nil
) {
self.amiibos = amiibos
self.amiiboSeries = amiiboSeries
self.amiiboTypes = amiiboTypes
self.error = error
self.gameCharacters = gameCharacters
self.gameSeries = gameSeries
self.lastUpdated = lastUpdated
}
}
// MARK: - AmiiboClient
extension AmiiboMockClient: AmiiboClient {
// MARK: Functions
#if swift(>=6.0)
func getAmiibos(by filter: AmiiboFilter) async throws(AmiiboServiceError) -> [Amiibo] {
try throwErrorIfExists()
guard let amiibos else {
throw AmiiboServiceError.notFound
}
return amiibos
}
func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws(AmiiboServiceError) -> [AmiiboSeries] {
try throwErrorIfExists()
guard let amiiboSeries else {
throw AmiiboServiceError.notFound
}
return amiiboSeries
}
func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws(AmiiboServiceError) -> [AmiiboType] {
try throwErrorIfExists()
guard let amiiboTypes else {
throw AmiiboServiceError.notFound
}
return amiiboTypes
}
func getGameCharacters(by filter: GameCharacterFilter) async throws(AmiiboServiceError) -> [GameCharacter] {
try throwErrorIfExists()
guard let gameCharacters else {
throw AmiiboServiceError.notFound
}
return gameCharacters
}
func getGameSeries(by filter: GameSeriesFilter) async throws(AmiiboServiceError) -> [GameSeries] {
try throwErrorIfExists()
guard let gameSeries else {
throw AmiiboServiceError.notFound
}
return gameSeries
}
func getLastUpdated() async throws(AmiiboServiceError) -> Date {
try throwErrorIfExists()
guard let lastUpdated else {
throw AmiiboServiceError.notFound
}
return lastUpdated
}
#else
func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo] {
try throwErrorIfExists()
guard let amiibos else {
throw AmiiboServiceError.notFound
}
return amiibos
}
func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries] {
try throwErrorIfExists()
guard let amiiboSeries else {
throw AmiiboServiceError.notFound
}
return amiiboSeries
}
func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws -> [AmiiboType] {
try throwErrorIfExists()
guard let amiiboTypes else {
throw AmiiboServiceError.notFound
}
return amiiboTypes
}
func getGameCharacters(by filter: GameCharacterFilter) async throws -> [GameCharacter] {
try throwErrorIfExists()
guard let gameCharacters else {
throw AmiiboServiceError.notFound
}
return gameCharacters
}
func getGameSeries(by filter: GameSeriesFilter) async throws -> [GameSeries] {
try throwErrorIfExists()
guard let gameSeries else {
throw AmiiboServiceError.notFound
}
return gameSeries
}
func getLastUpdated() async throws -> Date {
try throwErrorIfExists()
guard let lastUpdated else {
throw AmiiboServiceError.notFound
}
return lastUpdated
}
#endif
}
// MARK: - Helpers
private extension AmiiboMockClient {
// MARK: Functions
/// Throws an error if it has been provided,
/// - Throws: An ``AmiiboServiceError`` error in case an error has been provided.
func throwErrorIfExists() throws(AmiiboServiceError) {
if let error {
throw error
}
}
}
@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
@@ -10,17 +10,13 @@
//
//===----------------------------------------------------------------------===
protocol KeyNameFilter {
import Testing
extension Tag {
// MARK: Properties
var key: String? { get }
var name: String? { get }
// MARK: Initialisers
init()
init(key: String)
init(name: String)
/// Tag that indicates tests against a live backend service.
@Tag static var live: Self
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"metadata":{"role":"symbol","symbolKind":"property","title":"identifiers","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V4GameV11identifiersSaySSGvp","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifiers","kind":"identifier"},{"text":": [","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":"]","kind":"text"}]},"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/identifiers"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"A list of identifiers."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifiers","kind":"identifier"},{"text":": [","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":"]","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/identifiers"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Game","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Game","kind":"identifier"}],"title":"Amiibo.Game","abstract":[{"type":"text","text":"A model that represents a game related to an amiibo item."}],"url":"\/documentation\/amiiboservice\/amiibo\/game","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/identifiers":{"role":"symbol","kind":"symbol","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/identifiers","abstract":[{"text":"A list of identifiers.","type":"text"}],"title":"identifiers","url":"\/documentation\/amiiboservice\/amiibo\/game\/identifiers","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifiers","kind":"identifier"},{"text":": [","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]}}}
@@ -0,0 +1 @@
{"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/name"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"metadata":{"title":"name","symbolKind":"property","role":"symbol","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V4GameV4nameSSvp","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"sections":[],"abstract":[{"type":"text","text":"A name."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/name","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Game","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Game","kind":"identifier"}],"title":"Amiibo.Game","abstract":[{"type":"text","text":"A model that represents a game related to an amiibo item."}],"url":"\/documentation\/amiiboservice\/amiibo\/game","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/name":{"role":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/name","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"url":"\/documentation\/amiiboservice\/amiibo\/game\/name","kind":"symbol","title":"name","type":"topic","abstract":[{"type":"text","text":"A name."}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]}}}
@@ -0,0 +1 @@
{"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"externalID":"s:13AmiiboService0A0V4GameV6usagesSayAC5UsageVGSgvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"usages"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V","text":"Amiibo"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V5UsageV","text":"Usage"},{"text":"]?","kind":"text"}],"modules":[{"name":"AmiiboService"}],"role":"symbol","title":"usages"},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"usages"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"Amiibo","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","preciseIdentifier":"s:13AmiiboService0A0V"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V5UsageV","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","text":"Usage"},{"kind":"text","text":"]?"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/usages","interfaceLanguage":"swift"},"abstract":[{"text":"A list of amiibo usages, if any.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"sections":[],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/usages"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"role":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Usage"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage","kind":"symbol","title":"Amiibo.Usage","type":"topic","navigatorTitle":[{"text":"Usage","kind":"identifier"}],"abstract":[{"text":"A model that represents the usage of an amiibo item within a certain game.","type":"text"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Game","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Game","kind":"identifier"}],"title":"Amiibo.Game","abstract":[{"type":"text","text":"A model that represents a game related to an amiibo item."}],"url":"\/documentation\/amiiboservice\/amiibo\/game","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/usages":{"role":"symbol","kind":"symbol","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/usages","abstract":[{"text":"A list of amiibo usages, if any.","type":"text"}],"title":"usages","url":"\/documentation\/amiiboservice\/amiibo\/game\/usages","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"usages","kind":"identifier"},{"text":": [","kind":"text"},{"text":"Amiibo","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V"},{"text":".","kind":"text"},{"text":"Usage","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V5UsageV"},{"text":"]?","kind":"text"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V13gameCharacterSSvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"gameCharacter","roleHeading":"Instance Property"},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/gamecharacter"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","abstract":[{"text":"A game character.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameCharacter"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/gameCharacter":{"kind":"symbol","title":"gameCharacter","type":"topic","abstract":[{"type":"text","text":"A game character."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameCharacter","url":"\/documentation\/amiiboservice\/amiibo\/gamecharacter","role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"gameCharacter"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]}}}
@@ -0,0 +1 @@
{"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameSeries","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameSeries"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}]}],"kind":"declarations"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"text":"A game series.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/gameseries"]}],"metadata":{"externalID":"s:13AmiiboService0A0V10gameSeriesSSvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameSeries"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"modules":[{"name":"AmiiboService"}],"title":"gameSeries","role":"symbol"},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/gameSeries":{"type":"topic","title":"gameSeries","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A game series."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameSeries","url":"\/documentation\/amiiboservice\/amiibo\/gameseries","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameSeries","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]}}}
@@ -0,0 +1 @@
{"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/head","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"head","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]}]}],"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"type":"text","text":"The first 8 hexadecimal characters of an identifier."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/head"]}],"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"head","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V4headSSvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"head","roleHeading":"Instance Property"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/head":{"type":"topic","title":"head","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"The first 8 hexadecimal characters of an identifier."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/head","url":"\/documentation\/amiiboservice\/amiibo\/head","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"head","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"abstract":[{"text":"An identifier.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/identifier"]}],"sections":[],"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"title":"identifier","symbolKind":"property","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V10identifierSSvp","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/identifier","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"identifier"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibo","kind":"symbol","title":"Amiibo","type":"topic","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/identifier":{"url":"\/documentation\/amiiboservice\/amiibo\/identifier","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"identifier","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/identifier","kind":"symbol","title":"identifier","type":"topic","abstract":[{"text":"An identifier.","type":"text"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/image"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"role":"symbol","title":"image","symbolKind":"property","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V5imageSSvp","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"image"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}]},"sections":[],"abstract":[{"type":"text","text":"An image link."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"image"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/image"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/image":{"type":"topic","title":"image","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"An image link."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/image","url":"\/documentation\/amiiboservice\/amiibo\/image","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"image","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/imageurl"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"metadata":{"title":"imageURL","symbolKind":"property","role":"symbol","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V8imageURL10Foundation0D0VSgvp","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"imageURL","kind":"identifier"},{"text":": ","kind":"text"},{"text":"URL","preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"sections":[],"abstract":[{"type":"text","text":"A URL related to an image link, if any."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"imageURL","kind":"identifier"},{"text":": ","kind":"text"},{"text":"URL","preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier"},{"text":"? { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/imageURL","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/imageURL":{"type":"topic","title":"imageURL","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A URL related to an image link, if any."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/imageURL","url":"\/documentation\/amiiboservice\/amiibo\/imageurl","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"imageURL","kind":"identifier"},{"text":": ","kind":"text"},{"text":"URL","preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier"},{"text":"?","kind":"text"}]}}}
@@ -0,0 +1 @@
{"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/name"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"metadata":{"role":"symbol","symbolKind":"property","title":"name","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V4nameSSvp","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]},"sections":[],"abstract":[{"text":"An amiibo name.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"platforms":["macOS"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/name"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/name":{"kind":"symbol","title":"name","type":"topic","abstract":[{"type":"text","text":"An amiibo name."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/name","url":"\/documentation\/amiiboservice\/amiibo\/name","role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/platform-swift.property"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"role":"symbol","title":"platform","symbolKind":"property","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V8platformAC8PlatformVSgvp","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"platform"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V","text":"Amiibo"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV","text":"Platform"},{"kind":"text","text":"?"}]},"sections":[],"abstract":[{"type":"text","text":"A game platform type, if any."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"platform"},{"kind":"text","text":": "},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V","text":"Amiibo"},{"kind":"text","text":"."},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Platform-swift.struct","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV","text":"Platform"},{"kind":"text","text":"?"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/platform-swift.property"},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Platform-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Platform-swift.struct","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Platform","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Platform","kind":"identifier"}],"title":"Amiibo.Platform","abstract":[{"type":"text","text":"A model that represents a collection of "},{"type":"codeVoice","code":"WiiU"},{"type":"text","text":", "},{"type":"codeVoice","code":"3DS"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Switch"},{"text":" games related to an amiibo item.","type":"text"}],"url":"\/documentation\/amiiboservice\/amiibo\/platform-swift.struct","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/platform-swift.property":{"type":"topic","title":"platform","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A game platform type, if any."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/platform-swift.property","url":"\/documentation\/amiiboservice\/amiibo\/platform-swift.property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"platform","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Platform","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV","kind":"typeIdentifier"},{"text":"?","kind":"text"}]}}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/release-swift.property"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"release"},{"kind":"text","text":": "},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V","text":"Amiibo"},{"kind":"text","text":"."},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","text":"Release"}],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"text":"A release date.","type":"text"}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.property"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"externalID":"s:13AmiiboService0A0V7releaseAC7ReleaseVvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"release","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V","text":"Amiibo"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","text":"Release"}],"modules":[{"name":"AmiiboService"}],"title":"release","role":"symbol"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","kind":"symbol","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"type":"topic","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","navigatorTitle":[{"text":"Release","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/release-swift.property":{"type":"topic","title":"release","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A release date."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/release-swift.property","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"release","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Release","preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","kind":"typeIdentifier"}]}}}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/america"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"america","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:10Foundation4DateV","text":"Date","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"platforms":["macOS"]}]}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"abstract":[{"text":"A release date for North America, if any.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/america"]}],"metadata":{"externalID":"s:13AmiiboService0A0V7ReleaseV7america10Foundation4DateVSgvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"america","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"modules":[{"name":"AmiiboService"}],"role":"symbol","title":"america"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/america":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/america","kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/america","abstract":[{"type":"text","text":"A release date for North America, if any."}],"type":"topic","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"america","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"title":"america","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","kind":"symbol","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"type":"topic","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","navigatorTitle":[{"text":"Release","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","role":"symbol"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"australia"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V7ReleaseV9australia10Foundation4DateVSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"australia","roleHeading":"Instance Property"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/australia"]}],"sections":[],"kind":"symbol","abstract":[{"text":"A release date for Australia, if any.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"australia"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/australia","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/australia":{"url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/australia","type":"topic","abstract":[{"text":"A release date for Australia, if any.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/australia","title":"australia","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"australia","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:10Foundation4DateV","text":"Date","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","kind":"symbol","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"type":"topic","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","navigatorTitle":[{"text":"Release","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","role":"symbol"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"europe"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V7ReleaseV6europe10Foundation4DateVSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"europe","roleHeading":"Instance Property"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/europe"]}],"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"A release date for Europe, if any."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"europe"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/europe"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","kind":"symbol","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"type":"topic","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","navigatorTitle":[{"text":"Release","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/europe":{"url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/europe","type":"topic","abstract":[{"type":"text","text":"A release date for Europe, if any."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/europe","title":"europe","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"europe","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}]}}}
@@ -0,0 +1 @@
{"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/japan"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"sections":[],"metadata":{"role":"symbol","title":"japan","symbolKind":"property","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V7ReleaseV5japan10Foundation4DateVSgvp","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"japan"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}]},"abstract":[{"type":"text","text":"A release date for Japan, if any."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"japan"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/japan"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/japan":{"title":"japan","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A release date for Japan, if any."}],"url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/japan","type":"topic","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"japan","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:10Foundation4DateV","text":"Date","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/japan"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","kind":"symbol","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"type":"topic","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","navigatorTitle":[{"text":"Release","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/series","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"series"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}]}],"kind":"declarations"}],"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"text":"An amiibo series.","type":"text"}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/series"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"externalID":"s:13AmiiboService0A0V6seriesSSvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"modules":[{"name":"AmiiboService"}],"title":"series","role":"symbol"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/series":{"type":"topic","title":"series","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"An amiibo series."}],"url":"\/documentation\/amiiboservice\/amiibo\/series","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/series","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]}}}
@@ -0,0 +1 @@
{"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"title":"tail","symbolKind":"property","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V4tailSSvp","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"tail","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/tail"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","abstract":[{"text":"The last 8 hexadecimal characters of an identifier.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"tail"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/tail"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/tail":{"type":"topic","title":"tail","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"The last 8 hexadecimal characters of an identifier."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/tail","url":"\/documentation\/amiiboservice\/amiibo\/tail","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"tail","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V4typeSSvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"type","roleHeading":"Instance Property"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/type"]}],"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"An amiibo type."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/type"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/type":{"type":"topic","title":"type","role":"symbol","kind":"symbol","abstract":[{"text":"An amiibo type.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/type","url":"\/documentation\/amiiboservice\/amiibo\/type","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"type","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/explanation"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"]]},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/usage\/explanation"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V5UsageV11explanationSSvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"explanation"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"role":"symbol","modules":[{"name":"AmiiboService"}],"title":"explanation"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"explanation","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"An explanation of how to use an amiibo item."}],"sections":[],"kind":"symbol","references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage/explanation":{"kind":"symbol","title":"explanation","type":"topic","abstract":[{"text":"An explanation of how to use an amiibo item.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/explanation","url":"\/documentation\/amiiboservice\/amiibo\/usage\/explanation","role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"explanation","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"type":"topic","title":"Amiibo","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","url":"\/documentation\/amiiboservice\/amiibo","navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Amiibo"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"role":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Usage"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage","kind":"symbol","title":"Amiibo.Usage","type":"topic","navigatorTitle":[{"text":"Usage","kind":"identifier"}],"abstract":[{"text":"A model that represents the usage of an amiibo item within a certain game.","type":"text"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"isWriteable","symbolKind":"property","role":"symbol","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V5UsageV11isWriteableSbvp","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isWriteable"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"isWriteable","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/isWriteable"},"abstract":[{"type":"text","text":"A flag that indicates whether an amiibo item can save game data in it."}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"]]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/usage\/iswriteable"]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Amiibo","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibo","title":"Amiibo","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"role":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Usage"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage","kind":"symbol","title":"Amiibo.Usage","type":"topic","navigatorTitle":[{"text":"Usage","kind":"identifier"}],"abstract":[{"text":"A model that represents the usage of an amiibo item within a certain game.","type":"text"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage/isWriteable":{"abstract":[{"type":"text","text":"A flag that indicates whether an amiibo item can save game data in it."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/isWriteable","type":"topic","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isWriteable","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage\/iswriteable","title":"isWriteable","kind":"symbol"}}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameCharacter","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"?","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"kind":"symbol","metadata":{"title":"gameCharacter","symbolKind":"property","role":"symbol","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A6FilterV13gameCharacterSSSgvp","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/gamecharacter"]}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"A game character to return, if any."}],"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/gameCharacter":{"role":"symbol","kind":"symbol","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameCharacter","abstract":[{"type":"text","text":"A game character to return, if any."}],"title":"gameCharacter","url":"\/documentation\/amiiboservice\/amiibofilter\/gamecharacter","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameSeries"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameSeries","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"text":"A game series to return, if any.","type":"text"}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibofilter\/gameseries"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameSeries"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV10gameSeriesSSSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"gameSeries","roleHeading":"Instance Property"},"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/gameSeries":{"abstract":[{"type":"text","text":"A game series to return, if any."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameSeries","type":"topic","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"gameSeries"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"url":"\/documentation\/amiiboservice\/amiibofilter\/gameseries","title":"gameSeries","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifier","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV10identifierSSSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"identifier","roleHeading":"Instance Property"},"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/identifier"]}],"sections":[],"kind":"symbol","abstract":[{"text":"An amiibo identifier to return, if any.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifier","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":"?","kind":"text"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/identifier"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/identifier":{"role":"symbol","kind":"symbol","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/identifier","abstract":[{"type":"text","text":"An amiibo identifier to return, if any."}],"title":"identifier","url":"\/documentation\/amiiboservice\/amiibofilter\/identifier","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifier","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV4nameSSSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"name","roleHeading":"Instance Property"},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/name"]}],"sections":[],"kind":"symbol","abstract":[{"text":"An amiibo name to return, if any.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/name"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/name":{"url":"\/documentation\/amiiboservice\/amiibofilter\/name","type":"topic","abstract":[{"text":"An amiibo name to return, if any.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/name","title":"name","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}]}}}
@@ -0,0 +1 @@
{"variants":[{"paths":["\/documentation\/amiiboservice\/amiibofilter\/series"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV6seriesSSSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"series","roleHeading":"Instance Property"},"sections":[],"abstract":[{"type":"text","text":"An amiibo series to return, if any."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/series","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/series":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/series","kind":"symbol","abstract":[{"type":"text","text":"An amiibo series to return, if any."}],"type":"topic","url":"\/documentation\/amiiboservice\/amiibofilter\/series","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"title":"series","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showGames"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"},{"kind":"text","text":"?"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV9showGamesSbSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"showGames","roleHeading":"Instance Property"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/showgames"]}],"sections":[],"kind":"symbol","abstract":[{"text":"A flag indicating whether to include games in the response, if any.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showGames"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"},{"kind":"text","text":"?"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/showGames","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/showGames":{"role":"symbol","kind":"symbol","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/showGames","abstract":[{"type":"text","text":"A flag indicating whether to include games in the response, if any."}],"title":"showGames","url":"\/documentation\/amiiboservice\/amiibofilter\/showgames","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"showGames","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"},{"text":"?","kind":"text"}]}}}
@@ -0,0 +1 @@
{"variants":[{"paths":["\/documentation\/amiiboservice\/amiibofilter\/showusage"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"metadata":{"title":"showUsage","symbolKind":"property","role":"symbol","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A6FilterV9showUsageSbSgvp","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"showUsage","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"sections":[],"abstract":[{"type":"text","text":"A flag indicating whether to include amiibo usages in games in the response, if any."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"showUsage","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"},{"kind":"text","text":"?"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/showUsage","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/showUsage":{"url":"\/documentation\/amiiboservice\/amiibofilter\/showusage","type":"topic","abstract":[{"type":"text","text":"A flag indicating whether to include amiibo usages in games in the response, if any."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/showUsage","title":"showUsage","role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showUsage"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"},{"kind":"text","text":"?"}]}}}
@@ -0,0 +1 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/type"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"type","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"abstract":[{"type":"text","text":"An amiibo type to return, if any."}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibofilter\/type"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"externalID":"s:13AmiiboService0A6FilterV4typeSSSgvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"type","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"modules":[{"name":"AmiiboService"}],"role":"symbol","title":"type"},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"type":"text","text":" backend service."}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService","role":"collection"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"abstract":[{"text":"A type that contains values to fine-tune a response when requesting amiibo items.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"AmiiboFilter"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AmiiboFilter","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibofilter","title":"AmiiboFilter","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/type":{"role":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/type","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"?"}],"url":"\/documentation\/amiiboservice\/amiibofilter\/type","kind":"symbol","title":"type","type":"topic","abstract":[{"type":"text","text":"An amiibo type to return, if any."}]}}}
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More