albiruni 1.1.4 albiruni: ^1.1.4 copied to clipboard
A wrapper to easily access IIUM's Course Schedule website data.
A wrapper to easily access IIUM's Course Schedule website data.
Thank you @PlashSpeed-Aiman for the code foundation.
Features #
-
Get a list of subjects for ECONS kulliyyah for semester 1, 2020/2021 session:
// Create albiruni instance Albiruni albiruni = Albiruni(semester: 1, session: "2021/2022"); // Use methods available in the classes var subjects = await albiruni.fetch("ECONS");
-
To filter/search for a particular subject, use the
course
parameter.fetch("ECONS", course: "ECON 1140");
-
Be creative. Let say you want to filter the courses for third year subjects only.
fetch("ECONS", course: "CCUB 3");
-
If you receiving input from user, it is recommended to use
.toAlbiruniFormat()
method.userInput = "ccub2621"; fetch("CCAC", course: userInput.toAlbiruniFormat());
-
Get that
XMLHttpRequest
again? Urgh. Fear no more, setuseProxy
to true. (Implemented using cors-anywhere)fetch("ENGIN", course: "MCTE 3271", useProxy: true);
-
I think that's it for the basic usage of this library, of course, you can always discover more. You can drop your enquiries in issues if you have any.
-
Parse the subjects data from Json string? Not a problem! Say you have this json:
{ "code": "CHEN 1212", "sect": 1, "title": "THERMODYNAMICS", "chr": 2.0, "venue": null, "lect": [ "DR. MOHD. FIRDAUS BIN ABD. WAHAB", "ASSOC. PROF. DR. NOR FADHILLAH BT. MOHAMED AZMIN" ], "dayTime": [ { "day": 1, "startTime": "11:30", "endTime": "12:50" }, { "day": 3, "startTime": "11:30", "endTime": "12:50" } ] }
Parse it like follow:
var data = <yourjson> var subjects = Subject.fromJson(jsonDecode(data));
More example can be found in /example
folder.