This PR contains the work done to address the issue #7, related to documenting the source code that would be used for other developers. To provide further details about the work done: - [x] restructured the hierarchy of some models that are related to the `Amiibo` model; - [x] written documentation for the `AmiiboService` service; - [x] written documentation for the `AmiiboFilter` and `KeyNameFilter` filters; - [x] written documentation for the `Amiibo`, `KeyName`, `LastUpdated` and children model; - [x] written documentation for the `AmiiboClientError` error; - [x] written documentation for the README file. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: #10
31 lines
828 B
Swift
31 lines
828 B
Swift
/// This model is a concrete genetic definition that represents the following models: ``AmiiboSeries``, ``AmiiboType``, ``Character`` and ``GameSeries``.
|
|
public struct KeyName {
|
|
|
|
// MARK: Properties
|
|
|
|
/// The key of the model.
|
|
public let key: String
|
|
|
|
/// The name of the model.
|
|
public let name: String
|
|
|
|
}
|
|
|
|
// MARK: - Type aliases
|
|
|
|
/// This model represents the series an amiibo belongs to.
|
|
public typealias AmiiboSeries = KeyName
|
|
|
|
/// This model represents the type an amiibo belongs to.
|
|
public typealias AmiiboType = KeyName
|
|
|
|
/// This model represents the character an amiibo is associated to.
|
|
public typealias Character = KeyName
|
|
|
|
/// This model represents the games series an amiibo is associated to.
|
|
public typealias GameSeries = KeyName
|
|
|
|
// MARK: - Decodable
|
|
|
|
extension KeyName: Decodable {}
|