1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 19:59:37 +00:00

docs: add detentions example (thanks @jazzrox12)

This commit is contained in:
James Cook 2024-03-27 22:22:11 +00:00
parent 468b436a89
commit b2d9a6c5e1

View file

@ -43,8 +43,7 @@ contributing! If you have any questions, feel free to ask in the
## Requirements
- Node.js 18 or newer
\
- Node.js 18 or newer\
OR
- Deno
@ -293,6 +292,23 @@ Gets all detentions.
```typescript
const detentions = await client.getDetentions();
console.log(detentions);
/**
{
"success": 1,
"data": [
{
"id": 12345678,
"attended": "no",
"date": "2024-03-28T00:00:00+00:00",
...
}
],
"meta": {
"detention_alias_plural": "detentions"
}
}
*/
```
## `.getAttendance`
@ -343,4 +359,4 @@ Changes the parent's password.
```typescript
await client.changePassword("oldPassword", "newPassword");
```
```