Made Amiibo models Codable and Identifiable, and filters Hashable.
This commit is contained in:
1 parent
8fa4d50734
commit
a28842eb0a
24 files changed
+352
-190
No files matched your search
@@ -14,7 +14,7 @@
|
||||
|
||||
extension Amiibo {
|
||||
/// A model that represents a game related to an amiibo.
|
||||
public struct Game: Sendable, Hashable {
|
||||
public struct Game: Sendable, Hashable, Codable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
// ===----------------------------------------------------------------------===
|
||||
|
||||
extension Amiibo {
|
||||
/// A model that represents a collection of `Switch`, `Switch 2`, `3DS`, and `Wii U` games related to an amiibo.
|
||||
public struct Platform: Sendable, Hashable {
|
||||
/// A model that groups the games related to an amiibo by platform.
|
||||
public struct Platform: Sendable, Hashable, Codable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ extension Amiibo {
|
||||
/// A model that represents the regional release dates of an amiibo.
|
||||
///
|
||||
/// The service provides these dates as date-only values, which are decoded as midnight UTC.
|
||||
public struct Release: Sendable, Hashable {
|
||||
public struct Release: Sendable, Hashable, Codable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
extension Amiibo {
|
||||
/// A model that represents the usage of an amiibo within a certain game.
|
||||
public struct Usage: Sendable, Hashable {
|
||||
public struct Usage: Sendable, Hashable, Codable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// A description of how the amiibo is used within the game.
|
||||
public let explanation: String
|
||||
|
||||
/// A flag that indicates whether the amiibo can save game data.
|
||||
/// Whether the amiibo can save game data.
|
||||
public let isWriteable: Bool
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
Reference in new issue
Block a user