From 0f242a62ba72830aff9dbd31d527137eb3096e6c Mon Sep 17 00:00:00 2001 From: James Cook Date: Sun, 6 Feb 2022 10:16:42 +0000 Subject: [PATCH] fix: add .init() back --- src/client.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/client.ts b/src/client.ts index 1e0f6af..21d393c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -94,6 +94,13 @@ export class ClasschartsClient { this.studentId = user.id; this.studentName = user.name; } + /** + * @deprecated Use .login() instead + */ + async init(): Promise { + console.warn(".init() is deprecated, please use .login()"); + await this.login(); + } /** * Gets general information about the logged in student * @returns Student object