Golang module for interfacing with Skola24 API
Find a file
2024-12-06 21:43:57 +01:00
cmd/goskola24api Improvments 2024-12-06 21:43:57 +01:00
internal Improvments 2024-12-06 21:43:57 +01:00
pkg/goskola24api Improvments 2024-12-06 21:43:57 +01:00
go.mod Initial commit 2024-12-06 21:43:00 +01:00
README.md Improvments 2024-12-06 21:43:57 +01:00

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.

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 > 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 > 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 to get rooms from.

checkAvailability: < bool > If stored availability data should be used to skip requests for unavailable data.

Returns

_result: < [] 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 to get teachers from.

checkAvailability: < bool > If stored availability data should be used to skip requests for unavailable data.

Returns

_result: < [] 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 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.

Types

Terms

Holds terms (aka semesters) data.

Fields

ActiveTerms: < [] 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 > 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.

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.

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.