Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/ScryfallKit/Extensions/Card+helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ extension Card {
case .eur: return prices.eur
case .tix: return prices.tix
case .usdFoil: return prices.usdFoil
case .usdEtched: return prices.usdEtched
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion Sources/ScryfallKit/Models/Card/Card+Prices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ extension Card {
public var usd: String?
/// The price of this card's foil printing in usd
public var usdFoil: String?
/// The price of this card's etched printing in usd
public var usdEtched: String?
/// The price of this card in eur.
public var eur: String?

public init(tix: String? = nil, usd: String? = nil, usdFoil: String? = nil, eur: String? = nil)
public init(tix: String? = nil, usd: String? = nil, usdFoil: String? = nil, usdEtched: String? = nil, eur: String? = nil)
{
self.tix = tix
self.usd = usd
self.usdFoil = usdFoil
self.usdEtched = usdEtched
self.eur = eur
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ScryfallKit/Models/Enums.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ public enum Format: String, CaseIterable, Sendable {

/// Currency types that Scryfall provides prices for
public enum Currency: String, CaseIterable, Sendable {
case usd, eur, tix, usdFoil
case usd, eur, tix, usdFoil, usdEtched
}