Timetable

public struct Timetable: Decodable

A Room’s timetable, when is what kind of lesson.

  • Name and date for the current first week.

    Declaration

    Swift

    public let week1Name: String
  • List of the first week’s days.

    Declaration

    Swift

    public let week1: [Day]
  • Name and date for the current second week.

    Declaration

    Swift

    public let week2Name: String
  • List of the second week’s days.

    Declaration

    Swift

    public let week2: [Day]
  • Day

    A single day.

    See more

    Declaration

    Swift

    public struct Day: Decodable
  • Fetch timetable for a given room.

    Declaration

    Swift

    public static func fetch(forRoom roomID: String,
                                 session: URLSession = .shared,
                                 completion: @escaping (Result<Timetable>) -> Void)

    Parameters

    roomID

    a room’s ID, e.g. 136101.0400

    session

    session to use, defaults to .shared

    completion

    handler