Improved the overall documentation for the public and internal types in the package.
This commit is contained in:
@@ -19,34 +19,34 @@ public struct Amiibo: Sendable, Hashable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// A game character.
|
||||
/// The name of the game character associated with this amiibo.
|
||||
public let gameCharacter: String
|
||||
|
||||
/// A game series.
|
||||
/// The name of the game series associated with this amiibo.
|
||||
public let gameSeries: String
|
||||
|
||||
/// The first 8 hexadecimal characters of an identifier.
|
||||
/// The first 8 hexadecimal characters of the amiibo identifier.
|
||||
public let head: String
|
||||
|
||||
/// An image link.
|
||||
/// A URL string pointing to the image of this amiibo.
|
||||
public let image: String
|
||||
|
||||
/// An amiibo name.
|
||||
/// The name of this amiibo.
|
||||
public let name: String
|
||||
|
||||
/// A game platform type, if any.
|
||||
/// The game platform data for this amiibo, if available.
|
||||
public let platform: Platform?
|
||||
|
||||
/// A release date.
|
||||
/// The release dates of this amiibo across different regions.
|
||||
public let release: Release
|
||||
|
||||
/// An amiibo series.
|
||||
/// The name of the amiibo series this amiibo belongs to.
|
||||
public let series: String
|
||||
|
||||
/// The last 8 hexadecimal characters of an identifier.
|
||||
/// The last 8 hexadecimal characters of the amiibo identifier.
|
||||
public let tail: String
|
||||
|
||||
/// An amiibo type.
|
||||
/// The type of this amiibo (e.g., Figure, Card, Yarn, Band).
|
||||
public let type: String
|
||||
|
||||
// MARK: Initializers
|
||||
@@ -73,12 +73,12 @@ public struct Amiibo: Sendable, Hashable {
|
||||
|
||||
// MARK: Computed
|
||||
|
||||
/// An identifier.
|
||||
/// The full 16-character hexadecimal identifier, composed of the ``head`` and ``tail``.
|
||||
public var identifier: String {
|
||||
head + tail
|
||||
}
|
||||
|
||||
/// A URL related to an image link, if any.
|
||||
/// A URL constructed from the ``image`` string, if valid.
|
||||
public var imageURL: URL? {
|
||||
.init(string: image)
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ extension Amiibo {
|
||||
|
||||
// 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
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// ===----------------------------------------------------------------------===
|
||||
|
||||
extension Amiibo {
|
||||
/// A model that represents a collection of `Switch`, `Switch 2`, `3DS`, and `WiiU` games related to an 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 {
|
||||
|
||||
// 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]?,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import Foundation
|
||||
|
||||
extension Amiibo {
|
||||
/// A model that represents a collection of release dates related to an amiibo.
|
||||
/// A model that represents the regional release dates of an amiibo.
|
||||
public struct Release: Sendable, Hashable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
@@ -18,10 +18,10 @@ extension Amiibo {
|
||||
|
||||
// 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
|
||||
|
||||
@@ -17,10 +17,10 @@ public struct AmiiboSeries: KeyNameModel {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// An amiibo series key.
|
||||
/// The hexadecimal key that uniquely identifies this amiibo series.
|
||||
public let key: String
|
||||
|
||||
/// An amiibo series name.
|
||||
/// The name of this amiibo series.
|
||||
public let name: String
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
@@ -17,10 +17,10 @@ public struct AmiiboType: KeyNameModel {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// An amiibo type key.
|
||||
/// The hexadecimal key that uniquely identifies this amiibo type.
|
||||
public let key: String
|
||||
|
||||
/// An amiibo type name.
|
||||
/// The name of this amiibo type (e.g., Figure, Card, Yarn, Band).
|
||||
public let name: String
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
@@ -17,10 +17,10 @@ public struct GameCharacter: KeyNameModel {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// A game character key.
|
||||
/// The hexadecimal key that uniquely identifies this game character.
|
||||
public let key: String
|
||||
|
||||
/// A game character name.
|
||||
/// The name of this game character.
|
||||
public let name: String
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
@@ -17,10 +17,10 @@ public struct GameSeries: KeyNameModel {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// A game series key.
|
||||
/// The hexadecimal key that uniquely identifies this game series.
|
||||
public let key: String
|
||||
|
||||
/// A game series name.
|
||||
/// The name of this game series.
|
||||
public let name: String
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
Reference in New Issue
Block a user