Dart pub badge style: lints

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, 2021/2022 session:

    // Create albiruni instance
    Albiruni albiruni = Albiruni(semester: 1, session: "2021/2022");
    // Use methods available in the classes
    var subjects = await albiruni.fetch("ECONS");
    
  • Supports both Undergraduate and Postgraduate studies. Pass the enum StudyGrad to studyGrade parameter in Albiruni. (default: StudyGrade.ug (undergraduate))

    var albiruni =
        Albiruni(semester: 1, session: "2022/2023", studyGrade: StudyGrad.pg);
    
  • To search for a particular subject, use the course parameter.

    fetch("ECONS", course: "ECON 1140");
    
  • Be creative. Let's say you want to filter the courses for third-year subjects only, just provide the first digit and ignore the rest.

    fetch("ECONS", course: "CCUB 3");
    
  • If you receive the course code input from the user, use .toAlbiruniFormat() method to properly format the string before passing it to the function.

    var userInput = "ccub2621";
    fetch("CCAC", course: userInput.toAlbiruniFormat()); // formatted: CCUB 2621
    
  • Want to parse the subjects' data from JSON string? We got you!

    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 = <yourjsonstring>
    var subjects = Subject.fromJson(jsonDecode(data));
    
  • I think that's it for the basic usage of this library, of course, you can always discover more. You can drop your inquiries in issues if you have any. More examples can be found in the /example folder.

Common issues

  • XMLHttpRequest error or CORS error

    Usually occurs if you're developing for the web. Set useProxy flag to true. This will add a proxy layer between the client and the albiruni server.

    fetch("ENGIN", course: "MCTE 3271", useProxy: true);
    
  • HandshakeException: CERTIFICATE_VERIFY_FAILED error.

    This happens when the albiruni server has some certificate issues. Some clients might reject the requests. If you're in development, try this answer from SO.

List of available kulliyyah (as of 31/7/2022)

CodeName
KAHSALLIED HEALTH SCIENCES
AEDARCHITECTURE
BRIDGBRIDGING PROGRAMME
CFLCELPAD
CCACCOCU
DENTDENTISTRY
EDUCEDUCATION
ENGINENGIN
ECONSENMS
KICTICT
IHARTINTERNATIONAL INSTITUTE FOR HALAL RESEARCH AND TRAINING
IRKHSIRKHS
IIBFISLAMIC BANKING AND FINANCE
ISTACISTAC
KLMKLM
LAWSLAWS
MEDICMEDICINE
NURSNURSING
PHARMPHARMACY
KOSSCIENCE
SC4SHSEJAHTERA CENTRE FOR SUSTAINABILTY AND HUMANITY

This list of available kulliyyah might change over time, kindly refer to https://iiumschedule.iqfareez.com/docs/devs/albiruni#list-of-available-kulliyyah

Additional information

Libraries

albiruni
Albiruni library