Overall improvements and data update (#22)

This PR contains the work done to update the live tests to the latest data plus lots of QoL improvements to the library, including:

* added test cases to test the ``AmiiboService` locally;
* conformed the models to the `Hashable` protocol;
* documented the use of caching with the `AmiiboService` service;
* updated the reference to the new AmiiboAPI url;
* updated the year on the copyrights and header files;
* updated the overall documentation of the source code and the package.

Reviewed-on: #22
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #22.
This commit is contained in:
2026-03-22 23:39:48 +00:00
committed by Javier Cicchelli
parent fae4b44698
commit 2b01ec14bf
375 changed files with 1177 additions and 700 deletions
@@ -2,7 +2,7 @@
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Copyright (c) 2026 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
@@ -14,17 +14,17 @@
extension Amiibo {
/// A model that represents a game related to an amiibo.
public struct Game: Sendable {
public struct Game: Sendable, Hashable {
// MARK: Properties
/// A list of identifiers.
/// A list of game identifiers associated with this game.
public let identifiers: [String]
/// A name.
/// The name of this game.
public let name: String
/// A list of amiibo usages, if any.
/// A list of amiibo usages within this game, if available.
public let usages: [Usage]?
// MARK: Initializers
@@ -2,7 +2,7 @@
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Copyright (c) 2026 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
@@ -13,8 +13,8 @@
// ===----------------------------------------------------------------------===
extension Amiibo {
/// A model that represents a collection of `Switch`, `Switch 2`, `3DS`, and `WiiU` games related to an amiibo.
public struct Platform: Sendable {
/// A model that represents a collection of `Switch`, `Switch 2`, `3DS`, and `Wii U` games related to an amiibo.
public struct Platform: Sendable, Hashable {
// MARK: Properties
@@ -27,7 +27,7 @@ extension Amiibo {
/// A list of `3DS` games related to an amiibo.
public let threeDS: [Game]
/// A list of `WiiU` games related to an amiibo.
/// A list of `Wii U` games related to an amiibo.
public let wiiU: [Game]
// MARK: Initializers
@@ -40,7 +40,7 @@ extension Amiibo {
/// - switch: A list of `Switch` games related to an amiibo, if any.
/// - switch2: A list of `Switch 2` games related to an amiibo, if any.
/// - threeDS: A list of `3DS` games related to an amiibo, if any.
/// - wiiU: A list of `WiiU` games related to an amiibo, if any.
/// - wiiU: A list of `Wii U` games related to an amiibo, if any.
init?(
_ `switch`: [Components.Schemas.AmiiboGame]?,
_ switch2: [Components.Schemas.AmiiboGame]?,
@@ -2,7 +2,7 @@
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Copyright (c) 2026 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
@@ -15,8 +15,8 @@
import Foundation
extension Amiibo {
/// A model that represents a collection of release dates related to an amiibo.
public struct Release: Sendable {
/// A model that represents the regional release dates of an amiibo.
public struct Release: Sendable, Hashable {
// MARK: Properties
@@ -2,7 +2,7 @@
//
// This source file is part of the Amiibo Service open source project
//
// Copyright (c) 2025 Röck+Cöde VoF. and the Amiibo Service project authors
// Copyright (c) 2026 Röck+Cöde VoF. and the Amiibo Service project authors
// Licensed under Apache license v2.0
//
// See LICENSE for license information
@@ -14,14 +14,14 @@
extension Amiibo {
/// A model that represents the usage of an amiibo within a certain game.
public struct Usage: Sendable {
public struct Usage: Sendable, Hashable {
// MARK: Properties
/// An explanation of how to use an amiibo.
/// A description of how the amiibo is used within the game.
public let explanation: String
/// A flag that indicates whether an amiibo can save game data in it.
/// A flag that indicates whether the amiibo can save game data.
public let isWriteable: Bool
// MARK: Initializers