Compare commits
10 Commits
8ead1c47be
...
main
Author | SHA1 | Date | |
---|---|---|---|
95becbb66a | |||
ab9443fe29 | |||
9438275f56 | |||
f67e461cdc | |||
b3b8eff9fb | |||
159473250c | |||
8318d5c820 | |||
e7e94c16dc | |||
9e66471360 | |||
c6063d5a6d |
@ -1,6 +1,10 @@
|
||||
<div>
|
||||
<a href="https://git.thegoober.xyz/TGP/tase-api-node">
|
||||
<img alt="Gitea Last Commit" src="https://img.shields.io/gitea/last-commit/TGP/tase-api-node?gitea_url=https%3A%2F%2Fgit.thegoober.xyz%2F">
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/tase-api">
|
||||
<img alt="NPM Last Update" src="https://img.shields.io/npm/last-update/tase-api">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## The All Seeing Eye API
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "npm",
|
||||
"version": "1.0.6",
|
||||
"version": "1.2.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "npm",
|
||||
"version": "1.0.6",
|
||||
"version": "1.2.2",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"tsup": "^8.5.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tase-api",
|
||||
"version": "1.0.6",
|
||||
"name": "tase",
|
||||
"version": "1.2.2",
|
||||
"description": "The official NPM wrapper for The All Seeing Eye's API",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
|
@ -21,14 +21,14 @@ export class TASEClient {
|
||||
* @returns A boolean indicating if the current token can be used on TASE's API.
|
||||
*/
|
||||
async validate(): Promise<boolean> {
|
||||
const Response = await fetch(TASEApi + `/api/v1/key/validate`, {
|
||||
const Response = await fetch(TASEApi + `/api/v1/auth/validate`, {
|
||||
headers: {
|
||||
authorization: `Bearer ${this.token}`
|
||||
},
|
||||
method: "GET"
|
||||
})
|
||||
|
||||
return Response.ok
|
||||
return (await Response.json()).authenticated
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,7 +72,7 @@ export class TASEClient {
|
||||
if(UserIDs.length > 10000) throw new Error("The amount of UserIDs must be less than 10,000.")
|
||||
if(UserIDs.length < 1) throw new Error("The amount of UserIDs must be atleast 1 character.")
|
||||
|
||||
const Response = await fetch(TASEApi + `/api/v1/mass-check`, {
|
||||
const Response = await fetch(TASEApi + `/api/v1/check/mass`, {
|
||||
headers: {
|
||||
authorization: `Bearer ${this.token}`,
|
||||
"content-type": "application/json"
|
||||
|
@ -42,10 +42,6 @@ export interface CheckResult {
|
||||
* What is the ID of the user?
|
||||
*/
|
||||
userId: string,
|
||||
/**
|
||||
* When did this user appeal? (if they have appealed.)
|
||||
*/
|
||||
appealDate?: Date
|
||||
/**
|
||||
* The summed up score of all the `guilds`.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user