CanteenMenu
public struct CanteenMenu: Decodable
Menu for a specific canteen.
-
Name
Declaration
Swift
public let menuName: String
-
List of meals.
Declaration
Swift
public let meals: [Meal]
-
List of all supported canteens.
Declaration
Swift
public static let all = [
-
Fetch the menu for a given canteen.
Declaration
Swift
public static func fetch(forCanteen canteenID: String, session: URLSession = .shared, completion: @escaping (Result<CanteenMenu>) -> Void)
Parameters
canteenID
the canteen’s building abbreviation
session
session to use, defaults to
.shared
completion
handler