mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 11:58:13 +00:00
feat: attendance
This commit is contained in:
parent
f45d857e9a
commit
04b72babcf
4 changed files with 29 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ import type { AxiosRequestConfig, AxiosInstance } from "axios";
|
|||
import type {
|
||||
ActivityResponse,
|
||||
AnnouncementsResponse,
|
||||
AttendanceResponse,
|
||||
BadgesResponse,
|
||||
BehaviourResponse,
|
||||
DetentionsResponse,
|
||||
|
|
@ -216,4 +217,16 @@ export class ClasschartsClient {
|
|||
}
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Gets the logged in student's attendance
|
||||
* @returns Array of dates of attendance
|
||||
*/
|
||||
async listAttendance(): Promise<AttendanceResponse> {
|
||||
return await this.makeAuthedRequest(
|
||||
this.API_BASE + "/attendance/" + this.studentId,
|
||||
{
|
||||
method: "GET",
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue