diff --git a/src/class.ts b/src/class.ts index 3a99b39..2738e27 100644 --- a/src/class.ts +++ b/src/class.ts @@ -10,9 +10,20 @@ export class TASEClient { this.token = APIToken } + async validate(): Promise { + const Response = await fetch(TASEApi + `/api/v1/key/validate`, { + headers: { + authorization: `Bearer ${this.token}` + }, + method: "GET" + }) + + return Response.ok + } + async checkUser(UserID: string): Promise { if(UserID.length < 16 || UserID.length > 20) throw new Error("A UserID must be between 16-20 characters.") - + const Response = await fetch(TASEApi + `/api/v1/check/${UserID}`, { headers: { authorization: `Bearer ${this.token}`