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

Change clientstudent to studentclient and the smae for parent, generated docs

This commit is contained in:
ChrisPhillips-cminion 2022-03-09 18:02:42 +00:00
parent 4631b7f35e
commit 4f5e091d9f
33 changed files with 168 additions and 87 deletions

View file

@ -96,17 +96,6 @@ export class ClasschartsClient {
}
async getPupil(options?: GetActivityOptions): Promise<ActivityResponse> {
let pupils = this.makeAuthedRequest(
this.API_BASE + "/pupils",
{
method: "GET",
}
);
return pupils
}
/**
* Gets the logged in students behaviour points
@ -155,7 +144,7 @@ export class ClasschartsClient {
data[i].description = data[i].description.replace(/&nbsp;/g, "");
data[i].description = data[i].description.trim();
}
console.log(data)
return data;
}
/**

View file

@ -21,7 +21,7 @@ import { API_BASE_PARENT, BASE_URL } from "./consts";
/**
* The base client
*/
export class ClasschartsClientParent extends ClasschartsClient {
export class ClasschartsParentClient extends ClasschartsClient {
public password = "";
public email = "";
/**
@ -78,5 +78,18 @@ export class ClasschartsClientParent extends ClasschartsClient {
this.studentId = pupil[0].id;
this.studentName = pupil[0].pupil_name;
}
/**
* Get Pupil details
*/
async getPupil(options?: GetActivityOptions): Promise<ActivityResponse> {
let pupils = this.makeAuthedRequest(
this.API_BASE + "/pupils",
{
method: "GET",
}
);
return pupils
}
}

View file

@ -21,7 +21,7 @@ import {ClasschartsClient} from "./client"
* The base client
*/
export class ClasschartsClientStudent extends ClasschartsClient {
export class ClasschartsStudentClient extends ClasschartsClient {
public studentCode = "";
public dateOfBirth = "";