4 releases
Uses new Rust 2024
| new 0.1.3 | Nov 13, 2025 |
|---|---|
| 0.1.2 | Oct 24, 2025 |
| 0.1.1 | Oct 20, 2025 |
| 0.1.0 | Oct 18, 2025 |
#195 in HTTP client
412 downloads per month
40KB
750 lines
ucas-iclass
[!WARNING] This repository is for learning purposes only. Use at your own risk.
iClass API for UCAS. Should also work for other schools, but not guaranteed.
π₯ Installation
Using binstall
cargo binstall ucas-iclass
Downloading from Releases
Navigate to the Releases page and download respective binary for your platform. Make sure to give it execute permissions.
Compiling from Source
cargo install ucas-iclass
π Usage
-
π Login: Login to iClass and save session to a file.
ucas-iclass login <username> <password> [-s <session-file>] -
π Courses: List courses in current semester.
ucas-iclass courses [-s <session-file>] -
π Schedule: Get schedule for a specific date or week, defaulting to today.
ucas-iclass schedule [-d <date>] [-w] [-s <session-file>] -
β Checkin: Check-in for a specific schedule by id or uuid, defaulting to current schedule if any.
ucas-iclass checkin [<id_or_uuid>] [-t <timestamp-or-offset>] [-s <session-file>]
π€ Common Problems
Error: API error: δΊη»΄η ε·²ε€±ζοΌ
This is likely because:
- The iClass system's clock is far ahead, or
- Your system's clock is far behind.
Thus, timestamp calculated from your system will be treated as outdated by the iClass system, Fortunately, you can fix this by increasing the timestamp offset to an appropriate value, like $+30000$:
ucas-iclass checkin -t +30000
βοΈ TODO
- Customize api root for cli.
- Checkin: Default to current schedule if no
id_or_uuidprovided.
π Credits
Dependencies
~22β39MB
~727K SLoC