From dc4a800760d0a32576a37d288b9e136af2f16f7d Mon Sep 17 00:00:00 2001 From: Tashif Ahmad Khan Date: Sun, 27 Jul 2025 05:19:42 +0530 Subject: [PATCH 1/2] feat: add fee summary endpoint don't know what it might be used for but it is something --- pyjiit/wrapper.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pyjiit/wrapper.py b/pyjiit/wrapper.py index 6896b1b..d88e848 100644 --- a/pyjiit/wrapper.py +++ b/pyjiit/wrapper.py @@ -105,8 +105,6 @@ def __hit(self, *args, **kwargs): if resp["status"]["responseStatus"] != "Success": raise exception("status:\n"+pformat(resp["status"])) - - return resp @@ -457,3 +455,16 @@ def get_fines_msc_charges(self): resp = self.__hit("POST", API + ENDPOINT, json=enc_payload, authenticated=True) return resp["response"] + @authenticated + def get_fee_summary(self): + """ + fetches the fee summary for the logged-in student. + :returns: The raw 'response' dict from the API. + :raises APIError: on any non-Success responseStatus. + """ + ENDPOINT = "/studentfeeledger/loadfeesummary" + payload_dict = { + "instituteid": self.session.instituteid, + } + resp = self.__hit("POST", API + ENDPOINT, json=payload_dict, authenticated=True) + return resp["response"] From 14266d9ead957f96599c573abd07427204c29477 Mon Sep 17 00:00:00 2001 From: Tashif Ahmad Khan Date: Sun, 27 Jul 2025 11:50:54 +0530 Subject: [PATCH 2/2] feat: add subject choisce for checking preregester subject / elective allocation --- pyjiit/wrapper.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyjiit/wrapper.py b/pyjiit/wrapper.py index d88e848..e97208f 100644 --- a/pyjiit/wrapper.py +++ b/pyjiit/wrapper.py @@ -468,3 +468,20 @@ def get_fee_summary(self): } resp = self.__hit("POST", API + ENDPOINT, json=payload_dict, authenticated=True) return resp["response"] + + @authenticated + def get_subject_choices(self, semester: Semester): + """ + :param semester: A Semester object + :returns: A dictionary with subject choices data + :raises APIError: Raised for generic API error + """ + # get the subject choice print - if the subject is allocated then resp["response"]["subjectpreferencegrid"] is an array of dict which would have an attribute subjectrunning == "Y" + ENDPOINT = "/studentchoiceprint/getsubjectpreference" + payload_dict = { + "instituteid": self.session.instituteid, + "studentid": self.session.memberid, + "registrationid": semester.registration_id, + } + resp = self.__hit("POST", API + ENDPOINT, json=payload_dict, authenticated=True) + return resp["response"]