248 lines
No EOL
5.9 KiB
Markdown
248 lines
No EOL
5.9 KiB
Markdown
# GoSkola24API
|
|
|
|
Go module for easy interaction with the Skola24 API.
|
|
|
|
The only data you need to use this module is the hostname of your target institution.
|
|
Available hostnames can be found in a list [here](https://www.skola24.se/Applications/Authentication/login.aspx).
|
|
|
|
If you know of a way to get these via API, without scraping, please let me know.
|
|
|
|
Please remember that you can only retrieve data within the currently active hostname/domain.
|
|
|
|
|
|
|
|
# Getting started
|
|
|
|
SomeExampleHere
|
|
|
|
|
|
|
|
# Methods
|
|
|
|
Here is a list of all available methods, complete with detailed descriptions.
|
|
|
|
## GetTerms() (_result, _error)
|
|
|
|
Retrieves all currently available terms (aka semesters).
|
|
|
|
### Parameters
|
|
|
|
None.
|
|
|
|
### Returns
|
|
|
|
**_result**: < [Terms](#terms) > Holds the retrieved terms data.
|
|
|
|
**_error**: < error > Holds standard error data if errors were encountered.
|
|
|
|
## GetSchools() (_result, _error)
|
|
|
|
Retrieves all available schools.
|
|
|
|
### Parameters
|
|
|
|
None.
|
|
|
|
### Returns
|
|
|
|
**_result**: < [] [School](#school) > Array of available schools.
|
|
|
|
**_error**: < error > Holds standard error data if errors were encountered.
|
|
|
|
## GetRooms(school, checkAvailability) (_result, _error)
|
|
|
|
Retrieves all rooms in a school.
|
|
|
|
### Parameters
|
|
|
|
**school**: < [School](#school) > School to get rooms from.
|
|
|
|
**checkAvailability**: < bool > If stored availability data should be used to skip requests for unavailable data.
|
|
|
|
### Returns
|
|
|
|
**_result**: < [] [Room](#room) > Array of available rooms.
|
|
|
|
**_error**: < error > Holds standard error data if errors were encountered.
|
|
|
|
## GetTeachers(school, checkAvailability) (_result, _error)
|
|
|
|
Retrieves all teachers in a school.
|
|
|
|
### Parameters
|
|
|
|
**school**: < [School](#school) > School to get teachers from.
|
|
|
|
**checkAvailability**: < bool > If stored availability data should be used to skip requests for unavailable data.
|
|
|
|
### Returns
|
|
|
|
**_result**: < [] [Teacher](#teacher) > Array of available teachers.
|
|
|
|
**_error**: < error > Holds standard error data if errors were encountered.
|
|
|
|
## GetStudents(school, checkAvailability) (_result, _error)
|
|
|
|
Retrieves all students in a school.
|
|
|
|
WARNING: Use with caution. I am yet to find a host/school that provides this data, and therefor this method is not typed.
|
|
|
|
### Parameters
|
|
|
|
**school**: < [School](#school) > School to get students from.
|
|
|
|
**checkAvailability**: < bool > If stored availability data should be used to skip requests for unavailable data.
|
|
|
|
### Returns
|
|
|
|
**_result**: < any > Returned student data. WARNING: Types currently unknown.
|
|
|
|
**_error**: < error > Holds standard error data if errors were encountered.
|
|
|
|
## GetClasses(school, checkAvailability) (_result, _error)
|
|
|
|
Retrieves all classes in a school.
|
|
|
|
A class is a group of people, typically taking one or more courses together.
|
|
|
|
### Parameters
|
|
|
|
**school**: < [School](#school) > School to get students from.
|
|
|
|
**checkAvailability**: < bool > If stored availability data should be used to skip requests for unavailable data.
|
|
|
|
### Returns
|
|
|
|
**_result**: < [] [Class](#class) > Array of available classes.
|
|
|
|
**_error**: < error > Holds standard error data if errors were encountered.
|
|
|
|
|
|
|
|
# Types
|
|
|
|
## Terms
|
|
|
|
Holds terms (aka semesters) data.
|
|
|
|
### Fields
|
|
|
|
**ActiveTerms**: < [] [SchoolTerm](#schoolterm) > Array of currently active terms.
|
|
|
|
**UseSchoolYearsFeatures**: < bool > Purpose unknown.
|
|
|
|
## SchoolTerm
|
|
|
|
Represents a school term.
|
|
|
|
### Fields
|
|
|
|
**Start**: < string > Term startdate.
|
|
|
|
**TermId**: < string > ID of the term (GUID).
|
|
|
|
**Name**: < string > Friendlyname of the term.
|
|
|
|
**End**: < string > Term enddate.
|
|
|
|
## School
|
|
|
|
Represents a school.
|
|
|
|
### Fields
|
|
|
|
**Name**: < string > Friendlyname of the school.
|
|
|
|
**SchoolId**: < string > ID of the school (GUID).
|
|
|
|
**HostName**: < string > The hostname / domain the school belongs to.
|
|
|
|
**AllowCalendarExport**: < string > Whether or not school allows traditional calendar export (does not affect exports via this module).
|
|
|
|
**AvailableData**: < [DataAvailability](#dataavailability) > Types of data available for retrieval on the school.
|
|
|
|
## DataAvailability
|
|
|
|
Defines types of data available on a specific entity.
|
|
|
|
### Fields
|
|
|
|
**HasClasses**: < bool > If entity provides classes data.
|
|
|
|
**HasCourses**: < bool > If entity provides courses data.
|
|
|
|
**HasGroups**: < bool > If entity provides groups data.
|
|
|
|
**HasResources**: < bool > If entity provides resources data.
|
|
|
|
**HasRooms**: < bool > If entity provides rooms data.
|
|
|
|
**HasStudents**: < bool > If entity provides students data.
|
|
|
|
**HasSubjects**: < bool > If entity provides teachers data.
|
|
|
|
## Room
|
|
|
|
Represents a room.
|
|
|
|
### Fields
|
|
|
|
**Name**: < string > Friendlyname of the room.
|
|
|
|
**RoomId**: < string > ID of the room (GUID).
|
|
|
|
**External**: < bool > Purpose unknown, but assumed to indicate a room physically isolated from the rest of the school.
|
|
|
|
## Teacher
|
|
|
|
Represents a teacher.
|
|
|
|
### Fields
|
|
|
|
**FirstName**: < string > Teacher's first name.
|
|
|
|
**LastName**: < string > Teacher's last name.
|
|
|
|
**FullName**: < string > Full name (usually firstname+lastname+friendlyid).
|
|
|
|
**FriendlyId**: < string > Friendly/readable ID, usually teacher's initials.
|
|
|
|
**TeacherId**: < string > ID of the teacher (GUID).
|
|
|
|
**IsActive**: < bool > Purpose unknown.
|
|
|
|
**Integrity**: < bool > Purpose unknown.
|
|
|
|
**Reported**: < bool > Purpose unknown.
|
|
|
|
**ReadOnly**: < bool > Purpose unknown.
|
|
|
|
## Class
|
|
|
|
Represents a group of people, usually taking a course together.
|
|
|
|
### Fields
|
|
|
|
**Name**: < string > Friendlyname of the class.
|
|
|
|
**ClassId**: < string > ID of the class (GUID).
|
|
|
|
**AbsenceMessageNotDeliveredCount**: < int > Purpose unknown.
|
|
|
|
**IsResponsible**: < bool > Purpose unknown.
|
|
|
|
**IsClass**: < bool > Purpose unknown.
|
|
|
|
**IsAdmin**: < bool > Purpose unknown.
|
|
|
|
**IsPrincipal**: < bool > Purpose unknown.
|
|
|
|
**IsMentor**: < bool > Purpose unknown.
|
|
|
|
**IsPreschoolGroup**: < bool > Purpose unkown.
|
|
|
|
**Teachers**: < any > Teachers, typically mentors, for the class. WARNING: Currently untyped, use with caution.
|
|
|
|
**SubstituteTeacherId**: < any > Teacher ID of substitute teacher (if any). See [Teacher](#teacher).
|
|
|
|
**TeacherChangeStudents**: < int > Purpose unknown. |