Api v2
This commit is contained in:
15
Sources/OpenFoodFactsSDK/Schemas/SelectedImageItem.swift
Normal file
15
Sources/OpenFoodFactsSDK/Schemas/SelectedImageItem.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
public struct SelectedImageItem: Codable {
|
||||
public var en: String?
|
||||
public var fr: String?
|
||||
public var pl: String?
|
||||
|
||||
public var url: String {
|
||||
[en, fr, pl].compactMap { $0 }.first ?? ""
|
||||
}
|
||||
|
||||
public init(en: String?, fr: String?, pl: String?) {
|
||||
self.en = en
|
||||
self.fr = fr
|
||||
self.pl = pl
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user