Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Authenticate() error
- func (c *Client) CallRPC(method string, params interface{}) (*structs.RPCResponse, error)
- func (c *Client) ContinueSession(SessionID string) error
- func (c *Client) GetClasses(params ...interface{}) ([]structs.Class, error)
- func (c *Client) GetClassesOfSchoolYear(schoolYearID int) ([]structs.Class, error)
- func (c *Client) GetCurrentSchoolyear() (structs.SchoolYear, error)
- func (c *Client) GetDepartments() ([]structs.Department, error)
- func (c *Client) GetExamTypes() (json.RawMessage, error)
- func (c *Client) GetExams(params structs.GetExamsRequest) ([]structs.Exam, error)
- func (c *Client) GetHolidays() ([]structs.Holiday, error)
- func (c *Client) GetLatestImportTime() (int, error)
- func (c *Client) GetPersonId(params structs.GetPersonIdRequest) (int, error)
- func (c *Client) GetRooms() ([]structs.Room, error)
- func (c *Client) GetSchoolyears() ([]structs.SchoolYear, error)
- func (c *Client) GetStatusData() (structs.StatusData, error)
- func (c *Client) GetStudents() ([]structs.Student, error)
- func (c *Client) GetSubjects() ([]structs.Subject, error)
- func (c *Client) GetSubstitutions(params structs.GetSubstitutionsRequest) ([]structs.Substitutions, error)
- func (c *Client) GetTeachers() ([]structs.Teacher, error)
- func (c *Client) GetTimegridUnits() ([]structs.TimegridUnit, error)
- func (c *Client) GetTimetable(params structs.GetTimetableRequest) ([]structs.Period, error)
- func (c *Client) GetTimetableSimple(params structs.GetTimetableSimpleRequest) ([]structs.Period, error)
- func (c *Client) GetTimetableWithAbsences(params structs.StartAndEndDate) ([]structs.PeriodWithAbsenceObject, error)
- func (c *Client) Logout() error
- func (c *Client) Test() error
- type LogLevel
Constants ¶
const ( // ANSI escape codes for colors Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
structs.ApiConfig
structs.AuthResponse
Logger *logger
}
func (*Client) Authenticate ¶
func (*Client) CallRPC ¶
func (c *Client) CallRPC(method string, params interface{}) (*structs.RPCResponse, error)
func (*Client) ContinueSession ¶ added in v1.1.0
func (*Client) GetClasses ¶
Get all classes of the current schoolYear from the Api
func (*Client) GetClassesOfSchoolYear ¶
Get all classes of the given schoolYear from the Api
func (*Client) GetCurrentSchoolyear ¶
func (c *Client) GetCurrentSchoolyear() (structs.SchoolYear, error)
Data for the current schoolyear
func (*Client) GetDepartments ¶
func (c *Client) GetDepartments() ([]structs.Department, error)
func (*Client) GetExamTypes ¶
func (c *Client) GetExamTypes() (json.RawMessage, error)
Request classregevents for the given date range
func (*Client) GetLatestImportTime ¶
Import time of the last lesson/timetable or substitution import from Untis, returns Unix timestamp
func (*Client) GetPersonId ¶
func (c *Client) GetPersonId(params structs.GetPersonIdRequest) (int, error)
Get Id of the person (teacher or student) from the name, returns: Id of person or 0 if no fitting person found
func (*Client) GetSchoolyears ¶
func (c *Client) GetSchoolyears() ([]structs.SchoolYear, error)
List of all available schoolyears
func (*Client) GetStatusData ¶
func (c *Client) GetStatusData() (structs.StatusData, error)
Information about lesson types and period codes and their colors
func (*Client) GetStudents ¶
Get a list of all students
func (*Client) GetSubstitutions ¶
func (c *Client) GetSubstitutions(params structs.GetSubstitutionsRequest) ([]structs.Substitutions, error)
Request substitutions for the given date range
func (*Client) GetTeachers ¶
Get list of teachers form Api
func (*Client) GetTimegridUnits ¶
func (c *Client) GetTimegridUnits() ([]structs.TimegridUnit, error)
Get timegrid
func (*Client) GetTimetable ¶
Get a customizable timetable for classes, teacher, student, room, subject..
func (*Client) GetTimetableSimple ¶
func (c *Client) GetTimetableSimple(params structs.GetTimetableSimpleRequest) ([]structs.Period, error)
Get timetable for Classes, teacher, student, room, subject
func (*Client) GetTimetableWithAbsences ¶
func (c *Client) GetTimetableWithAbsences(params structs.StartAndEndDate) ([]structs.PeriodWithAbsenceObject, error)
Retrieves the timetable for all students together with absene information for a given daterange.