Ensure the API is enabled in the application settings.
Make sure open to network is off!
This a Rest based API that will only serve get requests.
This API is only accessible
to the localhost and can only be accessed by other devices on the network if the Open to network setting is switched on.
Websites can inherently access the localhost but the application will reject any website that isn't part of
its authorisation list.
Only authorise websites you trust!
By default this website (https://Torca.xyz) is already enabled!
http://localhost:13693/api/timetable
http://localhost:13693/api/info
http://localhost:13693/api/epr
This is a json response containing a array of size 10
each item in the array will contain another array of size 7
The first array corresponds to the day and the second array corresponds to the period (form being period 0)
During
initialisation of the program this json response will be empty.
Example of a period item{
"Start": "2020-08-24T08:15:00+10:00",
"End": "2020-08-24T08:50:00+10:00",
"Description": "Specialists science",
"Classcode": "122MS1",
"Roomcode": "ST12",
"GotoPeriod": true,
"period": 1,
"Teacher": "Tasmania Jones"
}
Properties:
Start -
Datetime object representing the start of a period in UTC time, ignore the date as its referring to the week that the two week timetable is being referenced, only the time is of real use.
End -
Datetime object representing the end of a period in UTC time, again only the time is of real use here.
Description - string, Verbose name of the subject, can sometimes be blank depending on
the subject.
Classcode - string, Subject code for the class, is unique per class and will never be blank.
Roomcode - string, Its the room designated code, sometimes can
be blank.
GotoPeriod - Boolean, This indicates whether the period has a 5 minute transition time from the Start time.
period - int, will indicate
a number from 0-6 representing the period for the day.
Teacher - string, will sometimes contain the name of the teacher for that class
This returns a json response as shown below{
"Name": "Tony Shorts",
"Day": 10,
"ID": "662001",
"ReferenceDay": "2020-07-27T00:00:00"
}
Name - string, This contains the
user's full name. By default its set to hide the name so sometimes this field is "Anon"
Day - int, this returns the current school day at the time, this will be 0 on weekends.
ID -
string, this contains the user's student number, By default the hide name setting is on and thus this will display "000000"
ReferenceDay - DateTime, this date is always a Monday that is day 1 for the
timetable.
This returns a json response containing a list which contains periods which were found to have changes for the day.
EPR will be empty while application is initialising.
*Sometimes the EPR fails to process properly and
thus the list will be empty
Example EPR for a day[
{
"Period":5,
"ClassCode":"122MM4",
"RoomCode":"3TEST3",
"Teacher":"New Teacher",
"TeacherChange":true,
"RoomChange":true
},
{
"Period":6,
"ClassCode":"129MS1",
"RoomCode":"ST14",
"Teacher":"New Teacher2",
"TeacherChange":true,
"RoomChange":false
}
]
Properties:
Period -
int, number for the period.
ClassCode - string, Code designated for the class, is unique to the subject.
RoomCode - string, New or current room code for the period. Can
sometimes be empty.
Teacher - string, New or current teacher for the period. Can sometimes be empty.
TeacherChange - boolean, will be true when there is a teacher change.
RoomChange -
boolean, will be true when there is a change in room.