feat(grpc): add support for fetching grades and exams
All checks were successful
Build / build (push) Successful in 2m14s

Implement new gRPC task handlers for retrieving student grades and exam schedules. This includes adding new parser logic for processing score and exam data, and updating the client capabilities to advertise support for these new task types.

- Add `getGrades` and `getExams` handlers in `grpc/handler.go`
- Add `parser/encoding.go`, `parser/exam.go`, and `parser/score.go` for data parsing
- Update `grpc/client.go` to include `TASK_TYPE_GET_GRADES` and `TASK_TYPE_GET_EXAMS` in capabilities
This commit is contained in:
2026-05-11 00:46:38 +08:00
parent a04e5c2c50
commit 478ec3e3ab
5 changed files with 603 additions and 0 deletions

View File

@@ -78,6 +78,8 @@ func (c *Client) register() error {
Version: c.version,
Capabilities: map[string]string{
"TASK_TYPE_GET_SCHEDULE": "true",
"TASK_TYPE_GET_GRADES": "true",
"TASK_TYPE_GET_EXAMS": "true",
"TASK_TYPE_LOGIN": "true",
},
},