This is an api to get KTU student grades (with possibility to get even more). It works by scraping hmtl using all popular cheeriojs/cheerio framework.
- Get STUDCOOKIE which is used everywhere around ktu ais
- Get student grades from requested year
- nodejs >= v6.11
npm install
npm start
To test if app is running send GET request to '/'. It should return 200 and 'alive'
/api/login
- takesuser
andpass
properties as 'content-type': 'application/x-www-form-urlencoded' and returns 'application/json'
{
"cookie": "", // STUDCOOKIE. It is required for every request in ais
"student_name": "", // Student's full name
"student_id": "", // Student academical code (vidko)
// Student id varies between years, and to get grades for that year you need year=>id pair
"student_semesters": [
{
"year": "",
"id": ""
}
]
}
-
/api/get_grades
- takesplano_metai
,p_stud_id
andCookie
(header) as 'content-type': 'application/x-www-form-urlencoded' and returns 'application/json'.plano_metai
takesyear
andp_stud_id
takesid
from login responsestudent_semesters
object.Cookie
iscookie
from login response
[
{
"name": "", // Module name
"id": "", // Module id
"semester": "", // Semester (fall/spring)
"module_code": "", // Module id (deprecated)
"module_name": "", // Module name (deprecated)
"semester_number": "", // Semester number (which semester from the begging)
"language": "", // Language id
"profestor": "", // Module coordinating professor
"typeId": "", // Grate type id
"type": "", // Grade type name
"week": "", // Week student got the grade
"weight": 0, // Grade's influence to the final grade
"mark": [ "" ] // Marks, returns more than one if student didn't pass the first time
}
]