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]
  • all

    List of all supported canteens.

    Declaration

    Swift

    public static let all = [
  • A meal, omnomnom.

    See more

    Declaration

    Swift

    public struct Meal: Decodable
  • 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