🎓 JIIT Web Portal Wrapper
Because manually checking attendance is so 2010. Let's automate that anxiety!
🤔 What's This?
A JavaScript wrapper that lets you programmatically interact with JIIT's web portal. Think of it as your personal assistant who actually enjoys dealing with the portal (weird, right?).
✨ Features
- 🔐 Login without playing "solve the CAPTCHA 🔫"
- 📊 Get attendance details
- 📝 Check exam schedules
- 📈 Fetch those grades you're too scared to look at
- 👀 View SGPA/CGPA
🚀 Usage
First, import our little miracle worker:
import { WebPortal } from './src/wrapper.js';
Then, let the magic begin:
const portal = new WebPortal();
await portal.student_login('your_username', 'your_password');
All of the following endpoints can only be accessed after loggin in:
const gradeCardSems = await portal.get_semesters_for_grade_card();
const latestSem = gradeCardSems[0];
const grades = await portal.get_grade_card(latestSem);
const sgpaCgpa = await w.get_sgpa_cgpa();
const marksSems = await w.get_semesters_for_marks();
const previousSem = marksSems[1];
const marks = await w.download_marks(previousSem);
const registerdSems = await w.get_registered_semesters();
const latestSem = registerdSems[0];
const registeredSubjects = await w.get_registered_subjects_and_faculties(latestSem);
const examSems = await w.get_semesters_for_exam_events();
const latestSem = examSems[0];
const examEvents = await w.get_exam_events(latestSem);
const examSchedule = await w.get_exam_schedule(examEvents[0]);
const personalInfo = await w.get_personal_info();
const meta = await portal.get_attendance_meta();
const sem = meta.latestSemester();
const header = meta.latestHeader();
const attendance = await portal.get_attendance(header, sem);
const subjectIndex = 1;
let subjectid = attendance["studentattendancelist"][subjectIndex]["subjectid"];
let individualsubjectcode = attendance["studentattendancelist"][subjectIndex]["individualsubjectcode"];
const possibleComponentCodes = ["Lsubjectcomponentid", "Psubjectcomponentid", "Tsubjectcomponentid"]
let subjectcomponentids = [];
for (let possibleComponentCode of possibleComponentCodes) {
if (attendance["studentattendancelist"][subjectIndex][possibleComponentCode]) {
subjectcomponentids.push(attendance["studentattendancelist"][subjectIndex][possibleComponentCode]);
}
}
let subjectAttendance = await w.get_subject_daily_attendance(sem, subjectid, individualsubjectcode, subjectcomponentids);