Options
All
  • Public
  • Public/Protected
  • All
Menu

untis-node

Index

Type aliases

methods

methods: "authenticate" | "getTeachers" | "logout" | "getStudents" | "getKlassen" | "getSubjects" | "getRooms" | "getHolidays" | "getTimegridUnits" | "getStatusData" | "getCurrentSchoolyear" | "getSchoolyears" | "getTimetable" | "getLatestImportTime" | "getPersonId" | "getDepartments" | "getClassregEvents" | "getSubstitutions" | "getExams" | "getTimetableWithAbsences" | "getClassregCategories" | "getClassregCategoryGroups"

types

types: 1 | 2 | 3 | 4 | 5

Functions

getAbsences

  • getAbsences(startDate: number, endDate: number): Promise<AbsenceResponse>
  • function that gets the absences

    Parameters

    • startDate: number

      the start date of the time period

    • endDate: number

      the end date of the time period

    Returns Promise<AbsenceResponse>

    Promise of type AbsenceResponse

getAvailableSchoolyears

getClassByID

getClassRegisterEvents

getClasses

getCurrentSchoolyear

getCustomClassRegEvents

  • getCustomClassRegEvents(startDate: number, endDate: number, _id: string, type: types, keyType: "id" | "name" | "externalkey"): Promise<ClassRegEventResponse>
  • function for getting class register events

    Parameters

    • startDate: number

      the start date of the time period

    • endDate: number

      the end date of the time period

    • _id: string

      the id for

    • type: types
    • keyType: "id" | "name" | "externalkey"

    Returns Promise<ClassRegEventResponse>

    Promise of type ClassRegEventResponse

getCustomizableTimetable

  • getCustomizableTimetable(_id: string, type: number, keyType: string | "id", startDate: number, endDate: number, onlyBaseTimetable: boolean | false, showBooking: boolean | false, showInfo: boolean | false, showSubstText: boolean | false, showLsText: boolean | false, showLsNumber: boolean | false, showStudentgroup: boolean | false, klasseFields?: string[], roomFields?: string[], subjectFields?: string[], teacherFields?: string[]): Promise<CustomTimetableResponse>
  • function for getting a custom timetable

    Parameters

    • _id: string

      an element id, either internal or external

    • type: number

      type of element

    • keyType: string | "id"

      keyType for the id

    • startDate: number

      the start date for the time period

    • endDate: number

      the end date for the time period

    • onlyBaseTimetable: boolean | false

      boolean, returns only the base timetable if true (default: false)

    • showBooking: boolean | false

      boolean, returns the booking info if true (default: false)

    • showInfo: boolean | false

      boolean, returns the period's information if true (default: false)

    • showSubstText: boolean | false

      boolean, returns the period's substitution text if true (default: false)

    • showLsText: boolean | false

      boolean, returns the the text of the period's lessons if true (default: false)

    • showLsNumber: boolean | false

      boolean, returns the number of the lesson if true (default: false)

    • showStudentgroup: boolean | false

      boolean, returns the name(s) of the studentgroup(s) if true (default: false)

    • Optional klasseFields: string[]

      optional, array with an id, name, longname, and external key

    • Optional roomFields: string[]

      optional, array with an id, name, longname, and external key

    • Optional subjectFields: string[]

      optional, array with an id, name, longname, and external key

    • Optional teacherFields: string[]

      optional, array with an id, name, longname, and external key

    Returns Promise<CustomTimetableResponse>

    Promise of type [[CustomTimeTableResponse]]

getDay

  • getDay(date: number): object

getDepartments

getExamTypes

  • getExamTypes(): void

getExams

  • getExams(examTypeId: string, startDate: number, endDate: number): Promise<ExamResponse>
  • function to get exams

    Parameters

    • examTypeId: string

      type of exam

    • startDate: number

      start date of the time period

    • endDate: number

      end date of the time period

    Returns Promise<ExamResponse>

    PRomise of type ExamResponse

getHolidays

getPerson

  • getPerson(type: number, sn: string, fn: string, dob: number | 0): Promise<PersonResponse>
  • function for getting the id of a person

    Parameters

    • type: number

      type of person

    • sn: string

      surname of person

    • fn: string

      forename of person

    • dob: number | 0

      date of birth of the person, default: 0

    Returns Promise<PersonResponse>

    Promise of type PersonResponse

getRemarks

getRemarksForGroups

getRoomByID

getRooms

getSimpleTimetable

  • getSimpleTimetable(id: number, type: number, startDate: number, endDate: number): Promise<TimetableResponse>
  • function for getting an simple timetable

    Parameters

    • id: number

      the element id

    • type: number

      the element type

    • startDate: number

      the start date of the time period

    • endDate: number

      the end date of the time period

    Returns Promise<TimetableResponse>

    Promise of type TimetableResponse

getStatusData

getStudents

getSubjectById

getSubjects

getSubstitutions

  • getSubstitutions(startDate: number, endDate: number, departmentId: number | 0): Promise<SubstitutionResponse>
  • function for getting the substitutions of a time period and a department

    Parameters

    • startDate: number

      the start date of the time period

    • endDate: number

      the end date of the time period

    • departmentId: number | 0

      the departmentId where to search for substitutions, default: 0 (all departments)

    Returns Promise<SubstitutionResponse>

    Promise of type [[SubstitutionsResponse]]

getTeacherByID

getTeachers

getTime

  • getTime(time: Time): object

getTimegrid

getURL

  • getURL(server: string, school: string): string
  • Parameters

    • server: string
    • school: string

    Returns string

login

logout

  • logout(): Promise<boolean>
  • Logs you out of your session

    Returns Promise<boolean>

    returns true if successful logout and false if not

sendCustomRequest

  • sendCustomRequest(request: Request): Promise<Response>
  • function for sending custom requests

    Parameters

    • request: Request

      the custom request you want to send

    Returns Promise<Response>

    Promise of type Response

Generated using TypeDoc