Class WebUntisAnonymousAuth

Hierarchy (view full)

Constructors

Properties

anonymous: boolean
axios: AxiosInstance
baseurl: string
cookies: string[]
id: string
password: string
school: string
schoolbase64: string
sessionInformation: null | SessionInformation
username: string
TYPES: typeof WebUntisElementType = WebUntisElementType

Methods

  • Parameters

    • token: string | number
    • username: string
    • time: number
    • skipSessionInfo: boolean = false

    Returns Promise<SessionInformation>

  • Private

    Make a JSON RPC Request with the current session

    Type Parameters

    • Response = Record<string, any>

    Parameters

    • method: string
    • Optional parameter: Record<string, any> = {}
    • Optional validateSession: boolean = true

      Whether the session should be checked first

    • Optional url: string = ...

    Returns Promise<Response>

  • Returns all the Lessons where you were absent including the excused one!

    Parameters

    • rangeStart: Date
    • rangeEnd: Date
    • Optional excuseStatusId: number = -1
    • Optional validateSession: boolean = true

    Returns Promise<Absences>

  • Get Exams for range

    Parameters

    • rangeStart: Date
    • rangeEnd: Date
    • klasseId: number = -1
    • withGrades: boolean = false
    • Optional validateSession: boolean = true

    Returns Promise<Exam[]>

  • TODO: Find out what type this function returns

    Parameters

    • rangeStart: Date
    • rangeEnd: Date
    • Optional validateSession: boolean = true

    Returns Promise<any[]>

  • Get your own timetable for a given Date range Note: You can't use this with anonymous login

    Parameters

    • rangeStart: Date
    • rangeEnd: Date
    • Optional validateSession: boolean = true

    Returns Promise<Lesson[]>

  • Get the timetable for the current week for the current element from the web client API.

    Parameters

    • date: Date

      one date in the week to query

    • Optional formatId: number = 1

      set to 1 to include teachers, 2 omits the teachers in elements response

    • Optional validateSession: boolean = true

    Returns Promise<WebAPITimetable[]>

  • Returns a URL to a unique PDF of all the lessons you were absent

    Parameters

    • rangeStart: Date
    • rangeEnd: Date
    • Optional validateSession: boolean = true
    • Optional excuseStatusId: number = -1
    • Optional lateness: boolean = true
    • Optional absences: boolean = true
    • Optional excuseGroup: number = 2

    Returns Promise<string>

  • Get the timetable for a given Date range for specific element

    Parameters

    • rangeStart: Date
    • rangeEnd: Date
    • id: number
    • type: number
    • Optional validateSession: boolean = true

    Returns Promise<Lesson[]>

  • Get the timetable for the current week for a specific element from the web client API.

    Parameters

    • date: Date

      one date in the week to query

    • id: number

      element id

    • type: number

      element type

    • Optional formatId: number = 1

      set to 1 to include teachers, 2 omits the teachers in elements response

    • Optional validateSession: boolean = true

    Returns Promise<WebAPITimetable[]>

  • Login with your credentials

    Notice: The server may revoke this session after less than 10min of idle.

    Untis says in the official docs:

    An application should always log out as soon as possible to free system resources on the server.

    Returns Promise<SessionInformation>

  • Converts the untis date string format to a normal JS Date object

    Parameters

    • date: string

      Untis date string

    • Optional baseDate: Date = ...

      Base date. Default beginning of current day

    Returns Date

    Static

  • Convert a untis time string to a JS Date object

    Parameters

    • time: string | number

      Untis time string

    • Optional baseDate: Date = ...

      Day used as base for the time. Default: Current date

    Returns Date

    Static

Generated using TypeDoc