2021-10-28 16:51:07 +01:00
|
|
|
# Classcharts API
|
|
|
|
|
|
2022-03-12 12:28:08 +00:00
|
|
|
A client for the classcharts API
|
2021-10-29 18:46:39 +01:00
|
|
|
|
2022-03-12 16:14:46 +00:00
|
|
|
* [Documentation](https://jamesatjaminit.github.io/classcharts-api/)
|
2022-04-10 12:07:24 +01:00
|
|
|
* [API Documentation (with library examples)](https://classcharts-api.github.io/api-docs/#introduction)
|
2022-03-12 12:01:45 +00:00
|
|
|
* [Discord](https://discord.gg/DTcwugcgZ2)
|
2021-10-29 18:46:39 +01:00
|
|
|
# Examples
|
2022-03-12 16:14:46 +00:00
|
|
|
Docs are very much a WIP, for any help with the library, please join the discord above
|
|
|
|
|
|
2021-10-29 18:46:39 +01:00
|
|
|
```typescript
|
2022-03-12 11:30:03 +00:00
|
|
|
import { ClasschartsStudentClient } from "classcharts-api";
|
2021-10-29 18:46:39 +01:00
|
|
|
async function main() {
|
2022-03-12 11:30:03 +00:00
|
|
|
const client = new ClasschartsStudentClient("classchartsCode", "01/1/2000");
|
2022-01-31 22:32:29 +00:00
|
|
|
await client.init();
|
|
|
|
|
console.log(
|
|
|
|
|
await client.getBehaviour({
|
|
|
|
|
displayDate: "due_date",
|
|
|
|
|
fromDate: "20/01/2000",
|
|
|
|
|
toDate: "01/02/2000",
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
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
|
|
|
```
|