mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 11:58:13 +00:00
docs: add detentions example (thanks @jazzrox12)
This commit is contained in:
parent
468b436a89
commit
b2d9a6c5e1
1 changed files with 19 additions and 3 deletions
22
README.md
22
README.md
|
|
@ -43,8 +43,7 @@ contributing! If you have any questions, feel free to ask in the
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Node.js 18 or newer
|
- Node.js 18 or newer\
|
||||||
\
|
|
||||||
OR
|
OR
|
||||||
- Deno
|
- Deno
|
||||||
|
|
||||||
|
|
@ -293,6 +292,23 @@ Gets all detentions.
|
||||||
```typescript
|
```typescript
|
||||||
const detentions = await client.getDetentions();
|
const detentions = await client.getDetentions();
|
||||||
console.log(detentions);
|
console.log(detentions);
|
||||||
|
|
||||||
|
/**
|
||||||
|
{
|
||||||
|
"success": 1,
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"id": 12345678,
|
||||||
|
"attended": "no",
|
||||||
|
"date": "2024-03-28T00:00:00+00:00",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"detention_alias_plural": "detentions"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
## `.getAttendance`
|
## `.getAttendance`
|
||||||
|
|
@ -343,4 +359,4 @@ Changes the parent's password.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
await client.changePassword("oldPassword", "newPassword");
|
await client.changePassword("oldPassword", "newPassword");
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue