1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 11:58:13 +00:00
classcharts-api-js/readme.md

30 lines
847 B
Markdown
Raw Normal View History

2021-10-28 16:51:07 +01:00
# Classcharts API
2022-03-09 21:29:33 +00:00
A API client for Classcharts
2021-10-29 18:46:39 +01:00
2022-03-09 21:29:33 +00:00
* [Documentation](https://jamesatjaminit.github.io/classcharts-api/index.html)
* [Discord Server](https://discord.gg/985yaqxPuy)
2021-10-29 18:46:39 +01:00
# Examples
2022-03-09 21:29:33 +00:00
### Documentation is very much WIP, better documentation is planned :D
For any help with the lib, please join the discord!
2021-10-29 18:46:39 +01:00
```typescript
2022-03-12 11:20:59 +00:00
import { ClasschartsClient } from "classcharts-api";
2021-10-29 18:46:39 +01:00
async function main() {
2022-03-12 11:20:59 +00:00
const client = new ClasschartsClient("classchartsCode", "01/1/2000");
2022-01-31 22:32:29 +00:00
await client.init();
console.log(
await client.getBehaviour({
2022-03-09 21:24:11 +00:00
// Note: dates are in the American format
from: "2020-12-23",
to: "2022-03-09",
2022-01-31 22:32:29 +00:00
})
);
console.log(await client.getActivity());
console.log(await client.getStudentInfo());
console.log(await client.getActivity());
console.log(await client.getActivity());
2021-10-29 18:46:39 +01:00
}
2022-01-31 22:32:29 +00:00
main();
2021-10-29 18:46:39 +01:00
```