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