13 Commits

Author SHA1 Message Date
javier 34627840db Some fixes to the latest updates (#18)
This PR contains the work done to:
* update the header files of all the existing source files in the project with the Apache License;
* update the main article of the `DocC` documentation catalog;
* update the `README` file;
* regenerate the Github Pages documentation from the `DocC` documentation catalog.

Reviewed-on: #18
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-07 22:32:54 +00:00
javier 40afefed15 Open API specification improvements and License update (#17)
This PR contains the work done to:
* improve the overall `OpenAPI` specification documentation describing the `Amiibo API` service;
* update the `AmiiboFilter` type to include the `head` and `tail` properties;
* update the error handling of the errors coming up from the service;
* update its license to Apache v2.0;
* regenerate the Github Pages documentation.

Reviewed-on: #17
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-07 22:07:55 +00:00
javier c303e1f8f3 Some suggested improvements (#16)
This PR contains the work done to make some overall improvements to the library:
* Fixed code duplication from supporting multiple Swift version in the `AmiiboLiveClient` client;
* Improved the error handling from the client's calls in the `AmiiboLiveClient` client;
* Conformed to `AmiiboLiveClient` and the filter types to the `Sendable` protocol;
* Added the "transport" argument to the initializer of the `AmiiboLiveClient` client;
* Updated the `DocC` library documentation.

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

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

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

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

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

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

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

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

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

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

Reviewed-on: #3
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-09-09 17:20:05 +00:00
337 changed files with 4128 additions and 2945 deletions
+24
View File
@@ -0,0 +1,24 @@
## ===----------------------------------------------------------------------===
##
## This source file is part of the Amiibo Service open source project
##
## Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
## Licensed under Apache license v2.0
##
## See LICENSE for license information
## See CONTRIBUTORS for the list of Amiibo Service project authors
##
## SPDX-License-Identifier: Apache-2.0
##
## ===----------------------------------------------------------------------===
# --- DOCUMENTATION ---
DOCC_ARCHIVE_OUTPUT=./${SPM_LIBRARY_TARGET}.doccarchive
DOCC_GITHUB_OUTPUT=./docs
DOCC_GITHUB_BASE_PATH=amiibo-service
DOCC_PREVIEW_URL=http://localhost:8080/documentation/amiiboservice
# -- SWIFT PACKAGE MANAGER ---
SPM_LIBRARY_TARGET=AmiiboService
+21 -4
View File
@@ -1,10 +1,21 @@
## ===----------------------------------------------------------------------===
##
## This source file is part of the Amiibo Service open source project
##
## Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
## Licensed under Apache license v2.0
##
## See LICENSE for license information
## See CONTRIBUTORS for the list of Amiibo Service project authors
##
## SPDX-License-Identifier: Apache-2.0
##
## ===----------------------------------------------------------------------===
# Mac OS
.DS_Store
.netrc
# Visual Studio Code
.vscode
# Xcode
DerivedData/
@@ -31,4 +42,10 @@ Packages/
# hence it is not needed unless you have added a package configuration file to your project
.swiftpm
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
# Visual Studio Code
.vscode
# DocC documentation
*.doccarchive
+17
View File
@@ -0,0 +1,17 @@
## ===----------------------------------------------------------------------===
##
## This source file is part of the Amiibo Service open source project
##
## Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
## Licensed under Apache license v2.0
##
## See LICENSE for license information
## See CONTRIBUTORS for the list of Amiibo Service project authors
##
## SPDX-License-Identifier: Apache-2.0
##
## ===----------------------------------------------------------------------===
version: 1
external_links:
documentation: "https://rock-n-code.github.io/amiibo-service/documentation/amiiboservice/"
+1 -1
View File
@@ -1,5 +1,5 @@
For the purpose of tracking copyright, this is the list of individuals and
organizations who have contributed source code to this Swift package.
organizations who have contributed source code to amiibo-service.
For employees of an organization/company where the copyright of work done
by employees of that company is held by the company itself, only the company
+201 -287
View File
@@ -1,287 +1,201 @@
EUROPEAN UNION PUBLIC LICENCE v. 1.2
EUPL © the European Union 2007, 2016
This European Union Public Licence (the EUPL) applies to the Work (as defined
below) which is provided under the terms of this Licence. Any use of the Work,
other than as authorised under this Licence is prohibited (to the extent such
use is covered by a right of the copyright holder of the Work).
The Work is provided under the terms of this Licence when the Licensor (as
defined below) has placed the following notice immediately following the
copyright notice for the Work:
Licensed under the EUPL
or has expressed by any other means his willingness to license under the EUPL.
1. Definitions
In this Licence, the following terms have the following meaning:
- The Licence: this Licence.
- The Original Work: the work or software distributed or communicated by the
Licensor under this Licence, available as Source Code and also as Executable
Code as the case may be.
- Derivative Works: the works or software that could be created by the
Licensee, based upon the Original Work or modifications thereof. This Licence
does not define the extent of modification or dependence on the Original Work
required in order to classify a work as a Derivative Work; this extent is
determined by copyright law applicable in the country mentioned in Article 15.
- The Work: the Original Work or its Derivative Works.
- The Source Code: the human-readable form of the Work which is the most
convenient for people to study and modify.
- The Executable Code: any code which has generally been compiled and which is
meant to be interpreted by a computer as a program.
- The Licensor: the natural or legal person that distributes or communicates
the Work under the Licence.
- Contributor(s): any natural or legal person who modifies the Work under the
Licence, or otherwise contributes to the creation of a Derivative Work.
- The Licensee or You: any natural or legal person who makes any usage of
the Work under the terms of the Licence.
- Distribution or Communication: any act of selling, giving, lending,
renting, distributing, communicating, transmitting, or otherwise making
available, online or offline, copies of the Work or providing access to its
essential functionalities at the disposal of any other natural or legal
person.
2. Scope of the rights granted by the Licence
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
sublicensable licence to do the following, for the duration of copyright vested
in the Original Work:
- use the Work in any circumstance and for all usage,
- reproduce the Work,
- modify the Work, and make Derivative Works based upon the Work,
- communicate to the public, including the right to make available or display
the Work or copies thereof to the public and perform publicly, as the case may
be, the Work,
- distribute the Work or copies thereof,
- lend and rent the Work or copies thereof,
- sublicense rights in the Work or copies thereof.
Those rights can be exercised on any media, supports and formats, whether now
known or later invented, as far as the applicable law permits so.
In the countries where moral rights apply, the Licensor waives his right to
exercise his moral right to the extent allowed by law in order to make effective
the licence of the economic rights here above listed.
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to
any patents held by the Licensor, to the extent necessary to make use of the
rights granted on the Work under this Licence.
3. Communication of the Source Code
The Licensor may provide the Work either in its Source Code form, or as
Executable Code. If the Work is provided as Executable Code, the Licensor
provides in addition a machine-readable copy of the Source Code of the Work
along with each copy of the Work that the Licensor distributes or indicates, in
a notice following the copyright notice attached to the Work, a repository where
the Source Code is easily and freely accessible for as long as the Licensor
continues to distribute or communicate the Work.
4. Limitations on copyright
Nothing in this Licence is intended to deprive the Licensee of the benefits from
any exception or limitation to the exclusive rights of the rights owners in the
Work, of the exhaustion of those rights or of other applicable limitations
thereto.
5. Obligations of the Licensee
The grant of the rights mentioned above is subject to some restrictions and
obligations imposed on the Licensee. Those obligations are the following:
Attribution right: The Licensee shall keep intact all copyright, patent or
trademarks notices and all notices that refer to the Licence and to the
disclaimer of warranties. The Licensee must include a copy of such notices and a
copy of the Licence with every copy of the Work he/she distributes or
communicates. The Licensee must cause any Derivative Work to carry prominent
notices stating that the Work has been modified and the date of modification.
Copyleft clause: If the Licensee distributes or communicates copies of the
Original Works or Derivative Works, this Distribution or Communication will be
done under the terms of this Licence or of a later version of this Licence
unless the Original Work is expressly distributed only under this version of the
Licence — for example by communicating EUPL v. 1.2 only. The Licensee
(becoming Licensor) cannot offer or impose any additional terms or conditions on
the Work or Derivative Work that alter or restrict the terms of the Licence.
Compatibility clause: If the Licensee Distributes or Communicates Derivative
Works or copies thereof based upon both the Work and another work licensed under
a Compatible Licence, this Distribution or Communication can be done under the
terms of this Compatible Licence. For the sake of this clause, Compatible
Licence refers to the licences listed in the appendix attached to this Licence.
Should the Licensee's obligations under the Compatible Licence conflict with
his/her obligations under this Licence, the obligations of the Compatible
Licence shall prevail.
Provision of Source Code: When distributing or communicating copies of the Work,
the Licensee will provide a machine-readable copy of the Source Code or indicate
a repository where this Source will be easily and freely available for as long
as the Licensee continues to distribute or communicate the Work.
Legal Protection: This Licence does not grant permission to use the trade names,
trademarks, service marks, or names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the copyright notice.
6. Chain of Authorship
The original Licensor warrants that the copyright in the Original Work granted
hereunder is owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each Contributor warrants that the copyright in the modifications he/she brings
to the Work are owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each time You accept the Licence, the original Licensor and subsequent
Contributors grant You a licence to their contributions to the Work, under the
terms of this Licence.
7. Disclaimer of Warranty
The Work is a work in progress, which is continuously improved by numerous
Contributors. It is not a finished work and may therefore contain defects or
bugs inherent to this type of development.
For the above reason, the Work is provided under the Licence on an as is basis
and without warranties of any kind concerning the Work, including without
limitation merchantability, fitness for a particular purpose, absence of defects
or errors, accuracy, non-infringement of intellectual property rights other than
copyright as stated in Article 6 of this Licence.
This disclaimer of warranty is an essential part of the Licence and a condition
for the grant of any rights to the Work.
8. Disclaimer of Liability
Except in the cases of wilful misconduct or damages directly caused to natural
persons, the Licensor will in no event be liable for any direct or indirect,
material or moral, damages of any kind, arising out of the Licence or of the use
of the Work, including without limitation, damages for loss of goodwill, work
stoppage, computer failure or malfunction, loss of data or any commercial
damage, even if the Licensor has been advised of the possibility of such damage.
However, the Licensor will be liable under statutory product liability laws as
far such laws apply to the Work.
9. Additional agreements
While distributing the Work, You may choose to conclude an additional agreement,
defining obligations or services consistent with this Licence. However, if
accepting obligations, You may act only on your own behalf and on your sole
responsibility, not on behalf of the original Licensor or any other Contributor,
and only if You agree to indemnify, defend, and hold each Contributor harmless
for any liability incurred by, or claims asserted against such Contributor by
the fact You have accepted any warranty or additional liability.
10. Acceptance of the Licence
The provisions of this Licence can be accepted by clicking on an icon I agree
placed under the bottom of a window displaying the text of this Licence or by
affirming consent in any other similar way, in accordance with the rules of
applicable law. Clicking on that icon indicates your clear and irrevocable
acceptance of this Licence and all of its terms and conditions.
Similarly, you irrevocably accept this Licence and all of its terms and
conditions by exercising any rights granted to You by Article 2 of this Licence,
such as the use of the Work, the creation by You of a Derivative Work or the
Distribution or Communication by You of the Work or copies thereof.
11. Information to the public
In case of any Distribution or Communication of the Work by means of electronic
communication by You (for example, by offering to download the Work from a
remote location) the distribution channel or media (for example, a website) must
at least provide to the public the information requested by the applicable law
regarding the Licensor, the Licence and the way it may be accessible, concluded,
stored and reproduced by the Licensee.
12. Termination of the Licence
The Licence and the rights granted hereunder will terminate automatically upon
any breach by the Licensee of the terms of the Licence.
Such a termination will not terminate the licences of any person who has
received the Work from the Licensee under the Licence, provided such persons
remain in full compliance with the Licence.
13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work.
If any provision of the Licence is invalid or unenforceable under applicable
law, this will not affect the validity or enforceability of the Licence as a
whole. Such provision will be construed or reformed so as necessary to make it
valid and enforceable.
The European Commission may publish other linguistic versions or new versions of
this Licence or updated versions of the Appendix, so far this is required and
reasonable, without reducing the scope of the rights granted by the Licence. New
versions of the Licence will be published with a unique version number.
All linguistic versions of this Licence, approved by the European Commission,
have identical value. Parties can take advantage of the linguistic version of
their choice.
14. Jurisdiction
Without prejudice to specific agreement between parties,
- any litigation resulting from the interpretation of this License, arising
between the European Union institutions, bodies, offices or agencies, as a
Licensor, and any Licensee, will be subject to the jurisdiction of the Court
of Justice of the European Union, as laid down in article 272 of the Treaty on
the Functioning of the European Union,
- any litigation arising between other parties and resulting from the
interpretation of this License, will be subject to the exclusive jurisdiction
of the competent court where the Licensor resides or conducts its primary
business.
15. Applicable Law
Without prejudice to specific agreement between parties,
- this Licence shall be governed by the law of the European Union Member State
where the Licensor has his seat, resides or has his registered office,
- this licence shall be governed by Belgian law if the Licensor has no seat,
residence or registered office inside a European Union Member State.
Appendix
Compatible Licences according to Article 5 EUPL are:
- GNU General Public License (GPL) v. 2, v. 3
- GNU Affero General Public License (AGPL) v. 3
- Open Software License (OSL) v. 2.1, v. 3.0
- Eclipse Public License (EPL) v. 1.0
- CeCILL v. 2.0, v. 2.1
- Mozilla Public Licence (MPL) v. 2
- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for
works other than software
- European Union Public Licence (EUPL) v. 1.1, v. 1.2
- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong
Reciprocity (LiLiQ-R+).
The European Commission may update this Appendix to later versions of the above
licences without producing a new version of the EUPL, as long as they provide
the rights granted in Article 2 of this Licence and protect the covered Source
Code from exclusive appropriation.
All other changes or additions to this Appendix require the production of a new
EUPL version.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+77 -25
View File
@@ -1,14 +1,16 @@
# ===----------------------------------------------------------------------===
#
# 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
#
# ===----------------------------------------------------------------------===
## ===----------------------------------------------------------------------===
##
## This source file is part of the Amiibo Service open source project
##
## Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
## Licensed under Apache license v2.0
##
## See LICENSE for license information
## See CONTRIBUTORS for the list of Amiibo Service project authors
##
## SPDX-License-Identifier: Apache-2.0
##
## ===----------------------------------------------------------------------===
# ENVIRONMENT VARIABLES
@@ -17,30 +19,80 @@ environment ?= .env
include $(environment)
export $(shell sed 's/=.*//' $(environment))
# IDE
# LIBRARY
open-in-xcode: ## Opens this package with Xcode
@open -a Xcode Package.swift
lib-build: ## Builds the library
@swift build
open-in-vscode: ## Opens this package with Visual Studio Code
@code .
lib-release: ## Releases the library
@swift build -c release
lib-test: ## Runs the unit tests for the library
@swift test \
--disable-xctest \
--enable-code-coverage \
--enable-swift-testing \
--parallel
# SWIFT PACKAGE MANAGER
package-build: ## Builds the project locally
@swift build
package-clean: ## Deletes built SPM artifacts from the package
pkg-clean: ## Deletes built SPM artifacts of the package
@swift package clean
package-outdated: ## Lists the SPM package dependencies that can be updated
@swift package update --dry-run
package-reset: ## Resets the complete SPM cache/build folder from the package
pkg-reset: ## Resets the complete SPM cache/build folder of the package
@swift package reset
package-update: ## Updates the SPM package dependencies
pkg-pristine: pkg-clean pkg-reset ## Deletes all built artifacts, caches, and documentations of the package
@rm -drf $(DOCC_ARCHIVE_OUTPUT)
@rm -drf $(DOCC_GITHUB_OUTPUT)
pkg-outdated: ## Lists the SPM package dependencies that can be updated
@swift package update --dry-run
pkg-update: ## Updates the SPM package dependencies
@swift package update
# DOCUMENTATION
doc-generate: doc-generate-archive doc-generate-github ## Generates the library documentation for both Github and Xcode
doc-generate-archive: ## Generates the library documentation archive for Xcode
@swift package \
--allow-writing-to-directory $(DOCC_ARCHIVE_OUTPUT) \
generate-documentation \
--target $(SPM_LIBRARY_TARGET) \
--include-extended-types \
--enable-inherited-docs \
--output-path $(DOCC_ARCHIVE_OUTPUT)
doc-generate-github: ## Generates the library documentation for Github
@swift package \
--allow-writing-to-directory $(DOCC_GITHUB_OUTPUT) \
generate-documentation \
--target $(SPM_LIBRARY_TARGET) \
--disable-indexing \
--transform-for-static-hosting \
--include-extended-types \
--enable-inherited-docs \
--hosting-base-path $(DOCC_GITHUB_BASE_PATH) \
--output-path $(DOCC_GITHUB_OUTPUT)
doc-preview: ## Previews the library documentation in Safari
@open -a safari $(DOCC_PREVIEW_URL)
@swift package \
--disable-sandbox \
preview-documentation \
--target $(SPM_LIBRARY_TARGET) \
--include-extended-types \
--enable-inherited-docs
# IDE
ide-xcode: ## Opens this package with Xcode
@open -a Xcode Package.swift
ide-vscode: ## Opens this package with Visual Studio Code
@code .
# HELP
+20
View File
@@ -0,0 +1,20 @@
Amiibo Service Project
======================
Please visit the Amiibo Service web site for more information:
* https://github.com/rock-n-code/amiibo-service
Copyright 2025 Röck+Cöde VoF
The Amiibo Service Project licenses this file to you under the Apache License,
version 2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at:
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
+31 -48
View File
@@ -1,21 +1,23 @@
// swift-tools-version: 5.9
// swift-tools-version: 5.10
//===----------------------------------------------------------------------===
//
// 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.
//
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
//===----------------------------------------------------------------------===
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import PackageDescription
let package = Package(
name: AmiiboAPI.package,
name: AmiiboService.package,
platforms: [
.iOS(.v13),
.macOS(.v10_15),
@@ -25,61 +27,42 @@ let package = Package(
],
products: [
.library(
name: AmiiboAPI.package,
targets: [
AmiiboAPI.target
]
name: AmiiboService.package,
targets: [AmiiboService.target]
)
],
dependencies: [
.package(
url: "https://github.com/apple/swift-openapi-generator.git",
from: "1.3.0"
),
.package(
url: "https://github.com/apple/swift-openapi-runtime",
from: "1.5.0"
),
.package(
url: "https://github.com/apple/swift-openapi-urlsession",
from: "1.0.2"
)
.package(url: "https://github.com/apple/swift-openapi-generator.git", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.5.0"),
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.2"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"),
],
targets: [
.target(
name: AmiiboAPI.target,
name: AmiiboService.target,
dependencies: [
.product(
name: "OpenAPIRuntime",
package: "swift-openapi-runtime"
),
.product(
name: "OpenAPIURLSession",
package: "swift-openapi-urlsession"
)
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
],
path: "Sources",
path: "Sources/AmiiboService",
plugins: [
.plugin(
name: "OpenAPIGenerator",
package: "swift-openapi-generator"
),
.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator"),
]
),
.testTarget(
name: AmiiboAPI.test,
name: AmiiboService.test,
dependencies: [
.byName(name: AmiiboAPI.target)
.byName(name: AmiiboService.target)
],
path: "Tests"
path: "Tests/AmiiboService"
),
]
)
// MARK: - Constants
enum AmiiboAPI {
static let package = "amiibo-api"
static let target = "AmiiboAPI"
static let test = "\(AmiiboAPI.target)Tests"
enum AmiiboService {
static let package = "amiibo-service"
static let target = "AmiiboService"
static let test = "\(AmiiboService.target)Tests"
}
+37 -1
View File
@@ -1 +1,37 @@
# Amiibo API
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frock-n-code%2Famiibo-service%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/rock-n-code/amiibo-service)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frock-n-code%2Famiibo-service%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/rock-n-code/amiibo-service)
# 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, then it is mandatory to 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.1.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 build 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,83 @@
# ``AmiiboService``
A library that provides everything the developer needs to interact with the **Amiibo API** backend service.
## Overview
The `amiibo-service` library is a package that allows 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 *models*, *filters*, *errors* and *interfaces* 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.1.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 tasks that simplify the interaction with the library, which the developer can use from any `Terminal` application.
> Tip: To show the available list of tasks, plus display some explanations about each and every one of them; please enter the following command:
```bash
$ make
```
## Topics
### Service
- ``AmiiboService``
### Clients
- ``AmiiboClient``
- ``AmiiboLiveClient``
### Types
- ``Amiibo``
- ``Amiibo/Game``
- ``Amiibo/Platform``
- ``Amiibo/Release``
- ``Amiibo/Usage``
- ``AmiiboSeries``
- ``AmiiboType``
- ``GameCharacter``
- ``GameSeries``
### Filters
- ``AmiiboFilter``
- ``AmiiboSeriesFilter``
- ``AmiiboTypeFilter``
- ``GameCharacterFilter``
- ``GameSeriesFilter``
### Errors
- ``AmiiboServiceError``
@@ -0,0 +1,34 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import Foundation
extension DateFormatter {
// MARK: Properties
/// An ISO timestamp formatter.
///
/// This formatter implements the `yyyy-MM-dd'T'HH:mm:ss.SSSSSS` custom date format.
/// Within the context of this library, this formatter is solely used to decode a date formatted as a timestamp that is returned by the ``AmiiboService/getLastUpdated()`` function.
static var isoTimestamp: DateFormatter {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS"
formatter.timeZone = .init(secondsFromGMT: 0)
return formatter
}
}
@@ -0,0 +1,39 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// 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)
}
@@ -0,0 +1,32 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A protocol that defines decodable models containing the `key` and `name` properties.
protocol KeyNameModel: Sendable {
// MARK: Properties
/// A key.
var key: String { get }
/// A name.
var name: String { get }
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.Tuple)
}
@@ -0,0 +1,42 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import Foundation
import OpenAPIRuntime
/// 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
/// A formatter to use to decode and encode ISO timestamps dates.
private let dateFormatter: DateFormatter = .isoTimestamp
}
// MARK: - DateTranscoder
extension ISOTimestampTranscoder: DateTranscoder {
// MARK: Functions
func encode(_ date: Date) throws -> String {
dateFormatter.string(from: date)
}
func decode(_ string: String) throws -> Date {
dateFormatter.date(from: string) ?? .init()
}
}
@@ -0,0 +1,448 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import Foundation
import OpenAPIRuntime
import OpenAPIURLSession
/// A type that implements a live client to the online service.
public struct AmiiboLiveClient: Sendable {
// MARK: Properties
/// A client generated by the `OpenAPIRuntime` library.
private let client: Client
// MARK: Initializers
/// Initializes this client.
/// - Parameter transport: A transport that performs HTTP operations.
public init(transport: any ClientTransport = URLSessionTransport()) {
self.client = .init(
// The force unwrapping implemented below assumes that the server definition from the OpenAPI specification is correct.
serverURL: try! Servers.Server1.url(),
configuration: .init(dateTranscoder: ISOTimestampTranscoder()),
transport: transport
)
}
}
// MARK: - AmiiboClient
// TODO: Remove the documentation from the functions inside the following extension as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
extension AmiiboLiveClient: AmiiboClient {
// MARK: Functions
#if swift(>=6.0)
/// Gets a list of amiibo items based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered amiibo items.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getAmiibos(
by filter: AmiiboFilter
) async throws(AmiiboServiceError) -> [Amiibo] {
try await fetchAmiibos(filter)
}
/// Gets a list of amiibo series based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered amiibo series.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getAmiiboSeries(
by filter: AmiiboSeriesFilter
) async throws(AmiiboServiceError) -> [AmiiboSeries] {
try await fetchAmiiboSeries(filter)
}
/// Gets a list of amiibo types based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered amiibo types.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getAmiiboTypes(
by filter: AmiiboTypeFilter
) async throws(AmiiboServiceError) -> [AmiiboType] {
try await fetchAmiiboTypes(filter)
}
/// Gets a list of game characters based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered game characters.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getGameCharacters(
by filter: GameCharacterFilter
) async throws(AmiiboServiceError) -> [GameCharacter] {
try await fetchGameCharacters(filter)
}
/// Gets a list of game series based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered game series.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getGameSeries(
by filter: GameSeriesFilter
) async throws(AmiiboServiceError) -> [GameSeries] {
try await fetchGameSeries(filter)
}
/// Gets the date when the data was last updated.
/// - Returns: A last updated date.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getLastUpdated() async throws(AmiiboServiceError) -> Date {
try await fetchLastUpdated()
}
#else
/// Gets a list of amiibo items based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered amiibo items.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getAmiibos(
by filter: AmiiboFilter
) async throws -> [Amiibo] {
try await fetchAmiibos(filter)
}
/// Gets a list of amiibo series based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered amiibo series.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getAmiiboSeries(
by filter: AmiiboSeriesFilter
) async throws -> [AmiiboSeries] {
try await fetchAmiiboSeries(filter)
}
/// Gets a list of amiibo types based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered amiibo types.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getAmiiboTypes(
by filter: AmiiboTypeFilter
) async throws -> [AmiiboType] {
try await fetchAmiiboTypes(filter)
}
/// Gets a list of game characters based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered game characters.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getGameCharacters(
by filter: GameCharacterFilter
) async throws -> [GameCharacter] {
try await fetchGameCharacters(filter)
}
/// Gets a list of game series based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of filtered game series.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getGameSeries(
by filter: GameSeriesFilter
) async throws -> [GameSeries] {
try await fetchGameSeries(filter)
}
/// Gets the date when the data was last updated.
/// - Returns: A last updated date.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
public func getLastUpdated() async throws -> Date {
try await fetchLastUpdated()
}
#endif
}
// MARK: - Helpers
private extension AmiiboLiveClient {
// MARK: Functions
/// Fetches a list of amiibo items based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of fetched amiibo items filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchAmiibos(
_ filter: AmiiboFilter
) async throws -> [Amiibo] {
let response: Operations.getAmiibos.Output
do {
response = try await client.getAmiibos(.init(query: .init(
amiiboSeries: filter.series,
character: filter.gameCharacter,
gameseries: filter.gameSeries,
head: filter.head,
id: filter.identifier,
name: filter.name,
showgames: filter.showGames,
showusage: filter.showUsage,
tail: filter.tail,
_type: filter.type
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .notFound:
throw AmiiboServiceError.notFound
case .internalServerError:
throw AmiiboServiceError.notAvailable
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches a list of amiibo series based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of fetched amiibo series filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchAmiiboSeries(
_ filter: AmiiboSeriesFilter
) async throws -> [AmiiboSeries] {
let response: Operations.getAmiiboSeries.Output
do {
response = try await client.getAmiiboSeries(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches a list of amiibo types based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of fetched amiibo types filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchAmiiboTypes(
_ filter: AmiiboTypeFilter
) async throws -> [AmiiboType] {
let response: Operations.getAmiiboTypes.Output
do {
response = try await client.getAmiiboTypes(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches a list of game characters based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of fetched game characters filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchGameCharacters(
_ filter: GameCharacterFilter
) async throws -> [GameCharacter] {
let response: Operations.getGameCharacters.Output
do {
response = try await client.getGameCharacters(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches a list of game series based on a given filter.
/// - Parameter filter: A filter to remove unwanted items from the result.
/// - Returns: A list of fetched game series filtered, if requested.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchGameSeries(
_ filter: GameSeriesFilter
) async throws -> [GameSeries] {
let response: Operations.getGameSeries.Output
do {
response = try await client.getGameSeries(.init(query: .init(
key: filter.key,
name: filter.name
)))
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Fetches the date when the data was last updated.
/// - Returns: A fetched last updated date.
/// - Throws: An ``AmiiboServiceError`` error in case some issue is encountered while generating the result.
func fetchLastUpdated() async throws -> Date {
let response: Operations.getLastUpdated.Output
do {
response = try await client.getLastUpdated()
} catch {
try handle(error: error)
}
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return output.lastUpdated
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .notFound:
throw AmiiboServiceError.notFound
case .internalServerError:
throw AmiiboServiceError.notAvailable
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
/// Maps a given error to a `AmiiboServiceError` error.
/// - Parameter error: An error to map.
/// - Throws: An ``AmiiboServiceError`` error.
func handle(error: any Error) throws -> Never {
switch error {
case is CancellationError:
throw AmiiboServiceError.cancelled
case let clientError as ClientError:
switch clientError.underlyingError {
case is DecodingError:
throw AmiiboServiceError.decoding
case let urlError as URLError:
switch urlError.code {
case .cannotFindHost,
.cannotConnectToHost,
.dnsLookupFailed,
.networkConnectionLost,
.notConnectedToInternet,
.timedOut:
throw AmiiboServiceError.notAvailable
default:
throw AmiiboServiceError.unknown
}
default:
throw AmiiboServiceError.unknown
}
default:
throw AmiiboServiceError.unknown
}
}
/// Retrieves a list of amiibo items from a wrapper container.
/// - Parameter wrapper: A wrapper container that either has an object or a list of items.
/// - Returns: A list of amiibo items, sorted by identifiers.
func map(
_ wrapper: Components.Schemas.AmiiboWrapper
) -> [Amiibo] {
switch wrapper.amiibo {
case let .Amiibo(object):
return [Amiibo(object)]
case let .AmiiboList(list):
return list
.map { Amiibo($0) }
.sorted { $0.identifier < $1.identifier }
}
}
/// Retrieves a list of items that conforms to the `KeyNameModel` protocol from a wrapper container.
/// - Parameter wrapper: A wrapper container that either has an object or a list of items.
/// - Returns: A list of items that conforms to the `KeyNameModel` protocol, sorted by keys.
func map<Model: KeyNameModel>(
_ wrapper: Components.Schemas.TupleWrapper
) -> [Model] {
switch wrapper.amiibo {
case let .Tuple(payload):
return [Model(payload)]
case let .TupleList(list):
return list
.map { Model($0) }
.sorted { $0.key < $1.key }
}
}
}
@@ -0,0 +1,35 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A representation of all the possible errors that the ``AmiiboService`` service could throw.
public enum AmiiboServiceError: Error {
/// A bad request has been given to the client.
case badRequest
/// A call to an endpoint has been cancelled by the user.
case cancelled
/// A response cannot be decoded.
case decoding
/// An online service is not currently available.
case notAvailable
/// A response cannot be found.
case notFound
/// An undocumented/unsupported status code error.
case undocumented(_ statusCode: Int)
/// An unknown error.
case unknown
}
// MARK: - Equatable
extension AmiiboServiceError: Equatable {}
@@ -0,0 +1,88 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting amiibo items.
public struct AmiiboFilter: Sendable {
// MARK: Properties
/// A game character to filter the result, if any.
public let gameCharacter: String?
/// A game series to filter the result, if any.
public let gameSeries: String?
/// A first part of an identifier to filter the result, if any.
public let head: String?
/// An amiibo identifier to filter the result, if any.
public let identifier: String?
/// An amiibo name to filter the result, if any.
public let name: String?
/// An amiibo series to filter the result, 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?
/// A last part of an identifier to filter the result, if any.
public let tail: String?
/// An amiibo type to filter the result, if any.
public let type: String?
// MARK: Initializers
/// Initializes this filter.
/// - Parameters:
/// - head: A first part of an identifier to filter the result, if any.
/// - tail: A last part of an identifier to filter the result, if any.
/// - identifier: An amiibo identifier to filter the result, if any.
/// - name: An amiibo name to filter the result, if any.
/// - type: An amiibo type to filter the result, if any.
/// - series: An amiibo series to filter the result, if any.
/// - gameCharacter: A game character to filter the result, if any.
/// - gameSeries: A game series to filter the result, 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(
head: String? = nil,
tail: String? = nil,
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.head = head
self.identifier = identifier
self.name = name
self.series = series
self.showGames = showGames
self.showUsage = showUsage
self.tail = tail
self.type = type
}
}
@@ -0,0 +1,50 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting amiibo series.
public struct AmiiboSeriesFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -0,0 +1,50 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting amiibo types.
public struct AmiiboTypeFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -0,0 +1,50 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting game characters.
public struct GameCharacterFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -0,0 +1,50 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A type that contains values to fine-tune a response when requesting game series.
public struct GameSeriesFilter: KeyNameFilter, Sendable {
// TODO: Remove the documentation from the properties and initializers of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key to return, if any.
public let key: String?
/// A name to return, if any.
public let name: String?
// MARK: Initializers
/// Initializes this filter without key or name values.
public init() {
self.key = nil
self.name = nil
}
/// Initializes this filter with a key value.
/// - Parameter key: A key to return.
public init(key: String) {
self.key = key
self.name = nil
}
/// Initializes this filter with a name value.
/// - Parameter name: A name to return.
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,34 +1,58 @@
//===----------------------------------------------------------------------===
//
// 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.
//
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
//===----------------------------------------------------------------------===
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import Foundation
/// A model that represents an amiibo item.
public struct Amiibo: Sendable {
// MARK: Properties
/// A game character.
public let gameCharacter: String
/// A game series.
public let gameSeries: String
/// The first 8 hexadecimal characters of an identifier.
public let head: String
/// An image link.
public let image: String
/// An amiibo name.
public let name: String
/// A game platform type, if any.
public let platform: Platform?
/// A release date.
public let release: Release
/// An amiibo series.
public let series: String
/// The last 8 hexadecimal characters of an identifier.
public let tail: String
/// An amiibo type.
public let type: String
// MARK: Initialisers
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.Amiibo) {
self.gameCharacter = payload.character
self.gameSeries = payload.gameSeries
@@ -48,10 +72,12 @@ public struct Amiibo: Sendable {
// MARK: Computed
/// An identifier.
public var identifier: String {
head + tail
}
/// A URL related to an image link, if any.
public var imageURL: URL? {
.init(string: image)
}
@@ -0,0 +1,47 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
extension Amiibo {
/// A model that represents a game related to an amiibo item.
public struct Game: Sendable {
// MARK: Properties
/// A list of identifiers.
public let identifiers: [String]
/// A name.
public let name: String
/// A list of amiibo usages, if any.
public let usages: [Usage]?
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.AmiiboGame) {
self.identifiers = payload.gameID
self.name = payload.gameName
self.usages = {
guard let usages = payload.amiiboUsage else {
return nil
}
return usages.map { .init($0) }
}()
}
}
}
@@ -1,26 +1,42 @@
//===----------------------------------------------------------------------===
//
// 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.
//
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
//===----------------------------------------------------------------------===
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
extension Amiibo {
/// A model that represents a collection of `WiiU`, `3DS`, and `Switch` games related to an amiibo item.
public struct Platform: Sendable {
// MARK: Properties
/// A list of `Switch` games related to an amiibo item.
public let `switch`: [Game]
/// A list of `3DS` games related to an amiibo item.
public let threeDS: [Game]
/// A list of `WiiU` games related to an amiibo item.
public let wiiU: [Game]
// MARK: Initialisers
/// Initializes this model.
///
/// > important: In case no data is provided, then an instance of this model is not created.
///
/// - Parameters:
/// - switch: A list of `Switch` games related to an amiibo item, if any.
/// - threeDS: A list of `3DS` games related to an amiibo item, if any.
/// - wiiU: A list of `WiiU` games related to an amiibo item, if any.
init?(
_ `switch`: [Components.Schemas.AmiiboGame]?,
_ threeDS: [Components.Schemas.AmiiboGame]?,
@@ -0,0 +1,47 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import Foundation
extension Amiibo {
/// A model that represents a collection of release dates related to an amiibo item.
public struct Release: Sendable {
// MARK: Properties
/// A release date for North America, if any.
public let america: Date?
/// A release date for Australia, if any.
public let australia: Date?
/// A release date for Europe, if any.
public let europe: Date?
/// A release date for Japan, if any.
public let japan: Date?
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.AmiiboRelease) {
self.america = payload.na
self.australia = payload.au
self.europe = payload.eu
self.japan = payload.jp
}
}
}
@@ -0,0 +1,37 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
extension Amiibo {
/// A model that represents the usage of an amiibo item within a certain game.
public struct Usage: Sendable {
// MARK: Properties
/// An explanation of how to use an amiibo item.
public let explanation: String
/// A flag that indicates whether an amiibo item can save game data in it.
public let isWriteable: Bool
// MARK: Initializers
/// Initializes this model from a given payload.
/// - Parameter payload: A payload that contains the values for the model.
init(_ payload: Components.Schemas.AmiiboUsage) {
self.explanation = payload.Usage
self.isWriteable = payload.write
}
}
}
@@ -0,0 +1,35 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A model that represents an amiibo series.
public struct AmiiboSeries: KeyNameModel {
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.name
}
}
@@ -0,0 +1,35 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A model that represents an amiibo type.
public struct AmiiboType: KeyNameModel {
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.name
}
}
@@ -0,0 +1,35 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A model that represents a game character.
public struct GameCharacter: KeyNameModel {
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.name
}
}
@@ -0,0 +1,35 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
/// A model that represents a game series.
public struct GameSeries: KeyNameModel {
// TODO: Remove the documentation from the properties of this type as the `--enable-inherited-docs` flag when generating DocC documentation is not working as intended (?).
// MARK: Properties
/// A key.
public let key: String
/// A name.
public let name: String
// MARK: Initializers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.name
}
}
@@ -0,0 +1,94 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
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,151 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
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
}
@@ -0,0 +1,19 @@
## ===----------------------------------------------------------------------===
##
## This source file is part of the Amiibo Service open source project
##
## Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
## Licensed under Apache license v2.0
##
## See LICENSE for license information
## See CONTRIBUTORS for the list of Amiibo Service project authors
##
## SPDX-License-Identifier: Apache-2.0
##
## ===----------------------------------------------------------------------===
generate:
- types
- client
namingStrategy: defensive
accessModifier: internal
+477
View File
@@ -0,0 +1,477 @@
## ===----------------------------------------------------------------------===
##
## This source file is part of the Amiibo Service open source project
##
## Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
## Licensed under Apache license v2.0
##
## See LICENSE for license information
## See CONTRIBUTORS for the list of Amiibo Service project authors
##
## SPDX-License-Identifier: Apache-2.0
##
## ===----------------------------------------------------------------------===
openapi: '3.1.1'
info:
title: Amiibo API
summary: A RESTFul API for Amiibo.
description: |
# information
_AmiiboAPI_ is primarily used for educational purposes.
This is a **reading-only API**. Only HTTP GET method is allowed by this API.
**No authentication** is required to use this API. All resources are allowed to access.
If you are going to be calling this API regularly. We recommend that you use **caching** on your system.
# Terms & Conditions
By using our API, you hereby accepted the following terms and conditions:
* *This API has no affiliation with Nintendo or any other companies that own the rights to it.*
* *Other reports collected by the respective companies that own the rights are not our responsibility.*
* *User agrees that the use of this API is entirely at user's own risks.*
* *You will require your end users to comply with (and not knowingly enable them to violate) applicable law, regulation, and the Terms.*
* *You will comply with all applicable law, regulation, and third party rights (including without limitation laws regarding the import or export of data or software, privacy, and local laws). You will not use the APIs to encourage or promote illegal activity or violation of third party rights.*
* *These Terms and Conditions are subject to change without notice, from time to time in our sole discretion.*
version: v1.0.0
termsOfService: https://www.amiiboapi.com/docs/#termscondition
contact:
name: FAQ
url: https://www.amiiboapi.com/faq/
license:
name: MIT license
identifier: MIT
servers:
- url: https://www.amiiboapi.com/api
description: Live service
tags:
- name: Amiibo
description: Amiibo-related endpoints.
- name: Game
description: Game-related endpoints.
- name: Service
description: Service-related endpoints.
externalDocs:
url: https://www.amiiboapi.com/docs
description: Amiibo API documentation
paths:
/amiibo:
get:
summary: Get a list of Amiibo items.
description: Get a list of all the Amiibo items available in the database.
operationId: getAmiibos
tags:
- Amiibo
responses:
'200':
description: Response that retuns a decodable JSON object wrapping a list of Amiibo items.
content:
application/json:
schema:
$ref: '#/components/schemas/AmiiboWrapper'
'400':
description: An amiibo bad request.
'404':
description: An amiibo not found.
'500':
description: Service is not available.
parameters:
- name: amiiboSeries
in: query
description: An identifier or name of an Amiibo to filter the response.
required: false
schema:
type: string
style: form
- name: character
in: query
description: An identifier or name of a game character to filter the response.
required: false
schema:
type: string
style: form
- name: gameseries
in: query
description: An identifier or name of a game series to filter the response.
required: false
schema:
type: string
style: form
- name: head
in: query
description: A last part of an identifier to filter the response.
required: false
schema:
type: string
style: form
- name: id
in: query
description: An identifier of an Amiibo to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: A name of an Amiibo to filter the response.
required: false
schema:
type: string
style: form
- name: showgames
in: query
description: A flag that indicates whether to include information about related games.
required: false
schema:
type: boolean
style: form
- name: showusage
in: query
description: A flag that indicates whether to include information about Amiibo usage in related games.
required: false
schema:
type: boolean
style: form
- name: tail
in: query
description: A first part of an identifier to filter the response.
required: false
schema:
type: string
style: form
- name: type
in: query
description: An identifier or a name of an Amiibo type to filter the response.
required: false
schema:
type: string
style: form
/amiiboseries:
get:
description: Get a list of all the Amiibo series available in the database.
operationId: getAmiiboSeries
tags:
- Amiibo
responses:
'200':
$ref: '#/components/responses/SuccessTuple'
'400':
description: An amiibo series bad request.
'404':
description: An amiibo series not found.
'500':
description: Service is not available.
parameters:
- name: key
in: query
description: The Amiibo series key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The Amiibo series name to filter the response.
required: false
schema:
type: string
style: form
/character:
get:
description: Get a list of all the game characters available in the database.
operationId: getGameCharacters
tags:
- Game
responses:
'200':
$ref: '#/components/responses/SuccessTuple'
'400':
description: A game character bad request.
'404':
description: A game character not found.
'500':
description: Service is not available.
parameters:
- name: key
in: query
description: The game character key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The game character name to filter the response.
required: false
schema:
type: string
style: form
/gameseries:
get:
description: Gets a list of all the game series available in the database.
operationId: getGameSeries
tags:
- Game
responses:
'200':
$ref: '#/components/responses/SuccessTuple'
'400':
description: A game series bad request.
'404':
description: A game series not found.
'500':
description: Service is not available.
parameters:
- name: key
in: query
description: The game series key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The game series name to filter the response.
required: false
schema:
type: string
style: form
/type:
get:
description: Gets a list of all the Amiibo types available in the database.
operationId: getAmiiboTypes
tags:
- Amiibo
responses:
'200':
$ref: '#/components/responses/SuccessTuple'
'400':
description: An amiibo type bad request.
'404':
description: An amiibo type not found.
'500':
description: Service is not available.
parameters:
- name: key
in: query
description: The Amiibo type key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The Amiibo type name to filter the response.
required: false
schema:
type: string
style: form
/lastupdated:
get:
description: Gets a timestamp when the Amiibo data was last updated.
operationId: getLastUpdated
tags:
- Service
responses:
'200':
description: Successful response returning the object that contains the date and time when the database was last updated.
content:
application/json:
schema:
$ref: '#/components/schemas/LastUpdated'
'400':
description: A last updated bad request.
'404':
description: A last updated not found.
'500':
description: Service is not available.
components:
responses:
SuccessTuple:
description: Response that returns a JSON object containing requested `Tuple` data from a resource.
content:
application/json:
schema:
$ref: '#/components/schemas/TupleWrapper'
schemas:
# Core Entities
Amiibo:
description: A type that contains all the information about an Amiibo.
type: object
properties:
amiiboSeries:
description: A name of the series the Amiibo belongs to.
type: string
character:
description: |
A name of a character of An Amiibo.
Multiple character have different amiibo design.
type: string
gameSeries:
description: A name of the game series the Amiibo belongs to.
type: string
games3DS:
description: A list of 3DS games an Amiibo could be used in, if any.
type: array
items:
$ref: '#/components/schemas/AmiiboGame'
gamesSwitch:
description: A list of Switch games an Amiibo could be used in, if any.
type: array
items:
$ref: '#/components/schemas/AmiiboGame'
gamesWiiU:
description: A list of Wii U games an Amiibo could be used in, if any.
type: array
items:
$ref: '#/components/schemas/AmiiboGame'
head:
description: |
The first 8 characters of the hexadecimal value that identifies an Amiibo.
The positions 0 to 7 of the hexadecimal string.
type: string
image:
description: An image URL related to an Amiibo.
type: string
name:
description: A name of an Amiibo.
type: string
release:
description: A type that contains the release dates of an Amiibo, if any.
$ref: '#/components/schemas/AmiiboRelease'
tail:
description: |
The last 8 characters of the hexadecimal value that identifies an Amiibo.
The positions 8 to 15 of the hexadecimal string.
type: string
type:
description: A name for the type an Amiibo belongs to.
type: string
required:
- amiiboSeries
- character
- gameSeries
- head
- image
- name
- release
- tail
- type
AmiiboGame:
description: A type that represents a game in which an Amiibo is related to.
type: object
properties:
amiiboUsage:
description: A list of available usages an Amiibo have in a game, if any.
type: array
items:
$ref: '#/components/schemas/AmiiboUsage'
gameID:
description: A list of identifiers of a game an Amiibo is related to.
type: array
items:
type: string
gameName:
description: A name of a game an Amiibo is related to.
type: string
required:
- gameID
- gameName
AmiiboList:
description: A type that contains a list of `Amiibo` instances.
type: array
items:
description: A list if `Amiibo` instance.
$ref: '#/components/schemas/Amiibo'
AmiiboRelease:
description: A type that contains the release dates of an Amiibo throughout the world.
type: object
properties:
au:
description: A release date for Australia, if any.
type: string
format: date-time
eu:
description: A release date for Europe, if any.
type: string
format: date-time
jp:
description: A release date for Japan, if any.
type: string
format: date-time
na:
description: A release date for North America, if any.
type: string
format: date-time
AmiiboUsage:
description: A type that represents a use of an Amiibo in a game.
type: object
properties:
Usage:
description: An explanation of the usage of an Amiibo in a game.
type: string
write:
description: A flag that indicates whether the data in an Amiibo is writable or not.
type: boolean
required:
- Usage
- write
LastUpdated:
description: A type that informs when the data in the service was last updated.
type: object
properties:
lastUpdated:
description: The date and time when the data in the database was last updated.
type: string
format: date-time
required:
- lastUpdated
# Wrapper Entities
AmiiboWrapper:
description: A type that contains either one or multiple `Amiibo` instances.
type: object
properties:
amiibo:
description: A property that contains one or multiple `Amiibo` instances.
oneOf:
- $ref: '#/components/schemas/Amiibo'
- $ref: '#/components/schemas/AmiiboList'
required:
- amiibo
Tuple:
description: |
A type that is conformed only by the `key` and `name` properties.
This type represents either `AmiiboSeries`, `AmiiboType`, `GameCharacter`, and `GameSeries` types.
type: object
properties:
key:
description: A key assigned to a tuple.
type: string
name:
description: A name assigned to a tuple.
type: string
required:
- key
- name
TupleList:
description: A type that represents a list of key/value tuples.
type: array
items:
description: A property that can contains multiple `Tuple` instances.
$ref: '#/components/schemas/Tuple'
TupleWrapper:
description: A type that contains either one or multiple `Tuple` instances.
type: object
properties:
amiibo:
description: A property that contains one or multiple `Tuple` instances.
oneOf:
- $ref: '#/components/schemas/Tuple'
- $ref: '#/components/schemas/TupleList'
required:
- amiibo
@@ -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
extension DateFormatter {
static var isoDateTime: DateFormatter {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS"
formatter.timeZone = .init(secondsFromGMT: 0)
return formatter
}
}
@@ -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,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
//
//===----------------------------------------------------------------------===
protocol KeyNameFilter {
// MARK: Properties
var key: String? { get }
var name: String? { get }
// MARK: Initialisers
init()
init(key: String)
init(name: String)
}
@@ -1,24 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
protocol KeyNameModel: Sendable {
// MARK: Properties
var key: String { get }
var name: String { get }
// MARK: Initialisers
init(_ payload: Components.Schemas.Tuple)
}
@@ -1,31 +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
struct ISODateTranscoder: DateTranscoder {
// MARK: Properties
private let dateFormatter: DateFormatter = .isoDateTime
// MARK: Functions
func encode(_ date: Date) throws -> String {
dateFormatter.string(from: date)
}
func decode(_ string: String) throws -> Date {
dateFormatter.date(from: string) ?? .init()
}
}
@@ -1,248 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
import OpenAPIRuntime
import OpenAPIURLSession
public struct AmiiboLiveClient {
// MARK: Properties
private let client: Client
// MARK: Initialisers
public init() throws {
self.client = .init(
serverURL: try Servers.server1(),
configuration: .init(dateTranscoder: ISODateTranscoder()),
transport: URLSessionTransport()
)
}
}
// MARK: - APIProtocol
extension AmiiboLiveClient: APIClient {
// MARK: Functions
public func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo] {
let response = try await {
do {
return try await client.getAmiibos(
.init(query: .init(
amiiboSeries: filter.series,
character: filter.gameCharacter,
gameseries: filter.gameSeries,
id: filter.identifier,
name: filter.name,
showgames: filter.showGames,
showusage: filter.showUsage,
_type: filter.type
))
)
} catch let error as ClientError {
guard let _ = error.underlyingError as? DecodingError else {
throw AmiiboServiceError.unknown
}
throw AmiiboServiceError.decoding
} catch {
throw AmiiboServiceError.unknown
}
}()
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries] {
let response = try await client.getAmiiboSeries(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: AmiiboSeries.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws -> [AmiiboType] {
let response = try await client.getAmiiboTypes(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: AmiiboType.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getGameCharacters(by filter: GameCharacterFilter) async throws -> [GameCharacter] {
let response = try await client.getGameCharacters(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: GameCharacter.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getGameSeries(by filter: GameSeriesFilter) async throws -> [GameSeries] {
let response = try await client.getGameSeries(
.init(query: .init(
key: filter.key,
name: filter.name
))
)
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return map(output, as: GameSeries.self)
}
case .badRequest:
throw AmiiboServiceError.badRequest
case .internalServerError:
throw AmiiboServiceError.notAvailable
case .notFound:
throw AmiiboServiceError.notFound
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
public func getLastUpdated() async throws -> Date {
let response = try await client.getLastUpdated()
switch response {
case let .ok(ok):
switch ok.body {
case let .json(output):
return output.lastUpdated
}
case let .undocumented(statusCode, _):
throw AmiiboServiceError.undocumented(statusCode)
}
}
}
// MARK: - Helpers
private extension AmiiboLiveClient {
// MARK: Functions
func map(_ wrapper: Components.Schemas.AmiiboWrapper) -> [Amiibo] {
switch wrapper.amiibo {
case let .Amiibo(object):
return [.init(object)]
case let .AmiiboList(list):
return list
.map { .init($0) }
.sorted { $0.identifier < $1.identifier }
}
}
func map<Model: KeyNameModel>(
_ wrapper: Components.Schemas.TupleWrapper,
as: Model.Type
) -> [Model] {
switch wrapper.amiibo {
case let .Tuple(payload):
return [.init(payload)]
case let .TupleList(list):
return list
.map { .init($0) }
.sorted { $0.key < $1.key }
}
}
}
@@ -1,130 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
import Foundation
public struct AmiiboMockClient {
// MARK: Properties
private let amiibos: [Amiibo]?
private let amiiboSeries: [AmiiboSeries]?
private let amiiboTypes: [AmiiboType]?
private let error: AmiiboServiceError?
private let gameCharacters: [GameCharacter]?
private let gameSeries: [GameSeries]?
private let lastUpdated: Date?
// MARK: Initialisers
public init(
amiibos: [Amiibo]? = nil,
amiiboSeries: [AmiiboSeries]? = nil,
amiiboTypes: [AmiiboType]? = nil,
gameCharacters: [GameCharacter]? = nil,
gameSeries: [GameSeries]? = nil,
lastUpdated: Date? = nil,
error: AmiiboServiceError? = nil
) {
self.amiibos = amiibos
self.amiiboSeries = amiiboSeries
self.amiiboTypes = amiiboTypes
self.error = error
self.gameCharacters = gameCharacters
self.gameSeries = gameSeries
self.lastUpdated = lastUpdated
}
}
// MARK: - APIClient
extension AmiiboMockClient: APIClient {
// MARK: Functions
public func getAmiibos(by filter: AmiiboFilter) async throws -> [Amiibo] {
try throwErrorIfExists()
guard let amiibos else {
throw AmiiboServiceError.notFound
}
return amiibos
}
public func getAmiiboSeries(by filter: AmiiboSeriesFilter) async throws -> [AmiiboSeries] {
try throwErrorIfExists()
guard let amiiboSeries else {
throw AmiiboServiceError.notFound
}
return amiiboSeries
}
public func getAmiiboTypes(by filter: AmiiboTypeFilter) async throws -> [AmiiboType] {
try throwErrorIfExists()
guard let amiiboTypes else {
throw AmiiboServiceError.notFound
}
return amiiboTypes
}
public func getGameCharacters(by filter: GameCharacterFilter) async throws -> [GameCharacter] {
try throwErrorIfExists()
guard let gameCharacters else {
throw AmiiboServiceError.notFound
}
return gameCharacters
}
public func getGameSeries(by filter: GameSeriesFilter) async throws -> [GameSeries] {
try throwErrorIfExists()
guard let gameSeries else {
throw AmiiboServiceError.notFound
}
return gameSeries
}
public func getLastUpdated() async throws -> Date {
try throwErrorIfExists()
guard let lastUpdated else {
throw AmiiboServiceError.notFound
}
return lastUpdated
}
}
// MARK: - Helpers
private extension AmiiboMockClient {
// MARK: Functions
func throwErrorIfExists() throws {
if let error {
throw error
}
}
}
@@ -1,24 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public enum AmiiboServiceError: Error {
case badRequest
case decoding
case notAvailable
case notFound
case undocumented(_ statusCode: Int)
case unknown
}
// MARK: - Equatable
extension AmiiboServiceError: Equatable {}
-48
View File
@@ -1,48 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct AmiiboFilter {
// MARK: Properties
public let gameCharacter: String?
public let gameSeries: String?
public let identifier: String?
public let name: String?
public let series: String?
public let showGames: Bool?
public let showUsage: Bool?
public let type: String?
// MARK: Initialisers
public init(
identifier: String? = nil,
name: String? = nil,
type: String? = nil,
series: String? = nil,
gameCharacter: String? = nil,
gameSeries: String? = nil,
showGames: Bool? = nil,
showUsage: Bool? = nil
) {
self.gameCharacter = gameCharacter
self.gameSeries = gameSeries
self.identifier = identifier
self.name = name
self.series = series
self.showGames = showGames
self.showUsage = showUsage
self.type = type
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct AmiiboSeriesFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct AmiiboTypeFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct GameCharacterFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,37 +0,0 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboAPI open source project
//
// Copyright (c) 2024 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
public struct GameSeriesFilter: KeyNameFilter {
// MARK: Properties
public let key: String?
public let name: String?
// MARK: Initialisers
public init() {
self.key = nil
self.name = nil
}
public init(key: String) {
self.key = key
self.name = nil
}
public init(name: String) {
self.key = nil
self.name = name
}
}
@@ -1,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
//
//===----------------------------------------------------------------------===
extension Amiibo {
public struct Game: Sendable {
// MARK: Properties
public let identifiers: [String]
public let name: String
public let usages: [Usage]?
// MARK: Initialisers
init(_ payload: Components.Schemas.AmiiboGame) {
self.identifiers = payload.gameID
self.name = payload.gameName
self.usages = {
guard let usages = payload.amiiboUsage else {
return nil
}
return usages.map { .init($0) }
}()
}
}
}
@@ -1,35 +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
extension Amiibo {
public struct Release: Sendable {
// MARK: Properties
public let america: Date?
public let australia: Date?
public let europe: Date?
public let japan: Date?
// MARK: Initialisers
init(_ payload: Components.Schemas.AmiiboRelease) {
self.america = payload.na
self.australia = payload.au
self.europe = payload.eu
self.japan = payload.jp
}
}
}
@@ -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
//
//===----------------------------------------------------------------------===
extension Amiibo {
public struct Usage: Sendable {
// MARK: Properties
public let explanation: String
public let isWriteable: Bool
// MARK: Initialisers
init(_ payload: Components.Schemas.AmiiboUsage) {
self.explanation = payload.Usage
self.isWriteable = payload.write
}
}
}
-27
View File
@@ -1,27 +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 AmiiboSeries: KeyNameModel {
// MARK: Properties
public let key: String
public let name: String
// MARK: Initialisers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.name
}
}
-27
View File
@@ -1,27 +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 AmiiboType: KeyNameModel {
// MARK: Properties
public let key: String
public let name: String
// MARK: Initialisers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.name
}
}
-27
View File
@@ -1,27 +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 GameCharacter: KeyNameModel {
// MARK: Properties
public let key: String
public let name: String
// MARK: Initialisers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.name
}
}
-27
View File
@@ -1,27 +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 GameSeries: KeyNameModel {
// MARK: Properties
public let key: String
public let name: String
// MARK: Initialisers
init(_ payload: Components.Schemas.Tuple) {
self.key = payload.key
self.name = payload.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()
}
}
-16
View File
@@ -1,16 +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
#
# ===----------------------------------------------------------------------===
generate:
- types
- client
accessModifier: internal
-376
View File
@@ -1,376 +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
#
# ===----------------------------------------------------------------------===
openapi: '3.1.0'
info:
title: Amiibo API service
description: The Amiibo API RESTful service.
version: 1.0.0
servers:
- url: https://www.amiiboapi.com/api
description: Amiibo API service (live)
paths:
/amiibo:
get:
description: Get a list of all the Amiibo items available in the database.
operationId: getAmiibos
responses:
'200':
description: Successful response returning the object that contains a list of Amiibo items.
content:
application/json:
schema:
$ref: '#/components/schemas/AmiiboWrapper'
'400':
description: Bad Amiibo request.
parameters:
- name: amiiboSeries
in: query
description: The Amiibo series identifier or name to filter the response.
required: false
schema:
type: string
style: form
- name: character
in: query
description: The game character identifier or name to filter the response.
required: false
schema:
type: string
style: form
- name: gameseries
in: query
description: The game series identifier or name to filter the response.
required: false
schema:
type: string
style: form
- name: id
in: query
description: The Amiibo identifier to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The Amiibo name to filter the response.
required: false
schema:
type: string
style: form
- name: showgames
in: query
description: The flag that indicates whether to include information about related games.
required: false
schema:
type: boolean
style: form
- name: showusage
in: query
description: The flag that indicates whether to include information about Amiibo usage in related games.
required: false
schema:
type: boolean
style: form
- name: type
in: query
description: The Amiibo type to filter the response.
required: false
schema:
type: string
style: form
/amiiboseries:
get:
description: Get a list of all the Amiibo series available in the database.
operationId: getAmiiboSeries
responses:
'200':
description: Successful response returning the object that contains a list of Amiibo series.
content:
application/json:
schema:
$ref: '#/components/schemas/TupleWrapper'
'400':
description: Bad Amiibo series request.
'404':
description: Amiibo series not found.
'500':
description: Service currently not available.
parameters:
- name: key
in: query
description: The Amiibo series key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The Amiibo series name to filter the response.
required: false
schema:
type: string
style: form
/character:
get:
description: Get a list of all the game characters available in the database.
operationId: getGameCharacters
responses:
'200':
description: Successful response returning the object that contains a list of game characters.
content:
application/json:
schema:
$ref: '#/components/schemas/TupleWrapper'
'400':
description: Bad game character request.
'404':
description: Game character not found.
'500':
description: Service currently not available.
parameters:
- name: key
in: query
description: The game character key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The game character name to filter the response.
required: false
schema:
type: string
style: form
/gameseries:
get:
description: Gets a list of all the game series available in the database.
operationId: getGameSeries
responses:
'200':
description: Successful response returning the object that contains a list of game series.
content:
application/json:
schema:
$ref: '#/components/schemas/TupleWrapper'
'400':
description: Bad game series request.
'404':
description: Game series not found.
'500':
description: Service currently not available.
parameters:
- name: key
in: query
description: The game series key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The game series name to filter the response.
required: false
schema:
type: string
style: form
/type:
get:
description: Gets a list of all the Amiibo types available in the database.
operationId: getAmiiboTypes
responses:
'200':
description: Successful response returning the object that contains a list of Amiibo types.
content:
application/json:
schema:
$ref: '#/components/schemas/TupleWrapper'
'400':
description: Bad Amiibo type request.
'404':
description: Amiibo type not found.
'500':
description: Service currently not available.
parameters:
- name: key
in: query
description: The Amiibo type key to filter the response.
required: false
schema:
type: string
style: form
- name: name
in: query
description: The Amiibo type name to filter the response.
required: false
schema:
type: string
style: form
/lastupdated:
get:
description: Gets a timestamp when the Amiibo data was last updated.
operationId: getLastUpdated
responses:
'200':
description: Successful response returning the object that contains the date and time when the database was last updated.
content:
application/json:
schema:
$ref: '#/components/schemas/LastUpdated'
components:
schemas:
Amiibo:
type: object
properties:
amiiboSeries:
type: string
character:
type: string
gameSeries:
type: string
games3DS:
type: array
items:
$ref: '#/components/schemas/AmiiboGame'
gamesSwitch:
type: array
items:
$ref: '#/components/schemas/AmiiboGame'
gamesWiiU:
type: array
items:
$ref: '#/components/schemas/AmiiboGame'
head:
type: string
image:
type: string
name:
type: string
release:
type: object
$ref: '#/components/schemas/AmiiboRelease'
tail:
type: string
type:
type: string
required:
- amiiboSeries
- character
- gameSeries
- head
- image
- name
- release
- tail
- type
AmiiboGame:
type: object
properties:
amiiboUsage:
type: array
items:
$ref: '#/components/schemas/AmiiboUsage'
gameID:
type: array
items:
type: string
gameName:
type: string
required:
- gameID
- gameName
AmiiboList:
type: array
items:
$ref: '#/components/schemas/Amiibo'
AmiiboRelease:
type: object
properties:
au:
type: string
format: date-time
eu:
type: string
format: date-time
jp:
type: string
format: date-time
na:
type: string
format: date-time
AmiiboUsage:
type: object
properties:
Usage:
type: string
write:
type: boolean
required:
- Usage
- write
AmiiboWrapper:
type: object
properties:
amiibo:
oneOf:
- $ref: '#/components/schemas/Amiibo'
- $ref: '#/components/schemas/AmiiboList'
required:
- amiibo
LastUpdated:
type: object
properties:
lastUpdated:
type: string
format: date-time
required:
- lastUpdated
Tuple:
type: object
properties:
key:
type: string
name:
type: string
required:
- key
- name
TupleList:
type: array
items:
$ref: '#/components/schemas/Tuple'
TupleWrapper:
type: object
properties:
amiibo:
oneOf:
- $ref: '#/components/schemas/Tuple'
- $ref: '#/components/schemas/TupleList'
required:
- amiibo
@@ -0,0 +1,701 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import AmiiboService
import Foundation
import Testing
@Suite("Amiibo Service", .tags(.live))
struct AmiiboServiceLiveTests {
// MARK: Properties
private let service: AmiiboService
// MARK: Initializers
init() {
self.service = .init()
}
// MARK: Functions tests
#if swift(>=6.2)
@Test(arguments: zip(
Input.amiibos,
Output.amiibos
))
func `get amiibos`(
filter: AmiiboFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiibos(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.amiibosThrows,
Output.amiibosThrows
))
func `get amiibos throws`(
filter: AmiiboFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiibosThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.amiiboSeries,
Output.amiiboSeries
))
func `get amiibo series`(
filter: AmiiboSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboSeries(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.amiiboSeriesThrows,
Output.amiiboSeriesThrows
))
func `get amiibo series throws`(
filter: AmiiboSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboSeriesThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.amiiboTypes,
Output.amiiboTypes
))
func `get amiibo types`(
filter: AmiiboTypeFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboTypes(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.amiiboTypesThrows,
Output.amiiboTypesThrows
))
func `get amiibo types throws`(
filter: AmiiboTypeFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboTypesThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.gameCharacters,
Output.gameCharacters
))
func `get game characters`(
filter: GameCharacterFilter,
expects numberOfItems: Int
) async throws {
try await assertGameCharacters(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.gameCharactersThrows,
Output.gameCharactersThrows
))
func `get game characters throws`(
filter: GameCharacterFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameCharactersThrows(
error: error,
when: filter
)
}
@Test(arguments: zip(
Input.gameSeries,
Output.gameSeries
))
func `get game series`(
filter: GameSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertGameSeries(
with: filter,
expects: numberOfItems
)
}
@Test(arguments: zip(
Input.gameSeriesThrows,
Output.gameSeriesThrows
))
func `get game series throws`(
filter: GameSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameSeriesThrows(
error: error,
when: filter
)
}
@Test
func `get the last updated timestamp`() async throws {
try await assertLastUpdated(
day: 21,
month: 9,
year: 2025
)
}
#else
@Test("get amiibos", arguments: zip(
Input.amiibos,
Output.amiibos
))
func getAmiibos(
filter: AmiiboFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiibos(
with: filter,
expects: numberOfItems
)
}
@Test("get amiibos throws", arguments: zip(
Input.amiibosThrows,
Output.amiibosThrows
))
func getAmiibosThrows(
filter: AmiiboFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiibosThrows(
error: error,
when: filter
)
}
@Test("get amiibo series", arguments: zip(
Input.amiiboSeries,
Output.amiiboSeries
))
func getAmiiboSeries(
filter: AmiiboSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboSeries(
with: filter,
expects: numberOfItems
)
}
@Test("get amiibo series throws", arguments: zip(
Input.amiiboSeriesThrows,
Output.amiiboSeriesThrows
))
func getAmiiboSeriesThrows(
filter: AmiiboSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboSeriesThrows(
error: error,
when: filter
)
}
@Test("get amiibo types", arguments: zip(
Input.amiiboTypes,
Output.amiiboTypes
))
func getAmiiboTypes(
filter: AmiiboTypeFilter,
expects numberOfItems: Int
) async throws {
try await assertAmiiboTypes(
with: filter,
expects: numberOfItems
)
}
@Test("get amiibo types throws", arguments: zip(
Input.amiiboTypesThrows,
Output.amiiboTypesThrows
))
func getAmiiboTypesThrows(
filter: AmiiboTypeFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsAmiiboTypesThrows(
error: error,
when: filter
)
}
@Test("get game characters", arguments: zip(
Input.gameCharacters,
Output.gameCharacters
))
func getGameCharacters(
filter: GameCharacterFilter,
expects numberOfItems: Int
) async throws {
try await assertGameCharacters(
with: filter,
expects: numberOfItems
)
}
@Test("get game characters throws", arguments: zip(
Input.gameCharactersThrows,
Output.gameCharactersThrows
))
func getGameCharactersThrows(
filter: GameCharacterFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameCharactersThrows(
error: error,
when: filter
)
}
@Test("get game series", arguments: zip(
Input.gameSeries,
Output.gameSeries
))
func getGameSeries(
filter: GameSeriesFilter,
expects numberOfItems: Int
) async throws {
try await assertGameSeries(
with: filter,
expects: numberOfItems
)
}
@Test("get game series throws", arguments: zip(
Input.gameSeriesThrows,
Output.gameSeriesThrows
))
func getGameSeriesThrows(
filter: GameSeriesFilter,
expects error: AmiiboServiceError
) async throws {
try await assertsGameSeriesThrows(
error: error,
when: filter
)
}
@Test("get last updated timestamp")
func getLastUpdated() async throws {
try await assertLastUpdated(
day: 21,
month: 9,
year: 2025
)
}
#endif
}
// MARK: - Assertions
private extension AmiiboServiceLiveTests {
// MARK: Functions
/// Asserts the number of items returned by the `amiibos` endpoint that matched a given filter.
/// - Parameters:
/// - filter: An amiibo filter type.
/// - numberOfItems: An expected number of items returned.
func assertAmiibos(
with filter: AmiiboFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let amiibos = try await service.getAmiibos(filter)
// THEN
#expect(amiibos.count == numberOfItems)
guard
!amiibos.isEmpty,
(filter.showGames == true || filter.showUsage == true)
else { return }
let firstAmiiboPlatform = try #require(amiibos.first?.platform)
#expect(amiibos.last?.platform != nil)
if filter.showUsage == true {
#expect(firstAmiiboPlatform.switch.first?.usages?.isEmpty == false)
#expect(firstAmiiboPlatform.threeDS.first?.usages?.isEmpty == false)
#expect(firstAmiiboPlatform.wiiU.first?.usages?.isEmpty == false)
}
}
/// Asserts the error thrown by the `amiibos` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: An amiibo filter type.
func assertsAmiibosThrows(
error: AmiiboServiceError,
when filter: AmiiboFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getAmiibos(filter)
}
}
/// Asserts the number of items returned by the `amiiboSeries` endpoint that matched a given filter.
/// - Parameters:
/// - filter: An amiibo series filter type.
/// - numberOfItems: An expected number of items returned.
func assertAmiiboSeries(
with filter: AmiiboSeriesFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let amiiboSeries = try await service.getAmiiboSeries(filter)
// THEN
#expect(amiiboSeries.count == numberOfItems)
}
/// Asserts the error thrown by the `amiiboSeries` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: An amiibo series filter type.
func assertsAmiiboSeriesThrows(
error: AmiiboServiceError,
when filter: AmiiboSeriesFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getAmiiboSeries(filter)
}
}
/// Asserts the number of items returned by the `amiiboTypes` endpoint that matched a given filter.
/// - Parameters:
/// - filter: An amiibo type filter type.
/// - numberOfItems: An expected number of items returned.
func assertAmiiboTypes(
with filter: AmiiboTypeFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let amiiboTypes = try await service.getAmiiboTypes(filter)
// THEN
#expect(amiiboTypes.count == numberOfItems)
}
/// Asserts the error thrown by the `amiiboTypes` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: An amiibo type filter type.
func assertsAmiiboTypesThrows(
error: AmiiboServiceError,
when filter: AmiiboTypeFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getAmiiboTypes(filter)
}
}
/// Asserts the number of items returned by the `gameCharacters` endpoint that matched a given filter.
/// - Parameters:
/// - filter: A game character filter type.
/// - numberOfItems: An expected number of items returned.
func assertGameCharacters(
with filter: GameCharacterFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let gameCharacters = try await service.getGameCharacters(filter)
// THEN
#expect(gameCharacters.count == numberOfItems)
}
/// Asserts the error thrown by the `gameCharacters` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: A game character filter type.
func assertsGameCharactersThrows(
error: AmiiboServiceError,
when filter: GameCharacterFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getGameCharacters(filter)
}
}
/// Asserts the number of items returned by the `gameSeries` endpoint that matched a given filter.
/// - Parameters:
/// - filter: A game series filter type.
/// - numberOfItems: An expected number of items returned.
func assertGameSeries(
with filter: GameSeriesFilter,
expects numberOfItems: Int
) async throws {
// GIVEN
// WHEN
let gameSeries = try await service.getGameSeries(filter)
// THEN
#expect(gameSeries.count == numberOfItems)
}
/// Asserts the error thrown by the `gameSeries` endpoint.
/// - Parameters:
/// - error: An expected error.
/// - filter: A game series filter type.
func assertsGameSeriesThrows(
error: AmiiboServiceError,
when filter: GameSeriesFilter
) async throws {
// GIVEN
// WHEN
// THEN
await #expect(throws: error) {
try await service.getGameSeries(filter)
}
}
/// Asserts the date returned by the `lastUpdated` endpoint.
/// - Parameters:
/// - day: A number of day of the last updated date.
/// - month: A number of month of the last updated date.
/// - year: A number of year of the last updated date.
func assertLastUpdated(
day: Int,
month: Int,
year: Int
) async throws {
// GIVEN
// WHEN
let dateLastUpdated = try await service.getLastUpdated()
// THEN
let dateComponents = Calendar.current.dateComponents(
[.year, .month, .day],
from: dateLastUpdated
)
#expect(dateComponents.year == year)
#expect(dateComponents.month == month)
#expect(dateComponents.day == day)
}
}
// MARK: - Arguments
enum Input {
/// A list of amiibo filters to input to the `assertAmiibos` assertion.
static let amiibos: [AmiiboFilter] = [
.init(),
.init(head: "00000000"),
.init(head: "0000"),
.init(tail: "00000002"),
.init(tail: "0002"),
.init(identifier: "0000000000000002"),
.init(name: "zelda"),
.init(name: "Something"),
.init(name: "zel"),
.init(name: .empty),
.init(type: "0x00"),
.init(type: "Figure"),
.init(type: "0x0f"),
.init(type: "something"),
.init(type: "fig"),
.init(type: .empty),
.init(series: "0x00"),
.init(series: "Legend of Zelda"),
.init(series: "0xf9"),
.init(series: "something"),
.init(series: "fig"),
.init(series: .empty),
.init(gameCharacter: "0x00"),
.init(gameCharacter: "Zelda"),
.init(gameCharacter: "0xf9"),
.init(gameCharacter: "something"),
.init(gameCharacter: "fig"),
.init(gameCharacter: .empty),
.init(gameSeries: "0x00"),
.init(gameSeries: "Legend of Zelda"),
.init(gameSeries: "0xf9"),
.init(gameSeries: "something"),
.init(gameSeries: "Super"),
.init(gameSeries: .empty),
.init(showGames: true),
.init(showUsage: true)
]
/// A list of amiibo series filters to input to the `assertAmiibosThrows` assertion.
static let amiibosThrows: [AmiiboFilter] = [
.init(head: .empty),
.init(tail: .empty),
.init(identifier: "0000000000000000"),
.init(identifier: "0000000"),
.init(identifier: .empty),
.init(type: "0x"),
.init(series: "0x"),
.init(gameCharacter: "0x"),
.init(gameSeries: "0x"),
]
/// A list of amiibo series filters to input to the `assertAmiiboSeries` assertion.
static let amiiboSeries: [AmiiboSeriesFilter] = [
.init(),
.init(key: "0x01"),
.init(name: "Legend of Zelda"),
.init(name: "Zelda"),
.init(name: .empty)
]
/// A list of amiibo series filters to input to the `assertAmiiboSeriesThrows` assertion.
static let amiiboSeriesThrows: [AmiiboSeriesFilter] = [
.init(key: "0xf9"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
/// A list of amiibo type filters to input to the `assertAmiiboTypes` assertion.
static let amiiboTypes: [AmiiboTypeFilter] = [
.init(),
.init(key: "0x01"),
.init(name: "Card"),
.init(name: "Ca"),
.init(name: .empty)
]
/// A list of amiibo type filters to input to the `assertAmiiboTypesThrows` assertion.
static let amiiboTypesThrows: [AmiiboTypeFilter] = [
.init(key: "0x09"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
/// A list of game character filters to input to the `assertGameCharacters` assertion.
static let gameCharacters: [GameCharacterFilter] = [
.init(),
.init(key: "0x0001"),
.init(name: "Zelda"),
.init(name: "Zeld"),
.init(name: .empty)
]
/// A list of game character filters to input to the `assertGameCharactersThrows` assertion.
static let gameCharactersThrows: [GameCharacterFilter] = [
.init(key: "0xffff"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
/// A list of game series filters to input to the `assertGameSeries` assertion.
static let gameSeries: [GameSeriesFilter] = [
.init(),
.init(key: "0x001"),
.init(name: "Pikmin"),
.init(name: "Pik"),
.init(name: .empty)
]
/// A list of game series filters to input to the `assertGameSeriesThrows` assertion.
static let gameSeriesThrows: [GameSeriesFilter] = [
.init(key: "0xffff"),
.init(key: "0x"),
.init(key: .empty),
.init(name: "Something")
]
}
enum Output {
/// A list of number of items that are expected from the `assertAmiibos` assertion.
static let amiibos: [Int] = [.totalAmiibos, 7, 7, 1, 1, 1, 5, .zero, 7, .totalAmiibos, 235, 235, .zero, .zero, .zero, .zero, 96, 26, .zero, .zero, 25, .totalAmiibos, 12, 6, .zero, .zero, .zero, .totalAmiibos, 49, 32, .zero, .zero, 147, .totalAmiibos, .totalAmiibos, .totalAmiibos]
/// A list of errors are expected to be thrown from the `assertAmiibosThrows` assertion.
static let amiibosThrows: [AmiiboServiceError] = [.badRequest, .badRequest, .decoding, .decoding, .badRequest, .badRequest, .badRequest, .badRequest, .badRequest]
/// A list of number of items that are expected from the `assertAmiiboSeries` assertion.
static let amiiboSeries: [Int] = [.totalAmiiboSeries, 1, 1, 1, .totalAmiiboSeries]
/// A list of errors are expected to be thrown from the `assertAmiiboSeriesThrows` assertion.
static let amiiboSeriesThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
/// A list of number of items that are expected from the `assertAmiiboTypes` assertion.
static let amiiboTypes: [Int] = [.totalAmiiboTypes, 1, 1, 1, .totalAmiiboTypes]
/// A list of errors are expected to be thrown from the `assertAmiiboTypesThrows` assertion.
static let amiiboTypesThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
/// A list of number of items that are expected from the `assertGameCharacters` assertion.
static let gameCharacters: [Int] = [.totalGameCharacters, 1, 1, 1, .totalGameCharacters]
/// A list of errors are expected to be thrown from the `assertGameCharactersThrows` assertion.
static let gameCharactersThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
/// A list of number of items that are expected from the `assertGameSeries` assertion.
static let gameSeries: [Int] = [.totalGameSeries, 1, 1, 1, .totalGameSeries]
/// A list of errors are expected to be thrown from the `assertGameSeriesThrows` assertion.
static let gameSeriesThrows: [AmiiboServiceError] = [.notFound, .badRequest, .badRequest, .notFound]
}
// MARK: - Constants
private extension Int {
/// A number that represents the total number of amiibo items currently available at the live service.
static let totalAmiibos = 889
/// A number that represents the total number of amiibo series currently available at the live service.
static let totalAmiiboSeries = 29
/// A number that represents the total number of amiibo types currently available at the live service.
static let totalAmiiboTypes = 5
/// A number that represents the total number of game characters currently available at the live service.
static let totalGameCharacters = 668
/// A number that represents the total number of game series currently available at the live service.
static let totalGameSeries = 117
}
private extension String {
/// An empty string.
static let empty = ""
}
@@ -0,0 +1,245 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
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 fetchAmiibosIfAny()
}
func getAmiiboSeries(
by filter: AmiiboSeriesFilter
) async throws(AmiiboServiceError) -> [AmiiboSeries] {
try fetchAmiiboSeriesIfAny()
}
func getAmiiboTypes(
by filter: AmiiboTypeFilter
) async throws(AmiiboServiceError) -> [AmiiboType] {
try fetchAmiiboTypesIfAny()
}
func getGameCharacters(
by filter: GameCharacterFilter
) async throws(AmiiboServiceError) -> [GameCharacter] {
try fetchGameCharactersIfAny()
}
func getGameSeries(
by filter: GameSeriesFilter
) async throws(AmiiboServiceError) -> [GameSeries] {
try fetchGameSeriesIfAny()
}
func getLastUpdated() async throws(AmiiboServiceError) -> Date {
fetchLastUpdatedIfAny()
}
#else
func getAmiibos(
by filter: AmiiboFilter
) async throws -> [Amiibo] {
try fetchAmiibosIfAny()
}
func getAmiiboSeries(
by filter: AmiiboSeriesFilter
) async throws -> [AmiiboSeries] {
try fetchAmiiboSeriesIfAny()
}
func getAmiiboTypes(
by filter: AmiiboTypeFilter
) async throws -> [AmiiboType] {
try fetchAmiiboTypesIfAny()
}
func getGameCharacters(
by filter: GameCharacterFilter
) async throws -> [GameCharacter] {
try fetchGameCharactersIfAny()
}
func getGameSeries(
by filter: GameSeriesFilter
) async throws -> [GameSeries] {
try fetchGameSeriesIfAny()
}
func getLastUpdated() async throws -> Date {
try fetchLastUpdatedIfAny()
}
#endif
}
// MARK: - Helpers
private extension AmiiboMockClient {
// MARK: Functions
/// Fetches a list of amiibo items, if any.
/// - Returns: A list of amiibo items.
/// - Throws: An ``AmiiboServiceError`` error in case an error has been provided.
func fetchAmiibosIfAny() throws -> [Amiibo] {
try throwErrorIfExists()
guard let amiibos else {
throw AmiiboServiceError.notFound
}
return amiibos
}
/// Fetches a list of amiibo series, if any.
/// - Returns: A list of amiibo series.
/// - Throws: An ``AmiiboServiceError`` error in case an error has been provided.
func fetchAmiiboSeriesIfAny() throws -> [AmiiboSeries] {
try throwErrorIfExists()
guard let amiiboSeries else {
throw AmiiboServiceError.notFound
}
return amiiboSeries
}
/// Fetches a list of amiibo types, if any.
/// - Returns: A list of amiibo types.
/// - Throws: An ``AmiiboServiceError`` error in case an error has been provided.
func fetchAmiiboTypesIfAny() throws -> [AmiiboType] {
try throwErrorIfExists()
guard let amiiboTypes else {
throw AmiiboServiceError.notFound
}
return amiiboTypes
}
/// Fetches a list of game characters, if any.
/// - Returns: A list of game characters.
/// - Throws: An ``AmiiboServiceError`` error in case an error has been provided.
func fetchGameCharactersIfAny() throws -> [GameCharacter] {
try throwErrorIfExists()
guard let gameCharacters else {
throw AmiiboServiceError.notFound
}
return gameCharacters
}
/// Fetches a list of game series, if any.
/// - Returns: A list of game series, if any.
/// - Throws: An ``AmiiboServiceError`` error in case an error has been provided.
func fetchGameSeriesIfAny() throws -> [GameSeries] {
try throwErrorIfExists()
guard let gameSeries else {
throw AmiiboServiceError.notFound
}
return gameSeries
}
/// Fetches a last updated date, if any.
/// - Returns: A last updated date.
/// - Throws: An ``AmiiboServiceError`` error in case an error has been provided.
func fetchLastUpdatedIfAny() throws -> Date {
try throwErrorIfExists()
guard let lastUpdated else {
throw AmiiboServiceError.notFound
}
return lastUpdated
}
/// 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
}
}
}
@@ -0,0 +1,24 @@
// ===----------------------------------------------------------------------===
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of Amiibo Service project authors
//
// SPDX-License-Identifier: Apache-2.0
//
// ===----------------------------------------------------------------------===
import Testing
extension Tag {
// MARK: Properties
/// Tag that indicates tests against a live backend service.
@Tag static var live: Self
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"identifiers","kind":"identifier"},{"text":": [","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}]}],"kind":"declarations"}],"metadata":{"symbolKind":"property","modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V4GameV11identifiersSaySSGvp","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifiers"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"]"}],"title":"identifiers","role":"symbol"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/identifiers","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","abstract":[{"text":"A list of identifiers.","type":"text"}],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/identifiers"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","role":"symbol","kind":"symbol","type":"topic","title":"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":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/identifiers":{"url":"\/documentation\/amiiboservice\/amiibo\/game\/identifiers","type":"topic","abstract":[{"text":"A list of identifiers.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/identifiers","title":"identifiers","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"identifiers","kind":"identifier"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"]"}],"kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","kind":"symbol","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Game","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibo\/game","navigatorTitle":[{"text":"Game","kind":"identifier"}],"title":"Amiibo.Game","abstract":[{"type":"text","text":"A model that represents a game related to an amiibo item."}],"role":"symbol"}}}
@@ -0,0 +1 @@
{"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"type":"text","text":"A name."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/name"},"metadata":{"roleHeading":"Instance Property","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"name","externalID":"s:13AmiiboService0A0V4GameV4nameSSvp","symbolKind":"property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}]},"sections":[],"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/game\/name"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/name":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/name","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"name","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"abstract":[{"text":"A name.","type":"text"}],"kind":"symbol","type":"topic","role":"symbol","title":"name","url":"\/documentation\/amiiboservice\/amiibo\/game\/name"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","role":"symbol","kind":"symbol","type":"topic","title":"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/Game":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","kind":"symbol","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Game","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibo\/game","navigatorTitle":[{"text":"Game","kind":"identifier"}],"title":"Amiibo.Game","abstract":[{"type":"text","text":"A model that represents a game related to an amiibo item."}],"role":"symbol"}}}
@@ -0,0 +1 @@
{"metadata":{"symbolKind":"property","role":"symbol","title":"usages","roleHeading":"Instance Property","modules":[{"name":"AmiiboService"}],"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":"]?"}],"externalID":"s:13AmiiboService0A0V4GameV6usagesSayAC5UsageVGSgvp"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/usages"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/game\/usages"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game"]]},"sections":[],"abstract":[{"text":"A list of amiibo usages, if any.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"usages"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"Amiibo","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","preciseIdentifier":"s:13AmiiboService0A0V"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Usage","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","preciseIdentifier":"s:13AmiiboService0A0V5UsageV"},{"kind":"text","text":"]?"}],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game/usages":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game\/usages","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"usages","kind":"identifier"},{"text":": [","kind":"text"},{"text":"Amiibo","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V"},{"text":".","kind":"text"},{"text":"Usage","kind":"typeIdentifier","preciseIdentifier":"s:13AmiiboService0A0V5UsageV"},{"text":"]?","kind":"text"}],"abstract":[{"text":"A list of amiibo usages, if any.","type":"text"}],"kind":"symbol","type":"topic","role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/game\/usages","title":"usages"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"type":"topic","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Usage"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage","navigatorTitle":[{"kind":"identifier","text":"Usage"}],"title":"Amiibo.Usage","abstract":[{"type":"text","text":"A model that represents the usage of an amiibo item within a certain game."}],"role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Game":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Game","kind":"symbol","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Game","kind":"identifier"}],"url":"\/documentation\/amiiboservice\/amiibo\/game","navigatorTitle":[{"text":"Game","kind":"identifier"}],"title":"Amiibo.Game","abstract":[{"type":"text","text":"A model that represents a game related to an amiibo item."}],"role":"symbol"}}}
@@ -0,0 +1 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameCharacter"},"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"gameCharacter"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V13gameCharacterSSvp","role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"gameCharacter"},"abstract":[{"text":"A game character.","type":"text"}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/gamecharacter"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"platforms":["macOS"],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/gameCharacter":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameCharacter","role":"symbol","kind":"symbol","type":"topic","title":"gameCharacter","abstract":[{"text":"A game character.","type":"text"}],"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"gameCharacter","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"url":"\/documentation\/amiiboservice\/amiibo\/gamecharacter"}}}
@@ -0,0 +1 @@
{"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"gameSeries"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameSeries"},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"text":"A game series.","type":"text"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"gameSeries","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V10gameSeriesSSvp","role":"symbol","title":"gameSeries","symbolKind":"property","roleHeading":"Instance Property"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/gameseries"]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/gameSeries":{"kind":"symbol","type":"topic","abstract":[{"type":"text","text":"A game series."}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/gameSeries","url":"\/documentation\/amiiboservice\/amiibo\/gameseries","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"gameSeries"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"role":"symbol","title":"gameSeries"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","role":"symbol","kind":"symbol","type":"topic","title":"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":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"head"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V4headSSvp","role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"head"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/head","interfaceLanguage":"swift"},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"The first 8 hexadecimal characters of an identifier."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"head"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/head"]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/head":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/head","kind":"symbol","role":"symbol","title":"head","abstract":[{"type":"text","text":"The first 8 hexadecimal characters of an identifier."}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"head"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"url":"\/documentation\/amiiboservice\/amiibo\/head","type":"topic"}}}
@@ -0,0 +1 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/identifier"},"metadata":{"roleHeading":"Instance Property","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"identifier","externalID":"s:13AmiiboService0A0V10identifierSSvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}]},"abstract":[{"type":"text","text":"An identifier."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/identifier"]}],"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/identifier":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/identifier","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"identifier","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"An identifier."}],"kind":"symbol","type":"topic","role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/identifier","title":"identifier"}}}
@@ -0,0 +1 @@
{"metadata":{"symbolKind":"property","role":"symbol","title":"image","roleHeading":"Instance Property","modules":[{"name":"AmiiboService"}],"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"image","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"externalID":"s:13AmiiboService0A0V5imageSSvp"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/image"},"kind":"symbol","variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/image"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"text":"An image link.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"image","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]}],"kind":"declarations"}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/image":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/image","role":"symbol","kind":"symbol","type":"topic","title":"image","abstract":[{"text":"An image link.","type":"text"}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"image"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"url":"\/documentation\/amiiboservice\/amiibo\/image"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"}}}
@@ -0,0 +1 @@
{"metadata":{"modules":[{"name":"AmiiboService"}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"imageURL"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation3URLV","text":"URL"},{"kind":"text","text":"?"}],"roleHeading":"Instance Property","externalID":"s:13AmiiboService0A0V8imageURL10Foundation0D0VSgvp","title":"imageURL","symbolKind":"property","role":"symbol"},"sections":[],"kind":"symbol","identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/imageURL","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"type":"text","text":"A URL related to an image link, if any."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/imageurl"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"imageURL"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation3URLV","text":"URL"},{"kind":"text","text":"? { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/imageURL":{"url":"\/documentation\/amiiboservice\/amiibo\/imageurl","type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/imageURL","title":"imageURL","abstract":[{"type":"text","text":"A URL related to an image link, if any."}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"imageURL"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation3URLV","text":"URL"},{"kind":"text","text":"?"}],"kind":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"}}}
@@ -0,0 +1 @@
{"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/name","interfaceLanguage":"swift"},"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"name","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V4nameSSvp","role":"symbol","title":"name","symbolKind":"property","roleHeading":"Instance Property"},"abstract":[{"text":"An amiibo name.","type":"text"}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/name"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/name":{"title":"name","kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/name","fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"name"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/name","type":"topic","abstract":[{"text":"An amiibo name.","type":"text"}],"role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"}}}
@@ -0,0 +1 @@
{"metadata":{"symbolKind":"property","role":"symbol","title":"platform","roleHeading":"Instance Property","modules":[{"name":"AmiiboService"}],"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":"?"}],"externalID":"s:13AmiiboService0A0V8platformAC8PlatformVSgvp"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/platform-swift.property"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/platform-swift.property"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"sections":[],"abstract":[{"type":"text","text":"A game platform type, if any."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"platform"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Platform-swift.struct","text":"Platform","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV"},{"kind":"text","text":"?"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/platform-swift.property":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/platform-swift.property","role":"symbol","kind":"symbol","type":"topic","title":"platform","abstract":[{"type":"text","text":"A game platform type, if any."}],"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"platform","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Platform","preciseIdentifier":"s:13AmiiboService0A0V8PlatformV","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"url":"\/documentation\/amiiboservice\/amiibo\/platform-swift.property"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Platform-swift.struct":{"navigatorTitle":[{"text":"Platform","kind":"identifier"}],"title":"Amiibo.Platform","kind":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/platform-swift.struct","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Platform","kind":"identifier"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Platform-swift.struct","type":"topic","abstract":[{"type":"text","text":"A model that represents a collection of "},{"code":"WiiU","type":"codeVoice"},{"type":"text","text":", "},{"code":"3DS","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Switch","type":"codeVoice"},{"type":"text","text":" games related to an amiibo item."}],"role":"symbol"}}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"release"},{"kind":"text","text":": "},{"preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier","text":"Amiibo"},{"text":".","kind":"text"},{"text":"Release","preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","kind":"typeIdentifier"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V7releaseAC7ReleaseVvp","role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"release"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/release-swift.property","interfaceLanguage":"swift"},"abstract":[{"text":"A release date.","type":"text"}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.property"]}],"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"release"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","text":"Release","preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/release-swift.property":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/release-swift.property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"release","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Amiibo","preciseIdentifier":"s:13AmiiboService0A0V","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Release","preciseIdentifier":"s:13AmiiboService0A0V7ReleaseV","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"A release date."}],"kind":"symbol","type":"topic","role":"symbol","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.property","title":"release"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Release"}],"navigatorTitle":[{"text":"Release","kind":"identifier"}],"abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"kind":"symbol","type":"topic","role":"symbol","title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct"}}}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"america"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation4DateV","kind":"typeIdentifier","text":"Date"},{"kind":"text","text":"?"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V7ReleaseV7america10Foundation4DateVSgvp","role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"america"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/america","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A release date for North America, if any."}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/america"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"america"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/america":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/america","role":"symbol","kind":"symbol","type":"topic","title":"america","abstract":[{"text":"A release date for North America, if any.","type":"text"}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"america"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}],"url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/america"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Release"}],"navigatorTitle":[{"text":"Release","kind":"identifier"}],"abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"kind":"symbol","type":"topic","role":"symbol","title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"}}}
@@ -0,0 +1 @@
{"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/australia","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/australia"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"australia","kind":"identifier"},{"kind":"text","text":": "},{"text":"Date","preciseIdentifier":"s:10Foundation4DateV","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"languages":["swift"]}]}],"abstract":[{"text":"A release date for Australia, if any.","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"modules":[{"name":"AmiiboService"}],"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"australia","kind":"identifier"},{"kind":"text","text":": "},{"text":"Date","kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV"},{"text":"?","kind":"text"}],"externalID":"s:13AmiiboService0A0V7ReleaseV9australia10Foundation4DateVSgvp","roleHeading":"Instance Property","title":"australia","symbolKind":"property","role":"symbol"},"sections":[],"references":{"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Release"}],"navigatorTitle":[{"text":"Release","kind":"identifier"}],"abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"kind":"symbol","type":"topic","role":"symbol","title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/australia":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/australia","kind":"symbol","role":"symbol","title":"australia","abstract":[{"type":"text","text":"A release date for Australia, if any."}],"fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"australia"},{"kind":"text","text":": "},{"text":"Date","preciseIdentifier":"s:10Foundation4DateV","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"type":"topic","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/australia"}}}
@@ -0,0 +1 @@
{"metadata":{"symbolKind":"property","role":"symbol","title":"europe","roleHeading":"Instance Property","modules":[{"name":"AmiiboService"}],"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"europe"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation4DateV","kind":"typeIdentifier","text":"Date"},{"kind":"text","text":"?"}],"externalID":"s:13AmiiboService0A0V7ReleaseV6europe10Foundation4DateVSgvp"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/europe","interfaceLanguage":"swift"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/europe"]}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"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 Europe, if any."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"europe"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation4DateV","kind":"typeIdentifier","text":"Date"},{"kind":"text","text":"?"}]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/europe":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/europe","role":"symbol","kind":"symbol","type":"topic","title":"europe","abstract":[{"type":"text","text":"A release date for Europe, if any."}],"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":"?"}],"url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/europe"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Release"}],"navigatorTitle":[{"text":"Release","kind":"identifier"}],"abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"kind":"symbol","type":"topic","role":"symbol","title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"japan"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation4DateV","kind":"typeIdentifier","text":"Date"},{"kind":"text","text":"?"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V7ReleaseV5japan10Foundation4DateVSgvp","role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"japan"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/japan","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A release date for Japan, if any."}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"paths":["\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/japan"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"japan"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Date","preciseIdentifier":"s:10Foundation4DateV"},{"kind":"text","text":"?"}]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct/japan":{"type":"topic","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct\/japan","kind":"symbol","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"japan"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation4DateV","text":"Date"},{"kind":"text","text":"?"}],"url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct\/japan","title":"japan","abstract":[{"text":"A release date for Japan, if any.","type":"text"}],"role":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Release-swift.struct":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Release-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Release"}],"navigatorTitle":[{"text":"Release","kind":"identifier"}],"abstract":[{"type":"text","text":"A model that represents a collection of release dates related to an amiibo item."}],"kind":"symbol","type":"topic","role":"symbol","title":"Amiibo.Release","url":"\/documentation\/amiiboservice\/amiibo\/release-swift.struct"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"series"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V6seriesSSvp","role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"series"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/series","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"An amiibo series."}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/series"]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"series"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}]}]}],"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/series":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/series","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"series"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"abstract":[{"type":"text","text":"An amiibo series."}],"kind":"symbol","type":"topic","role":"symbol","title":"series","url":"\/documentation\/amiiboservice\/amiibo\/series"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"}}}
@@ -0,0 +1 @@
{"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"tail","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"modules":[{"name":"AmiiboService"}],"externalID":"s:13AmiiboService0A0V4tailSSvp","role":"symbol","roleHeading":"Instance Property","title":"tail","symbolKind":"property"},"identifier":{"url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/tail","interfaceLanguage":"swift"},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"The last 8 hexadecimal characters of an identifier.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"tail","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/tail"]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/tail":{"kind":"symbol","type":"topic","abstract":[{"text":"The last 8 hexadecimal characters of an identifier.","type":"text"}],"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/tail","url":"\/documentation\/amiiboservice\/amiibo\/tail","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"tail"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"role":"symbol","title":"tail"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","role":"symbol","kind":"symbol","type":"topic","title":"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":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"}}}
@@ -0,0 +1 @@
{"metadata":{"title":"type","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"type","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"modules":[{"name":"AmiiboService"}],"roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:13AmiiboService0A0V4typeSSvp"},"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/type"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo"]]},"abstract":[{"text":"An amiibo type.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/type"]}],"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"}],"platforms":["macOS"]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/type":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/type","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"type","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"abstract":[{"text":"An amiibo type.","type":"text"}],"kind":"symbol","type":"topic","role":"symbol","title":"type","url":"\/documentation\/amiiboservice\/amiibo\/type"}}}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"metadata":{"modules":[{"name":"AmiiboService"}],"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"explanation","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"externalID":"s:13AmiiboService0A0V5UsageV11explanationSSvp","roleHeading":"Instance Property","title":"explanation","symbolKind":"property","role":"symbol"},"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/explanation"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"]]},"abstract":[{"type":"text","text":"An explanation of how to use an amiibo item."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/usage\/explanation"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"explanation","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}]}]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage/explanation":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/explanation","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"explanation"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage\/explanation","title":"explanation","abstract":[{"type":"text","text":"An explanation of how to use an amiibo item."}],"role":"symbol"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"type":"topic","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Usage"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage","navigatorTitle":[{"kind":"identifier","text":"Usage"}],"title":"Amiibo.Usage","abstract":[{"type":"text","text":"A model that represents the usage of an amiibo item within a certain game."}],"role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","role":"symbol","kind":"symbol","type":"topic","title":"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 @@
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/isWriteable"},"metadata":{"roleHeading":"Instance Property","modules":[{"name":"AmiiboService"}],"role":"symbol","title":"isWriteable","externalID":"s:13AmiiboService0A0V5UsageV11isWriteableSbvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"isWriteable"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}]},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AmiiboService\/documentation\/AmiiboService","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"A flag that indicates whether an amiibo item can save game data in it."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"isWriteable"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/amiiboservice\/amiibo\/usage\/iswriteable"]}],"references":{"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage":{"type":"topic","kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Usage"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage","navigatorTitle":[{"kind":"identifier","text":"Usage"}],"title":"Amiibo.Usage","abstract":[{"type":"text","text":"A model that represents the usage of an amiibo item within a certain game."}],"role":"symbol"},"doc://AmiiboService/documentation/AmiiboService/Amiibo":{"role":"symbol","type":"topic","url":"\/documentation\/amiiboservice\/amiibo","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Amiibo","kind":"identifier"}],"abstract":[{"text":"A model that represents an amiibo item.","type":"text"}],"navigatorTitle":[{"text":"Amiibo","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo","title":"Amiibo"},"doc://AmiiboService/documentation/AmiiboService/Amiibo/Usage/isWriteable":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService\/Amiibo\/Usage\/isWriteable","kind":"symbol","role":"symbol","title":"isWriteable","abstract":[{"type":"text","text":"A flag that indicates whether an amiibo item can save game data in it."}],"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isWriteable","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"url":"\/documentation\/amiiboservice\/amiibo\/usage\/iswriteable","type":"topic"},"doc://AmiiboService/documentation/AmiiboService":{"identifier":"doc:\/\/AmiiboService\/documentation\/AmiiboService","abstract":[{"text":"A library that provides everything the developer needs to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Amiibo API"}]},{"type":"text","text":" backend service."}],"kind":"symbol","type":"topic","role":"collection","url":"\/documentation\/amiiboservice","title":"AmiiboService"}}}
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