albiruni 1.1.5 copy "albiruni: ^1.1.5" to clipboard
albiruni: ^1.1.5 copied to clipboard

outdated

A wrapper to easily access IIUM's Course Schedule website data.

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");
    
  • 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) #

Code Name
KAHS ALLIED HEALTH SCIENCES
AED ARCHITECTURE
BRIDG BRIDGING PROGRAMME
CFL CELPAD
CCAC COCU
DENT DENTISTRY
EDUC EDUCATION
ENGIN ENGIN
ECONS ENMS
KICT ICT
IHART INTERNATIONAL INSTITUTE FOR HALAL RESEARCH AND TRAINING
IRKHS IRKHS
IIBF ISLAMIC BANKING AND FINANCE
ISTAC ISTAC
KLM KLM
LAWS LAWS
MEDIC MEDICINE
NURS NURSING
PHARM PHARMACY
KOS SCIENCE
SC4SH SEJAHTERA 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 #

1
likes
0
pub points
31%
popularity

Publisher

verified publisheriqfareez.com

A wrapper to easily access IIUM's Course Schedule website data.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

html, http, intl

More

Packages that depend on albiruni