Skip to content

This package provide simple API to get all and query the student's timetable information from Asia Pacific University(APU).

License

Notifications You must be signed in to change notification settings

chengkangzai/laravel-apu-schedule

Repository files navigation

This is my package laravel-apu-schedule

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Package Banners

This package provide simple API to get all and query the student's timetable information from Asia Pacific University(APU).

Installation

You can install the package via composer:

composer require chengkangzai/laravel-apu-schedule

Usage

Get all the intake code

use Chengkangzai\ApuSchedule\ApuSchedule;

$intakes = ApuSchedule::getIntakes(); // UC3F2111SE, AFCF2011AS ... 

Get all the grouping by intake code

use Chengkangzai\ApuSchedule\ApuSchedule;

ApuSchedule::getGroupings("UC3F2111SE"); // G1,G2,G3

Get schedule of specific intake and grouping

use Chengkangzai\ApuSchedule\ApuSchedule;

ApuSchedule::getSchedule("UC3F2111SE","G1"); 
Example Output
[
    {
        "INTAKE": "...",
        "MODID": "...",
        "MODULE_NAME": "...",
        "DAY": "...",
        "LOCATION": "...",
        "ROOM": "...",
        "LECTID": "...",
        "NAME": "...",
        "SAMACCOUNTNAME": "...",
        "DATESTAMP": "...",
        "DATESTAMP_ISO": "...",
        "TIME_FROM": "...",
        "TIME_TO": "...",
        "TIME_FROM_ISO": "...",
        "TIME_TO_ISO": "...",
        "GROUPING": "...",
        "CLASS_CODE": "...",
        "COLOR": "..."
    },
    {}
]

Get all official apu holiday

use Chengkangzai\ApuSchedule\ApuHoliday; 

ApuHoliday::getAll(); // return collection of holiday

Get official apu holiday by year

use Chengkangzai\ApuSchedule\ApuHoliday; 

ApuHoliday::getByYear(2023); // return collection of holiday
Example Output of Holiday Object
[
    "holiday_description" => "New Year's Day",
    "holiday_end_date" => "Sat, 01 Jan 2022 00:00:00 GMT",
    "holiday_name" => "New Year's Day",
    "holiday_people_affected" => "all",
    "holiday_start_date" => "Sat, 01 Jan 2022 00:00:00 GMT",
    "id" => 336,
]

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

This package provide simple API to get all and query the student's timetable information from Asia Pacific University(APU).

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages