chengkangzai / laravel-apu-schedule
This package will find APU schedule from the open data of APU.
Fund package maintenance!
chengkangzai
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.4
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^5.10|^6.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-09 21:17:28 UTC
README
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.