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-01-31 22:32:29 +00:00
|
|
|
import { ClasschartsClient } from "classcharts-api";
|
2021-10-29 18:46:39 +01:00
|
|
|
async function main() {
|
2022-01-31 22:32:29 +00:00
|
|
|
const client = new ClasschartsClient("classchartsCode", "01/1/2000");
|
|
|
|
|
await client.init();
|
|
|
|
|
console.log(
|
|
|
|
|
await client.getBehaviour({
|
2022-03-09 21:24:11 +00:00
|
|
|
// Note: dates are in the American format
|
2022-03-09 21:16:25 +00:00
|
|
|
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
|
|
|
```
|