ucas-iclass

Crates.ioucas-iclass
lib.rsucas-iclass
version0.1.3
created_at2025-10-18 03:29:33.281546+00
updated_at2025-11-13 06:31:59.320246+00
descriptioniClass API for UCAS
homepage
repositoryhttps://github.com/PRO-2684/ucas-iclass
max_upload_size
id1888759
size90,635
PRO (PRO-2684)

documentation

README

ucas-iclass

GitHub License GitHub Workflow Status GitHub Release GitHub Downloads (all assets, all releases) Crates.io Version Crates.io Total Downloads docs.rs

[!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_uuid provided.

πŸŽ‰ Credits

Commit count: 0

cargo fmt