{"openapi":"3.1.0","info":{"title":"eClass ALU (鄧英業小學) read-only API","description":"Read-only access to the school eClass of 郭樂驊 (P3A). Notices, calendar, timetable, iMail, payments, attendance, clubs. Times are Hong Kong time.","version":"1.0.0"},"servers":[{"url":"https://tangyingyip.sandbox.cyberkero.net"}],"paths":{"/api/today":{"get":{"summary":"Daily digest: unsigned notices, this week's school events, today's timetable, unpaid fees","operationId":"getToday","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/notices":{"get":{"summary":"List school e-notices (電子通告). status: unsigned / all / expired","operationId":"listNotices","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["unsigned","all","expired"],"type":"string","default":"unsigned","title":"Status"}},{"name":"keyword","in":"query","required":false,"schema":{"type":"string","default":"","title":"Keyword"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notices/{notice_id}":{"get":{"summary":"Full text of one notice plus attachment URLs. Set payment=true for 繳費通告 (is_payment)","operationId":"getNotice","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"string","title":"Notice Id"}},{"name":"payment","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Payment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/attachment-text":{"get":{"summary":"Download an eClass attachment (PDF) by its URL and return its text","operationId":"getAttachmentText","security":[{"HTTPBearer":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"attachment url from getNotice","title":"Url"},"description":"attachment url from getNotice"},{"name":"max_chars","in":"query","required":false,"schema":{"type":"integer","maximum":60000,"default":20000,"title":"Max Chars"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news":{"get":{"summary":"School announcements (學校宣布)","operationId":"listSchoolNews","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"string","default":"","title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"type":"string","default":"","title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/{announcement_id}":{"get":{"summary":"One school announcement","operationId":"getSchoolNews","security":[{"HTTPBearer":[]}],"parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","title":"Announcement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/class-news":{"get":{"summary":"Class teacher announcements (班主任宣佈)","operationId":"listClassNews","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"string","default":"","title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"type":"string","default":"","title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/calendar":{"get":{"summary":"School calendar events of a month (校曆): EventID, EventDate, Title","operationId":"getCalendarMonth","security":[{"HTTPBearer":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":12,"minimum":1},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/calendar/type/{kind}":{"get":{"summary":"Calendar events by type: school / teaching / holiday / group","operationId":"getCalendarByType","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"enum":["school","teaching","holiday","group"],"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/calendar/events/{event_id}":{"get":{"summary":"One calendar event detail","operationId":"getCalendarEvent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/timetable":{"get":{"summary":"Class 3A weekly timetable (text)","operationId":"getWeeklyTimetable","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/timetable/day":{"get":{"summary":"Timetable of one date (YYYY-MM-DD, default today)","operationId":"getDayTimetable","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/homework":{"get":{"summary":"Homework handbook (家課冊) for a date. School rarely uses it; read 'raw' if items empty","operationId":"getHomework","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mail":{"get":{"summary":"iMail list (subject, sender, date, uid)","operationId":"listMail","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder","in":"query","required":false,"schema":{"enum":["INBOX","INBOX.Sent"],"type":"string","default":"INBOX","title":"Folder"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mail/{uid}":{"get":{"summary":"Read one iMail by uid (marks it as read)","operationId":"readMail","security":[{"HTTPBearer":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","title":"Uid"}},{"name":"folder","in":"query","required":false,"schema":{"enum":["INBOX","INBOX.Sent"],"type":"string","default":"INBOX","title":"Folder"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/attendance":{"get":{"summary":"Smart card attendance of a month (YYYY-MM, default this month)","operationId":"getAttendance","security":[{"HTTPBearer":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payments":{"get":{"summary":"Payment records (繳費紀錄)","operationId":"listPayments","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unpaid_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unpaid Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/clubs":{"get":{"summary":"Enrolled clubs / ECA status (學會)","operationId":"listClubs","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/eca-events":{"get":{"summary":"ECA activity enrolment page (活動)","operationId":"listEcaEvents","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/groups":{"get":{"summary":"My groups (我的小組)","operationId":"listGroups","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/polls":{"get":{"summary":"Campus polls","operationId":"listPolls","security":[{"HTTPBearer":[]}],"parameters":[{"name":"past","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Past"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/surveys":{"get":{"summary":"Surveys (問卷)","operationId":"listSurveys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}