mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 19:59:37 +00:00
commit
60e10e27b7
2 changed files with 7 additions and 7 deletions
|
|
@ -2,7 +2,7 @@ import Undici from "undici";
|
||||||
import { RequestOptions } from "undici/types/dispatcher";
|
import { RequestOptions } from "undici/types/dispatcher";
|
||||||
import {
|
import {
|
||||||
ActivityResponse,
|
ActivityResponse,
|
||||||
AnnoucementsResponse,
|
AnnouncementsResponse,
|
||||||
BadgesResponse,
|
BadgesResponse,
|
||||||
BehaviourResponse,
|
BehaviourResponse,
|
||||||
DetentionsResponse,
|
DetentionsResponse,
|
||||||
|
|
@ -210,12 +210,12 @@ export class ClasschartsClient {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Lists the logged in student's annoucements
|
* Lists the logged in student's announcements
|
||||||
* @returns Array of annoucements
|
* @returns Array of announcements
|
||||||
*/
|
*/
|
||||||
async listAnnoucements(): Promise<AnnoucementsResponse> {
|
async listAnnouncements(): Promise<AnnouncementsResponse> {
|
||||||
return await this.makeAuthedRequest(
|
return await this.makeAuthedRequest(
|
||||||
API_BASE + "/annoucements/" + this.studentId,
|
API_BASE + "/announcements/" + this.studentId,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ export interface Detention {
|
||||||
}
|
}
|
||||||
export type DetentionsResponse = Array<Detention>;
|
export type DetentionsResponse = Array<Detention>;
|
||||||
|
|
||||||
export interface Annoucement {
|
export interface Announcement {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
|
|
@ -278,4 +278,4 @@ export interface Annoucement {
|
||||||
pupil_consents: Array<any>;
|
pupil_consents: Array<any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AnnoucementsResponse = Array<Annoucement>;
|
export type AnnouncementsResponse = Array<Announcement>;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue