Set every properties in public, so they're accessible from outside
This commit is contained in:
@@ -2,11 +2,10 @@ import Foundation
|
||||
import OpenFoodFacts
|
||||
|
||||
let off = OpenFoodFactsClient()
|
||||
print("Hello world")
|
||||
|
||||
do {
|
||||
let res = try await off.getProductByBarcode("3017620422003")
|
||||
print(res)
|
||||
print(res.product!.nutriments!.energy!)
|
||||
} catch {
|
||||
print("\(error)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user