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/Game.swift

16 lines
305 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 Game {
public let ids: [String]
public let name: String
public let usage: [Usage]?
}
// MARK: - Decodable
extension Game: Decodable {
enum CodingKeys: String, CodingKey {
case ids = "gameID"
case name = "gameName"
case usage = "amiiboUsage"
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 49ms 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