Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8760ff6e12 | |||
| bc0ae63719 | |||
| 3d923982b1 | |||
| 19583290be | |||
| 0af0e3056d | |||
| b39fd8533b | |||
| 410a200661 | |||
| 37c0f3e322 | |||
| 39c6d6e8d6 |
@@ -0,0 +1,10 @@
|
|||||||
|
# --- DOCUMENTATION ---
|
||||||
|
|
||||||
|
DOCC_GITHUB_OUTPUT=./docs
|
||||||
|
DOCC_GITHUB_BASE_PATH=amiibo-service
|
||||||
|
DOCC_PREVIEW_URL=http://localhost:8080/documentation/amiiboservice
|
||||||
|
DOCC_XCODE_OUTPUT=./${SPM_LIBRARY_TARGET}.doccarchive
|
||||||
|
|
||||||
|
# -- SWIFT PACKAGE MANAGER ---
|
||||||
|
|
||||||
|
SPM_LIBRARY_TARGET=AmiiboService
|
||||||
+7
-4
@@ -2,9 +2,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.netrc
|
.netrc
|
||||||
|
|
||||||
# Visual Studio Code
|
|
||||||
.vscode
|
|
||||||
|
|
||||||
# Xcode
|
# Xcode
|
||||||
DerivedData/
|
DerivedData/
|
||||||
|
|
||||||
@@ -31,4 +28,10 @@ Packages/
|
|||||||
# hence it is not needed unless you have added a package configuration file to your project
|
# hence it is not needed unless you have added a package configuration file to your project
|
||||||
.swiftpm
|
.swiftpm
|
||||||
.swiftpm/configuration/registries.json
|
.swiftpm/configuration/registries.json
|
||||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
# DocC documentation
|
||||||
|
*.doccarchive
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version: 1
|
||||||
|
external_links:
|
||||||
|
documentation: "https://rock-n-code.github.io/amiibo-service/documentation/amiiboservice/"
|
||||||
@@ -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.
|
# Licensed under the EUPL 1.2 or later.
|
||||||
#
|
#
|
||||||
# See LICENSE for license information
|
# See LICENSE for license information
|
||||||
@@ -17,30 +17,74 @@ environment ?= .env
|
|||||||
include $(environment)
|
include $(environment)
|
||||||
export $(shell sed 's/=.*//' $(environment))
|
export $(shell sed 's/=.*//' $(environment))
|
||||||
|
|
||||||
# IDE
|
# LIBRARY
|
||||||
|
|
||||||
open-in-xcode: ## Opens this package with Xcode
|
lib-build: ## Builds the library
|
||||||
@open -a Xcode Package.swift
|
@swift build
|
||||||
|
|
||||||
open-in-vscode: ## Opens this package with Visual Studio Code
|
lib-release: ## Releases the library
|
||||||
@code .
|
@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
|
# SWIFT PACKAGE MANAGER
|
||||||
|
|
||||||
package-build: ## Builds the project locally
|
pkg-clean: ## Deletes built SPM artifacts of the package
|
||||||
@swift build
|
|
||||||
|
|
||||||
package-clean: ## Deletes built SPM artifacts from the package
|
|
||||||
@swift package clean
|
@swift package clean
|
||||||
|
|
||||||
package-outdated: ## Lists the SPM package dependencies that can be updated
|
pkg-reset: ## Resets the complete SPM cache/build folder of the package
|
||||||
@swift package update --dry-run
|
|
||||||
|
|
||||||
package-reset: ## Resets the complete SPM cache/build folder from the package
|
|
||||||
@swift package reset
|
@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_GITHUB_OUTPUT)
|
||||||
|
@rm -drf $(DOCC_XCODE_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
|
@swift package update
|
||||||
|
|
||||||
|
# DOCUMENTATION
|
||||||
|
|
||||||
|
doc-generate: doc-generate-xcode doc-generate-github ## Generates the library documentation for both Github and Xcode
|
||||||
|
|
||||||
|
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 \
|
||||||
|
--hosting-base-path $(DOCC_GITHUB_BASE_PATH) \
|
||||||
|
--output-path $(DOCC_GITHUB_OUTPUT)
|
||||||
|
|
||||||
|
doc-generate-xcode: ## Generates the library documentation for Xcode
|
||||||
|
@swift package \
|
||||||
|
--allow-writing-to-directory $(DOCC_XCODE_OUTPUT) \
|
||||||
|
generate-documentation \
|
||||||
|
--target $(SPM_LIBRARY_TARGET) \
|
||||||
|
--output-path $(DOCC_XCODE_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)
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
|
||||||
|
ide-xcode: ## Opens this package with Xcode
|
||||||
|
@open -a Xcode Package.swift
|
||||||
|
|
||||||
|
ide-vscode: ## Opens this package with Visual Studio Code
|
||||||
|
@code .
|
||||||
|
|
||||||
# HELP
|
# HELP
|
||||||
|
|
||||||
|
|||||||
+22
-41
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
import PackageDescription
|
import PackageDescription
|
||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
name: AmiiboAPI.package,
|
name: AmiiboService.package,
|
||||||
platforms: [
|
platforms: [
|
||||||
.iOS(.v13),
|
.iOS(.v13),
|
||||||
.macOS(.v10_15),
|
.macOS(.v10_15),
|
||||||
@@ -25,61 +25,42 @@ let package = Package(
|
|||||||
],
|
],
|
||||||
products: [
|
products: [
|
||||||
.library(
|
.library(
|
||||||
name: AmiiboAPI.package,
|
name: AmiiboService.package,
|
||||||
targets: [
|
targets: [AmiiboService.target]
|
||||||
AmiiboAPI.target
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(
|
.package(url: "https://github.com/apple/swift-openapi-generator.git", from: "1.3.0"),
|
||||||
url: "https://github.com/apple/swift-openapi-generator.git",
|
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.5.0"),
|
||||||
from: "1.3.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"),
|
||||||
.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"
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
.target(
|
.target(
|
||||||
name: AmiiboAPI.target,
|
name: AmiiboService.target,
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.product(
|
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
|
||||||
name: "OpenAPIRuntime",
|
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
|
||||||
package: "swift-openapi-runtime"
|
|
||||||
),
|
|
||||||
.product(
|
|
||||||
name: "OpenAPIURLSession",
|
|
||||||
package: "swift-openapi-urlsession"
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
path: "Sources",
|
path: "Sources/AmiiboService",
|
||||||
plugins: [
|
plugins: [
|
||||||
.plugin(
|
.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator"),
|
||||||
name: "OpenAPIGenerator",
|
|
||||||
package: "swift-openapi-generator"
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
.testTarget(
|
.testTarget(
|
||||||
name: AmiiboAPI.test,
|
name: AmiiboService.test,
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.byName(name: AmiiboAPI.target)
|
.byName(name: AmiiboService.target)
|
||||||
],
|
],
|
||||||
path: "Tests"
|
path: "Tests/AmiiboService"
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
// MARK: - Constants
|
// MARK: - Constants
|
||||||
|
|
||||||
enum AmiiboAPI {
|
enum AmiiboService {
|
||||||
static let package = "amiibo-api"
|
static let package = "amiibo-service"
|
||||||
static let target = "AmiiboAPI"
|
static let target = "AmiiboService"
|
||||||
static let test = "\(AmiiboAPI.target)Tests"
|
static let test = "\(AmiiboService.target)Tests"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,37 @@
|
|||||||
# Amiibo API
|
# Amiibo Service
|
||||||
|
|
||||||
|
[](https://swiftpackageindex.com/rock-n-code/amiibo-service)
|
||||||
|
[](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``
|
||||||
+9
-3
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -14,7 +14,13 @@ import Foundation
|
|||||||
|
|
||||||
extension DateFormatter {
|
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()
|
let formatter = DateFormatter()
|
||||||
|
|
||||||
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS"
|
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)
|
||||||
|
|
||||||
|
}
|
||||||
+9
-3
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -10,15 +10,21 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
|
/// A protocol that defines decodable models containing the `key` and `name` properties.
|
||||||
protocol KeyNameModel: Sendable {
|
protocol KeyNameModel: Sendable {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A key.
|
||||||
var key: String { get }
|
var key: String { get }
|
||||||
|
|
||||||
|
/// A name.
|
||||||
var name: String { get }
|
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)
|
init(_ payload: Components.Schemas.Tuple)
|
||||||
|
|
||||||
}
|
}
|
||||||
+14
-5
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -13,10 +13,19 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import OpenAPIRuntime
|
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
|
// 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
|
// MARK: Functions
|
||||||
|
|
||||||
@@ -0,0 +1,563 @@
|
|||||||
|
//===----------------------------------------------------------------------===
|
||||||
|
//
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A client generated by the `OpenAPIRuntime` library.
|
||||||
|
private let client: Client
|
||||||
|
|
||||||
|
// MARK: Initializers
|
||||||
|
|
||||||
|
/// Initializes this client.
|
||||||
|
public init() {
|
||||||
|
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: URLSessionTransport()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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] {
|
||||||
|
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 let error as ClientError {
|
||||||
|
if error.underlyingError is DecodingError {
|
||||||
|
throw AmiiboServiceError.decoding
|
||||||
|
} else {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
} 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getAmiiboSeries.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getAmiiboSeries(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getAmiiboTypes.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getAmiiboTypes(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getGameCharacters.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getGameCharacters(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getGameSeries.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getGameSeries(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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 {
|
||||||
|
let response: Operations.getLastUpdated.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getLastUpdated()
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .ok(ok):
|
||||||
|
switch ok.body {
|
||||||
|
case let .json(output):
|
||||||
|
return output.lastUpdated
|
||||||
|
}
|
||||||
|
|
||||||
|
case let .undocumented(statusCode, _):
|
||||||
|
throw AmiiboServiceError.undocumented(statusCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#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] {
|
||||||
|
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 let error as ClientError {
|
||||||
|
if error.underlyingError is DecodingError {
|
||||||
|
throw AmiiboServiceError.decoding
|
||||||
|
} else {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
} 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getAmiiboSeries.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getAmiiboSeries(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getAmiiboTypes.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getAmiiboTypes(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getGameCharacters.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getGameCharacters(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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] {
|
||||||
|
let response: Operations.getGameSeries.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getGameSeries(
|
||||||
|
.init(query: .init(
|
||||||
|
key: filter.key,
|
||||||
|
name: filter.name
|
||||||
|
))
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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 {
|
||||||
|
let response: Operations.getLastUpdated.Output
|
||||||
|
|
||||||
|
do {
|
||||||
|
response = try await client.getLastUpdated()
|
||||||
|
} catch {
|
||||||
|
throw AmiiboServiceError.unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .ok(ok):
|
||||||
|
switch ok.body {
|
||||||
|
case let .json(output):
|
||||||
|
return output.lastUpdated
|
||||||
|
}
|
||||||
|
|
||||||
|
case let .undocumented(statusCode, _):
|
||||||
|
throw AmiiboServiceError.undocumented(statusCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Helpers
|
||||||
|
|
||||||
|
private extension AmiiboLiveClient {
|
||||||
|
|
||||||
|
// MARK: Functions
|
||||||
|
|
||||||
|
/// 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 [.init(object)]
|
||||||
|
|
||||||
|
case let .AmiiboList(list):
|
||||||
|
return list
|
||||||
|
.map { .init($0) }
|
||||||
|
.sorted { $0.identifier < $1.identifier }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Retrieves a list of items that conforms to the `KeyNameModel` protocol from a wrapper container.
|
||||||
|
/// - Parameters:
|
||||||
|
/// - wrapper: A wrapper container that either has an object or a list of items.
|
||||||
|
/// - as: a model type that conforms to the `KeyNameModel` protocol.
|
||||||
|
/// - Returns: A list of items that conforms to the `KeyNameModel` protocol, sorted by keys.
|
||||||
|
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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+9
-2
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -10,12 +10,19 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
|
/// A representation of all the possible errors that the ``AmiiboService`` service could throw.
|
||||||
public enum AmiiboServiceError: Error {
|
public enum AmiiboServiceError: Error {
|
||||||
|
/// A bad request has been given to the client.
|
||||||
case badRequest
|
case badRequest
|
||||||
|
/// A response cannot be decoded.
|
||||||
case decoding
|
case decoding
|
||||||
|
/// An online service is not currently available.
|
||||||
case notAvailable
|
case notAvailable
|
||||||
|
/// A response cannot be found.
|
||||||
case notFound
|
case notFound
|
||||||
|
/// An undocumented/unsupported status code error.
|
||||||
case undocumented(_ statusCode: Int)
|
case undocumented(_ statusCode: Int)
|
||||||
|
/// An unknown error.
|
||||||
case unknown
|
case unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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 {
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+28
-4
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -12,23 +12,45 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// A model that represents an amiibo item.
|
||||||
public struct Amiibo: Sendable {
|
public struct Amiibo: Sendable {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A game character.
|
||||||
public let gameCharacter: String
|
public let gameCharacter: String
|
||||||
|
|
||||||
|
/// A game series.
|
||||||
public let gameSeries: String
|
public let gameSeries: String
|
||||||
|
|
||||||
|
/// The first 8 hexadecimal characters of an identifier.
|
||||||
public let head: String
|
public let head: String
|
||||||
|
|
||||||
|
/// An image link.
|
||||||
public let image: String
|
public let image: String
|
||||||
|
|
||||||
|
/// An amiibo name.
|
||||||
public let name: String
|
public let name: String
|
||||||
|
|
||||||
|
/// A game platform type, if any.
|
||||||
public let platform: Platform?
|
public let platform: Platform?
|
||||||
|
|
||||||
|
/// A release date.
|
||||||
public let release: Release
|
public let release: Release
|
||||||
|
|
||||||
|
/// An amiibo series.
|
||||||
public let series: String
|
public let series: String
|
||||||
|
|
||||||
|
/// The last 8 hexadecimal characters of an identifier.
|
||||||
public let tail: String
|
public let tail: String
|
||||||
|
|
||||||
|
/// An amiibo type.
|
||||||
public let type: String
|
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) {
|
init(_ payload: Components.Schemas.Amiibo) {
|
||||||
self.gameCharacter = payload.character
|
self.gameCharacter = payload.character
|
||||||
self.gameSeries = payload.gameSeries
|
self.gameSeries = payload.gameSeries
|
||||||
@@ -48,10 +70,12 @@ public struct Amiibo: Sendable {
|
|||||||
|
|
||||||
// MARK: Computed
|
// MARK: Computed
|
||||||
|
|
||||||
|
/// An identifier.
|
||||||
public var identifier: String {
|
public var identifier: String {
|
||||||
head + tail
|
head + tail
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A URL related to an image link, if any.
|
||||||
public var imageURL: URL? {
|
public var imageURL: URL? {
|
||||||
.init(string: image)
|
.init(string: image)
|
||||||
}
|
}
|
||||||
+12
-4
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -11,16 +11,24 @@
|
|||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
extension Amiibo {
|
extension Amiibo {
|
||||||
|
/// A model that represents a game related to an amiibo item.
|
||||||
public struct Game: Sendable {
|
public struct Game: Sendable {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A list of identifiers.
|
||||||
public let identifiers: [String]
|
public let identifiers: [String]
|
||||||
|
|
||||||
|
/// A name.
|
||||||
public let name: String
|
public let name: String
|
||||||
|
|
||||||
|
/// A list of amiibo usages, if any.
|
||||||
public let usages: [Usage]?
|
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) {
|
init(_ payload: Components.Schemas.AmiiboGame) {
|
||||||
self.identifiers = payload.gameID
|
self.identifiers = payload.gameID
|
||||||
self.name = payload.gameName
|
self.name = payload.gameName
|
||||||
+16
-2
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -11,16 +11,30 @@
|
|||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
extension Amiibo {
|
extension Amiibo {
|
||||||
|
/// A model that represents a collection of `WiiU`, `3DS`, and `Switch` games related to an amiibo item.
|
||||||
public struct Platform: Sendable {
|
public struct Platform: Sendable {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A list of `Switch` games related to an amiibo item.
|
||||||
public let `switch`: [Game]
|
public let `switch`: [Game]
|
||||||
|
|
||||||
|
/// A list of `3DS` games related to an amiibo item.
|
||||||
public let threeDS: [Game]
|
public let threeDS: [Game]
|
||||||
|
|
||||||
|
/// A list of `WiiU` games related to an amiibo item.
|
||||||
public let wiiU: [Game]
|
public let wiiU: [Game]
|
||||||
|
|
||||||
// MARK: Initialisers
|
// 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?(
|
init?(
|
||||||
_ `switch`: [Components.Schemas.AmiiboGame]?,
|
_ `switch`: [Components.Schemas.AmiiboGame]?,
|
||||||
_ threeDS: [Components.Schemas.AmiiboGame]?,
|
_ threeDS: [Components.Schemas.AmiiboGame]?,
|
||||||
+14
-4
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -13,17 +13,27 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
extension Amiibo {
|
extension Amiibo {
|
||||||
|
/// A model that represents a collection of release dates related to an amiibo item.
|
||||||
public struct Release: Sendable {
|
public struct Release: Sendable {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A release date for North America, if any.
|
||||||
public let america: Date?
|
public let america: Date?
|
||||||
|
|
||||||
|
/// A release date for Australia, if any.
|
||||||
public let australia: Date?
|
public let australia: Date?
|
||||||
|
|
||||||
|
/// A release date for Europe, if any.
|
||||||
public let europe: Date?
|
public let europe: Date?
|
||||||
|
|
||||||
|
/// A release date for Japan, if any.
|
||||||
public let japan: Date?
|
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) {
|
init(_ payload: Components.Schemas.AmiiboRelease) {
|
||||||
self.america = payload.na
|
self.america = payload.na
|
||||||
self.australia = payload.au
|
self.australia = payload.au
|
||||||
+10
-4
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -11,15 +11,21 @@
|
|||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
extension Amiibo {
|
extension Amiibo {
|
||||||
|
/// A model that represents the usage of an amiibo item within a certain game.
|
||||||
public struct Usage: Sendable {
|
public struct Usage: Sendable {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// An explanation of how to use an amiibo item.
|
||||||
public let explanation: String
|
public let explanation: String
|
||||||
|
|
||||||
|
/// A flag that indicates whether an amiibo item can save game data in it.
|
||||||
public let isWriteable: Bool
|
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) {
|
init(_ payload: Components.Schemas.AmiiboUsage) {
|
||||||
self.explanation = payload.Usage
|
self.explanation = payload.Usage
|
||||||
self.isWriteable = payload.write
|
self.isWriteable = payload.write
|
||||||
+10
-4
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -10,14 +10,20 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
|
/// A model that represents an amiibo series.
|
||||||
public struct AmiiboSeries: KeyNameModel {
|
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
|
public let key: String
|
||||||
|
|
||||||
|
/// A name.
|
||||||
public let name: String
|
public let name: String
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initializers
|
||||||
|
|
||||||
init(_ payload: Components.Schemas.Tuple) {
|
init(_ payload: Components.Schemas.Tuple) {
|
||||||
self.key = payload.key
|
self.key = payload.key
|
||||||
+11
-5
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -10,14 +10,20 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
|
/// A model that represents an amiibo type.
|
||||||
public struct AmiiboType: KeyNameModel {
|
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
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A key.
|
||||||
public let key: String
|
public let key: String
|
||||||
|
|
||||||
|
/// A name.
|
||||||
public let name: String
|
public let name: String
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initializers
|
||||||
|
|
||||||
init(_ payload: Components.Schemas.Tuple) {
|
init(_ payload: Components.Schemas.Tuple) {
|
||||||
self.key = payload.key
|
self.key = payload.key
|
||||||
+11
-5
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -10,14 +10,20 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
|
/// A model that represents a game character.
|
||||||
public struct GameCharacter: KeyNameModel {
|
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
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A key.
|
||||||
public let key: String
|
public let key: String
|
||||||
|
|
||||||
|
/// A name.
|
||||||
public let name: String
|
public let name: String
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initializers
|
||||||
|
|
||||||
init(_ payload: Components.Schemas.Tuple) {
|
init(_ payload: Components.Schemas.Tuple) {
|
||||||
self.key = payload.key
|
self.key = payload.key
|
||||||
+11
-5
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -10,14 +10,20 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
|
/// A model that represents a game series.
|
||||||
public struct GameSeries: KeyNameModel {
|
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
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// A key.
|
||||||
public let key: String
|
public let key: String
|
||||||
|
|
||||||
|
/// A name.
|
||||||
public let name: String
|
public let name: String
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initializers
|
||||||
|
|
||||||
init(_ payload: Components.Schemas.Tuple) {
|
init(_ payload: Components.Schemas.Tuple) {
|
||||||
self.key = payload.key
|
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
|
||||||
|
|
||||||
|
}
|
||||||
+3
-2
@@ -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.
|
# Licensed under the EUPL 1.2 or later.
|
||||||
#
|
#
|
||||||
# See LICENSE for license information
|
# See LICENSE for license information
|
||||||
@@ -13,4 +13,5 @@
|
|||||||
generate:
|
generate:
|
||||||
- types
|
- types
|
||||||
- client
|
- client
|
||||||
|
namingStrategy: defensive
|
||||||
accessModifier: internal
|
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.
|
# Licensed under the EUPL 1.2 or later.
|
||||||
#
|
#
|
||||||
# See LICENSE for license information
|
# 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,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()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+1140
-34
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+7
-11
@@ -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.
|
// Licensed under the EUPL 1.2 or later.
|
||||||
//
|
//
|
||||||
// See LICENSE for license information
|
// See LICENSE for license information
|
||||||
@@ -10,17 +10,13 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
|
|
||||||
protocol KeyNameFilter {
|
import Testing
|
||||||
|
|
||||||
|
extension Tag {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
var key: String? { get }
|
/// Tag that indicates tests against a live backend service.
|
||||||
var name: String? { get }
|
@Tag static var live: Self
|
||||||
|
|
||||||
// MARK: Initialisers
|
|
||||||
|
|
||||||
init()
|
|
||||||
init(key: String)
|
|
||||||
init(name: String)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
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":{"externalID":"s:13AmiiboService0A0V4GameV11identifiersSaySSGvp","modules":[{"name":"AmiiboService"}],"role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifiers"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"roleHeading":"Instance Property","title":"identifiers","symbolKind":"property"},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/identifiers"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/identifiers","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"A list of identifiers.","type":"text"}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifiers"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"platforms":["macOS"]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Game"}],"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/game","abstract":[{"text":"A model that represents a game related to an amiibo item.","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Game"}],"title":"Amiibo.Game","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","type":"topic"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/identifiers":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/game\/identifiers","type":"topic","abstract":[{"type":"text","text":"A list of identifiers."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/identifiers","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifiers"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"kind":"symbol","title":"identifiers"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"kind":"symbol","metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V4GameV4nameSSvp","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"role":"symbol","roleHeading":"Instance Property","title":"name"},"sections":[],"abstract":[{"type":"text","text":"A name."}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/name"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/name","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/name":{"url":"\/documentation\/amiiboservice\/amiibo\/game\/name","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"kind":"symbol","type":"topic","role":"symbol","title":"name","abstract":[{"type":"text","text":"A name."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/name"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Game"}],"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/game","abstract":[{"text":"A model that represents a game related to an amiibo item.","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Game"}],"title":"Amiibo.Game","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","type":"topic"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"usages"},{"kind":"text","text":": ["},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","kind":"typeIdentifier","text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V"},{"kind":"text","text":"."},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","kind":"typeIdentifier","text":"Usage","preciseIdentifier":"s:13AmiiboService0A0V5UsageV"},{"kind":"text","text":"]?"}],"platforms":["macOS"]}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"kind":"symbol","metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V4GameV6usagesSayAC5UsageVGSgvp","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"usages"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Usage","preciseIdentifier":"s:13AmiiboService0A0V5UsageV"},{"kind":"text","text":"]?"}],"role":"symbol","title":"usages","roleHeading":"Instance Property"},"sections":[],"abstract":[{"text":"A list of amiibo usages, if any.","type":"text"}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/usages"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/usages","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/usages":{"role":"symbol","type":"topic","abstract":[{"text":"A list of amiibo usages, if any.","type":"text"}],"url":"\/documentation\/amiiboservice\/amiibo\/game\/usages","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/usages","title":"usages","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"},{"kind":"text","text":"]?"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Game"}],"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/game","abstract":[{"text":"A model that represents a game related to an amiibo item.","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Game"}],"title":"Amiibo.Game","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","type":"topic"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"url":"\/documentation\/amiiboservice\/amiibo\/usage","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Usage"}],"kind":"symbol","type":"topic","role":"symbol","navigatorTitle":[{"text":"Usage","kind":"identifier"}],"title":"Amiibo.Usage","abstract":[{"text":"A model that represents the usage of an amiibo item within a certain game.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameCharacter"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"roleHeading":"Instance Property","role":"symbol","externalID":"s:13AmiiboService0A0V13gameCharacterSSvp","title":"gameCharacter"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/gamecharacter"]}],"kind":"symbol","identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameCharacter","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameCharacter"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"platforms":["macOS"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"text":"A game character.","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/gameCharacter":{"type":"topic","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameCharacter","url":"\/documentation\/amiiboservice\/amiibo\/gamecharacter","abstract":[{"type":"text","text":"A game character."}],"role":"symbol","title":"gameCharacter"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameSeries","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"symbolKind":"property","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V10gameSeriesSSvp","title":"gameSeries","fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"gameSeries"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}]},"sections":[],"abstract":[{"text":"A game series.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/gameseries"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameSeries"},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/gameSeries":{"type":"topic","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameSeries","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameSeries","url":"\/documentation\/amiiboservice\/amiibo\/gameseries","abstract":[{"text":"A game series.","type":"text"}],"role":"symbol","title":"gameSeries"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"head"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"role":"symbol","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V4headSSvp","title":"head"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/head"]}],"sections":[],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/head","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"The first 8 hexadecimal characters of an identifier."}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"head"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"platforms":["macOS"],"languages":["swift"]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/head":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/head","type":"topic","abstract":[{"type":"text","text":"The first 8 hexadecimal characters of an identifier."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/head","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"head"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"kind":"symbol","title":"head"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"kind":"symbol","metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V10identifierSSvp","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"role":"symbol","roleHeading":"Instance Property","title":"identifier"},"sections":[],"abstract":[{"text":"An identifier.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/identifier"]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/identifier","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/identifier":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"An identifier."}],"url":"\/documentation\/amiiboservice\/amiibo\/identifier","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/identifier","title":"identifier","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifier","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"image"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"languages":["swift"]}]}],"abstract":[{"type":"text","text":"An image link."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","metadata":{"externalID":"s:13AmiiboService0A0V5imageSSvp","role":"symbol","modules":[{"name":"AmiiboService"}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"image"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"roleHeading":"Instance Property","title":"image","symbolKind":"property"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/image"},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/image"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/image":{"url":"\/documentation\/amiiboservice\/amiibo\/image","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"image"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"kind":"symbol","type":"topic","role":"symbol","title":"image","abstract":[{"text":"An image link.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/image"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"imageURL"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"URL","preciseIdentifier":"s:10Foundation3URLV"},{"text":"? { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}],"kind":"declarations"}],"abstract":[{"text":"A URL related to an image link, if any.","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"symbolKind":"property","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V8imageURL10Foundation0D0VSgvp","title":"imageURL","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"imageURL","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:10Foundation3URLV","text":"URL","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/imageURL"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/imageurl"]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/imageURL":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"A URL related to an image link, if any."}],"kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/imageurl","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/imageURL","title":"imageURL","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"imageURL","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation3URLV","text":"URL","kind":"typeIdentifier"},{"kind":"text","text":"?"}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"kind":"symbol","metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V4nameSSvp","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"role":"symbol","title":"name","roleHeading":"Instance Property"},"sections":[],"abstract":[{"type":"text","text":"An amiibo name."}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/name"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/name","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/name":{"type":"topic","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/name","kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/name","abstract":[{"type":"text","text":"An amiibo name."}],"role":"symbol","title":"name"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"kind":"symbol","identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/platform-swift.property","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"platform"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","preciseIdentifier":"s:13AmiiboService0A0V","text":"Amiibo","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Platform-swift.struct","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV","text":"Platform"},{"text":"?","kind":"text"}]}],"kind":"declarations"}],"metadata":{"roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V8platformAC8PlatformVSgvp","title":"platform","modules":[{"name":"AmiiboService"}],"role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"platform"},{"kind":"text","text":": "},{"preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier","text":"Amiibo"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV","text":"Platform"},{"text":"?","kind":"text"}],"symbolKind":"property"},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/platform-swift.property"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"abstract":[{"text":"A game platform type, if any.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Amiibo","kind":"identifier"}]},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/platform-swift.property":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/platform-swift.property","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/platform-swift.property","abstract":[{"type":"text","text":"A game platform type, if any."}],"type":"topic","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"platform"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Platform","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV"},{"kind":"text","text":"?"}],"kind":"symbol","title":"platform"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Platform-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Platform-swift.struct","url":"\/documentation\/amiiboservice\/amiibo\/platform-swift.struct","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Platform"}],"abstract":[{"type":"text","text":"A model that represents a collection of "},{"code":"WiiU","type":"codeVoice"},{"type":"text","text":", "},{"type":"codeVoice","code":"3DS"},{"text":", and ","type":"text"},{"code":"Switch","type":"codeVoice"},{"text":" games related to an amiibo item.","type":"text"}],"kind":"symbol","title":"Amiibo.Platform","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Platform"}]}}}
|
||||||
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 @@
|
|||||||
|
{"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","preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier","text":"Amiibo"},{"kind":"text","text":"."},{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","kind":"typeIdentifier","text":"Release"}],"platforms":["macOS"]}],"kind":"declarations"}],"abstract":[{"text":"A release date.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"roleHeading":"Instance Property","symbolKind":"property","externalID":"s:13AmiiboService0A0V7releaseAC7ReleaseVvp","title":"release","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"release"},{"kind":"text","text":": "},{"preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier","text":"Amiibo"},{"kind":"text","text":"."},{"preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","kind":"typeIdentifier","text":"Release"}]},"sections":[],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/release-swift.property","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.property"]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"kind":"symbol","navigatorTitle":[{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Release"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","type":"topic","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/release-swift.property":{"role":"symbol","type":"topic","abstract":[{"text":"A release date.","type":"text"}],"url":"\/documentation\/amiiboservice\/amiibo\/release-swift.property","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/release-swift.property","title":"release","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"release"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier","text":"Amiibo"},{"text":".","kind":"text"},{"preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","kind":"typeIdentifier","text":"Release"}]}}}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"america","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"A release date for North America, if any."}],"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"]]},"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"symbolKind":"property","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V7ReleaseV7america10Foundation4DateVSgvp","title":"america","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"}]},"sections":[],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/america","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/america"]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"kind":"symbol","navigatorTitle":[{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Release"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","type":"topic","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/america":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/america","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/america","type":"topic","abstract":[{"type":"text","text":"A release date for North America, if any."}],"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"america","kind":"identifier"},{"kind":"text","text":": "},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"kind":"symbol","title":"america"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"australia"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Date","preciseIdentifier":"s:10Foundation4DateV"},{"kind":"text","text":"?"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V7ReleaseV9australia10Foundation4DateVSgvp","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"australia","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"role":"symbol","title":"australia","roleHeading":"Instance Property"},"sections":[],"abstract":[{"type":"text","text":"A release date for Australia, if any."}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/australia"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/australia","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"kind":"symbol","navigatorTitle":[{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Release"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","type":"topic","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/australia":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/australia","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/australia","type":"topic","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"australia","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"abstract":[{"type":"text","text":"A release date for Australia, if any."}],"kind":"symbol","title":"australia","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"symbolKind":"property","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V7ReleaseV6europe10Foundation4DateVSgvp","title":"europe","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":"?"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/europe"]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/europe","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"A release date for Europe, if any.","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"europe"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Date","preciseIdentifier":"s:10Foundation4DateV"},{"kind":"text","text":"?"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"kind":"symbol","navigatorTitle":[{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Release"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","type":"topic","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/europe":{"type":"topic","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"europe"},{"kind":"text","text":": "},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"kind":"text","text":"?"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/europe","kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/europe","abstract":[{"text":"A release date for Europe, if any.","type":"text"}],"role":"symbol","title":"europe"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A0V7ReleaseV5japan10Foundation4DateVSgvp","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"japan"},{"text":": ","kind":"text"},{"text":"Date","preciseIdentifier":"s:10Foundation4DateV","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"role":"symbol","roleHeading":"Instance Property","title":"japan"},"schemaVersion":{"minor":3,"major":0,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"japan","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/japan"]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/japan","interfaceLanguage":"swift"},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"abstract":[{"type":"text","text":"A release date for Japan, if any."}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"role":"collection","type":"topic","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"text":" backend service.","type":"text"}],"kind":"symbol","url":"\/documentation\/amiiboservice","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"kind":"symbol","navigatorTitle":[{"text":"Release","kind":"identifier"}],"title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct","abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Release"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","type":"topic","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/japan":{"type":"topic","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"japan","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/japan","kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/japan","abstract":[{"type":"text","text":"A release date for Japan, if any."}],"role":"symbol","title":"japan"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"role":"symbol","externalID":"s:13AmiiboService0A0V6seriesSSvp","roleHeading":"Instance Property","title":"series"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/series"]}],"kind":"symbol","identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/series","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"type":"text","text":"An amiibo series."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/series":{"type":"topic","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"series","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/series","kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/series","abstract":[{"type":"text","text":"An amiibo series."}],"role":"symbol","title":"series"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/tail"]}],"sections":[],"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"symbolKind":"property","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V4tailSSvp","title":"tail","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"tail"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}]},"abstract":[{"text":"The last 8 hexadecimal characters of an identifier.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"tail"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/tail","interfaceLanguage":"swift"},"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/tail":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/tail","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/tail","type":"topic","abstract":[{"text":"The last 8 hexadecimal characters of an identifier.","type":"text"}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"tail"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"title":"tail","kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Amiibo","kind":"identifier"}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/type"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"roleHeading":"Instance Property","symbolKind":"property","externalID":"s:13AmiiboService0A0V4typeSSvp","title":"type","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"type","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}]},"kind":"symbol","abstract":[{"type":"text","text":"An amiibo type."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"languages":["swift"],"platforms":["macOS"]}]}],"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":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"text":"A library that provides everything the developer needs to interacts with the ","type":"text"},{"inlineContent":[{"type":"text","text":"Amiibo API"}],"type":"strong"},{"text":" backend service.","type":"text"}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/type":{"kind":"symbol","title":"type","abstract":[{"text":"An amiibo type.","type":"text"}],"url":"\/documentation\/amiiboservice\/amiibo\/type","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"type","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/type","type":"topic","role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Amiibo","kind":"identifier"}]}}}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V5UsageV11explanationSSvp","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"explanation"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"roleHeading":"Instance Property","title":"explanation","symbolKind":"property"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/usage\/explanation"]}],"sections":[],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/explanation","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"An explanation of how to use an amiibo item."}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"explanation"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"url":"\/documentation\/amiiboservice\/amiibo\/usage","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Usage"}],"kind":"symbol","type":"topic","role":"symbol","navigatorTitle":[{"text":"Usage","kind":"identifier"}],"title":"Amiibo.Usage","abstract":[{"text":"A model that represents the usage of an amiibo item within a certain game.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage/explanation":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/usage\/explanation","type":"topic","abstract":[{"type":"text","text":"An explanation of how to use an amiibo item."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/explanation","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"explanation"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"kind":"symbol","title":"explanation"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"externalID":"s:13AmiiboService0A0V5UsageV11isWriteableSbvp","modules":[{"name":"AmiiboService"}],"role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"isWriteable"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"roleHeading":"Instance Property","title":"isWriteable","symbolKind":"property"},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/usage\/iswriteable"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/isWriteable","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"A flag that indicates whether an amiibo item can save game data in it.","type":"text"}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"isWriteable"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"platforms":["macOS"]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"url":"\/documentation\/amiiboservice\/amiibo\/usage","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Usage"}],"kind":"symbol","type":"topic","role":"symbol","navigatorTitle":[{"text":"Usage","kind":"identifier"}],"title":"Amiibo.Usage","abstract":[{"text":"A model that represents the usage of an amiibo item within a certain game.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage/isWriteable":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/usage\/iswriteable","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/isWriteable","abstract":[{"text":"A flag that indicates whether an amiibo item can save game data in it.","type":"text"}],"type":"topic","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"isWriteable"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"kind":"symbol","title":"isWriteable"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"kind":"symbol","role":"symbol","title":"Amiibo","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","navigatorTitle":[{"kind":"identifier","text":"Amiibo"}],"abstract":[{"type":"text","text":"A model that represents an amiibo item."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Amiibo"}],"url":"\/documentation\/amiiboservice\/amiibo"}}}
|
||||||
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":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV13gameCharacterSSSgvp","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"}],"role":"symbol","title":"gameCharacter","roleHeading":"Instance Property"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/gamecharacter"]}],"kind":"symbol","identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameCharacter","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"gameCharacter","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"abstract":[{"text":"A game character to return, if any.","type":"text"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/gameCharacter":{"url":"\/documentation\/amiiboservice\/amiibofilter\/gamecharacter","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameCharacter"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"?"}],"kind":"symbol","type":"topic","role":"symbol","abstract":[{"text":"A game character to return, if any.","type":"text"}],"title":"gameCharacter","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameCharacter"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameSeries","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"role":"symbol","roleHeading":"Instance Property","externalID":"s:13AmiiboService0A6FilterV10gameSeriesSSSgvp","title":"gameSeries"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/gameseries"]}],"kind":"symbol","identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameSeries","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameSeries","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"abstract":[{"type":"text","text":"A game series to return, if any."}],"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/gameSeries":{"type":"topic","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameSeries"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/gameSeries","url":"\/documentation\/amiiboservice\/amiibofilter\/gameseries","abstract":[{"type":"text","text":"A game series to return, if any."}],"role":"symbol","title":"gameSeries"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"An amiibo identifier to return, if any."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"metadata":{"role":"symbol","modules":[{"name":"AmiiboService"}],"roleHeading":"Instance Property","symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV10identifierSSSgvp","title":"identifier","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?"}]},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/identifier","interfaceLanguage":"swift"},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/identifier"]}],"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/identifier":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"An amiibo identifier to return, if any."}],"url":"\/documentation\/amiiboservice\/amiibofilter\/identifier","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/identifier","title":"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"}]}}}
|
||||||
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV4nameSSSgvp","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"}],"role":"symbol","title":"name","roleHeading":"Instance Property"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/name"]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/name","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"An amiibo name to return, if any."}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"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"},{"kind":"text","text":"?"}],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/name":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibofilter\/name","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/name","type":"topic","abstract":[{"type":"text","text":"An amiibo name to return, if any."}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?"}],"kind":"symbol","title":"name"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV6seriesSSSgvp","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"series"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?"}],"role":"symbol","roleHeading":"Instance Property","title":"series"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/series"]}],"sections":[],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/series","interfaceLanguage":"swift"},"abstract":[{"text":"An amiibo series to return, if any.","type":"text"}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"series"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"?"}]}],"kind":"declarations"}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/series":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibofilter\/series","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/series","type":"topic","abstract":[{"type":"text","text":"An amiibo series to return, if any."}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"series"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?"}],"kind":"symbol","title":"series"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"externalID":"s:13AmiiboService0A6FilterV9showGamesSbSgvp","modules":[{"name":"AmiiboService"}],"role":"symbol","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showGames"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"},{"kind":"text","text":"?"}],"roleHeading":"Instance Property","title":"showGames","symbolKind":"property"},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibofilter\/showgames"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/showGames","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A flag indicating whether to include games in the response, if any."}],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showGames"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"},{"kind":"text","text":"?"}],"platforms":["macOS"]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/showGames":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibofilter\/showgames","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/showGames","type":"topic","abstract":[{"type":"text","text":"A flag indicating whether to include games in the response, if any."}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showGames"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"},{"kind":"text","text":"?"}],"kind":"symbol","title":"showGames"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"property","externalID":"s:13AmiiboService0A6FilterV9showUsageSbSgvp","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showUsage"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"},{"kind":"text","text":"?"}],"role":"symbol","title":"showUsage","roleHeading":"Instance Property"},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibofilter\/showusage"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/showUsage","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showUsage"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"},{"kind":"text","text":"?"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"abstract":[{"type":"text","text":"A flag indicating whether to include amiibo usages in games in the response, if any."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"references":{"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/showUsage":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibofilter\/showusage","identifier":"doc:\/\/AmiiboService\/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."}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"showUsage"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"},{"kind":"text","text":"?"}],"kind":"symbol","title":"showUsage"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"metadata":{"externalID":"s:13AmiiboService0A6FilterV4typeSSSgvp","role":"symbol","modules":[{"name":"AmiiboService"}],"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"}],"roleHeading":"Instance Property","title":"type","symbolKind":"property"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibofilter\/type"]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/type","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"An amiibo type to return, if any.","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"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"]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboFilter"}],"navigatorTitle":[{"text":"AmiiboFilter","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter","url":"\/documentation\/amiiboservice\/amiibofilter","abstract":[{"type":"text","text":"A type that contains values to fine-tune a response when requesting amiibo items."}],"role":"symbol","title":"AmiiboFilter"},"doc://AmiiboService/documentation/AmiiboService/AmiiboFilter/type":{"role":"symbol","url":"\/documentation\/amiiboservice\/amiibofilter\/type","type":"topic","abstract":[{"text":"An amiibo type to return, if any.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboFilter\/type","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"?"}],"kind":"symbol","title":"type"}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"seeAlsoSections":[{"anchor":"Clients","generated":true,"identifiers":["doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboClient"],"title":"Clients"}],"metadata":{"modules":[{"name":"AmiiboService"}],"symbolKind":"struct","externalID":"s:13AmiiboService0A10LiveClientV","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"AmiiboLiveClient","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"AmiiboLiveClient","kind":"identifier"}],"title":"AmiiboLiveClient","roleHeading":"Structure"},"variants":[{"paths":["\/documentation\/amiiboservice\/amiiboliveclient"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboLiveClient","interfaceLanguage":"swift"},"kind":"symbol","relationshipsSections":[{"kind":"relationships","title":"Conforms To","identifiers":["doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboClient","doc:\/\/AmiiboService\/s8CopyableP"],"type":"conformsTo"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"AmiiboLiveClient","kind":"identifier"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService"]]},"abstract":[{"text":"A type that implements a live client to the online service.","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"topicSections":[{"title":"Initializers","generated":true,"anchor":"Initializers","identifiers":["doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboLiveClient\/init()"]},{"title":"Default Implementations","generated":true,"anchor":"Default-Implementations","identifiers":["doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboLiveClient\/AmiiboClient-Implementations"]}],"sections":[],"references":{"doc://AmiiboService/s8CopyableP":{"title":"Swift.Copyable","type":"unresolvable","identifier":"doc:\/\/AmiiboService\/s8CopyableP"},"doc://AmiiboService/documentation/AmiiboService/AmiiboLiveClient":{"role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AmiiboLiveClient"}],"abstract":[{"type":"text","text":"A type that implements a live client to the online service."}],"url":"\/documentation\/amiiboservice\/amiiboliveclient","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboLiveClient","title":"AmiiboLiveClient","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"AmiiboLiveClient","kind":"identifier"}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboLiveClient/AmiiboClient-Implementations":{"type":"topic","kind":"article","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboLiveClient\/AmiiboClient-Implementations","url":"\/documentation\/amiiboservice\/amiiboliveclient\/amiiboclient-implementations","abstract":[],"role":"collectionGroup","title":"AmiiboClient Implementations"},"doc://AmiiboService/documentation/AmiiboService/AmiiboClient":{"kind":"symbol","role":"symbol","title":"AmiiboClient","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboClient","navigatorTitle":[{"text":"AmiiboClient","kind":"identifier"}],"abstract":[{"type":"text","text":"A protocol that defines API clients containing all available endpoints to interact with."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AmiiboClient"}],"url":"\/documentation\/amiiboservice\/amiiboclient"},"doc://AmiiboService/documentation/AmiiboService":{"url":"\/documentation\/amiiboservice","type":"topic","title":"AmiiboService","role":"collection","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","kind":"symbol","abstract":[{"type":"text","text":"A library that provides everything the developer needs to interacts with the "},{"type":"strong","inlineContent":[{"text":"Amiibo API","type":"text"}]},{"type":"text","text":" backend service."}]},"doc://AmiiboService/documentation/AmiiboService/AmiiboLiveClient/init()":{"url":"\/documentation\/amiiboservice\/amiiboliveclient\/init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"kind":"symbol","type":"topic","role":"symbol","title":"init()","abstract":[{"text":"Initializes this client.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/AmiiboLiveClient\/init()"}}}
|
||||||
+1
File diff suppressed because one or more lines are too long
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
Reference in New Issue
Block a user