Logo
Explore Help
Sign In
rock-n-code/amiibo-service
1
0
Fork 0
You've already forked amiibo-service
Code Issues 1 Pull Requests Releases 8 Wiki Activity
amiibo-service/Sources/Models/Usage.swift

14 lines
261 B
Swift
Raw Normal View History

[Feature] Service (#4) This PR contains the work done to implement the actual public service interface to the Amiibo API. To provide further details about this work: - [x] defined a `Filter` protocol; - [x] implemented the `AmiiboFilter` and the `KeyNameFilter` filters; - [x] implemented the `Result` model; - [x] defined the `Service` protocol; - [x] implemented the `AmiiboService` concrete service; - [x] fixed the `path` of the `GetAmiiboEndpoint` endpoint; - [x] made the `usage` property of the `Game` model optional; - [x] replaced the `showGames` and the `showUsage` flags of the `AmiiboFilter` filter with an enumeration. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: https://repo.rock-n-code.com/rock-n-code/amiibo-service/pulls/4
2023-04-21 18:16:38 +00:00
public struct Usage {
public let explanation: String
public let isWritable: Bool
}
// MARK: - Decodable
extension Usage: Decodable {
enum CodingKeys: String, CodingKey {
case explanation = "Usage"
case isWritable = "write"
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 48ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API